Tiny Linux Server - VoCore2 - Getting Started

The VoCore2 Ultimate is an impressive piece of miniaturization and is worth considering for embedded control applications.

This tutorial will help you learn how to:

  • configure the device's settings,
  • add secure internet access, and
  • control the on-board LED.

I bought the Ultimate version (with enclosure and standard connections) since it seemed like a quick way to get started. For embedded control, the PCB is also available and is about the size of a postage stamp.

Supplies:

Tools

To configure a VoCore2 using this tutorial, you will need to use the vi text editor and a serial emulator. If you are not familiar with these, there are links in the tutorial which will provide assistance.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Power-up the VoCore2

Connect a USB adapter cable between your computer and the VoCore2. The mini-USB connection on the VoCore should be used for this.

Step 2: Connect to the Luci Config App

The config application runs on the VoCore2 and you can get to it through your browser.

  1. From you host computer/laptop, connect to the device's wifi network (SSID: VoCore2-…)
  2. In your browser go to: http://192.168.61.1/
  3. You should see a web page asking for credentials.
  4. Enter ID: root
  5. Enter Password: vocore
  6. You should be in the OpenWrt system config app now.

You can also enter configuration commands using the VoCore2 console, which we will do later.

Step 3: Load Latest Firmware

Use the Luci Navigation to go to:

System > Backup / Flash Firmware

  1. Get latest download from https://vocore.io/v2u.html Section titled: "Upgrade VoCore2 Firmware". As of 2019-Nov-03, the latest version is shown in the screenshot above.
  2. Save the file to your computer.
  3. Use the Luci interface to select it.
  4. Press the "Flash Image" button to load it into your VoCore2.

Step 4: Set System Time

  1. After loading the new firmware, wait a few minutes before reconnecting to the VoCore's WiFi network (SSID: VoCore2-…)
  2. In browser go to: http://192.168.61.1/
  3. Go to Menu: System > System
  4. Skip down to Timezone and select your timezone
  5. Go back up and press "Sync with browser" button
  6. Leave the rest of the options as default
  7. Press "Save & Apply" button

Step 5: Add Internet Access

The device's default mode is to run as a network Access Point (AP). You can connect to the device by mini-usb, WiFi, or Ethernet, but the device will have no Internet access. To add Internet access, follow the instructions below which will enable STA (network Station) mode to operate. (After adding STA mode, the device will still operate as an AP and the Luci configuration app will still be available.)

The following steps will add Internet Access.

Step 6: Connect to the VoCore Console

From PC

  1. Open Control Panel > Device Manager > Ports, look for "USB Serial Device", remember COM port number
  2. Use Serial Terminal Emulator (Example: Putty)
  3. Set up connection params: Com_Port_Number, 115200 bps, 8 data bits,1 stop bit, no parity, no flow control
  4. Once connected, press Enter to get Linux shell prompt

From Mac

Open Mac's Terminal app and run the following command to find Serial Port info.

ls /dev/cu*

The response looks like:

/dev/cu.usbmodem6A68DE4F34311

Enter your actual response within the next command, to start the terminal emulator.

screen /dev/cu.usbmodem6A68DE4F34311 115200,cs8,-parenb,-cstopb

That will open the Screen terminal emulator. You can now press Enter to get the Linux shell prompt.

Step 7: Add Station (STA) Mode

Background

This section uses uci commands which help configure the OpenWrt operating system. (As an alternative, you can also edit the associated OS files directly.)

This section is derived from: https://vocore.io/v2u.html. I abridged the instructions for clarity. In order to avoid errors with "uci commit":

  • I put all uci parameter values in quotations.
  • I omitted commands for parameters that are already set in their respective /etc/config files.

I also added a few extra commands to configure the new Access Point's WiFi network, including:

  • appropriate frequencies to match your country's regulations, and
  • secure login credentials.

Instructions

1. Connect to device's console through its microUSB (see prior sections)

2. Run the following commands in the console.

uci set wireless.sta.ssid="Your_Existing_WiFi_SSID"
uci set wireless.sta.key="Your_Existing_WiFi_Password"
uci set wireless.sta.network="wwan"
uci commit

3. Configure boot-up script so that if your existing WiFi network is down, you can still connect to VoCore2.

Use the vi editor (included with OpenWrt) to insert the following code into /etc/rc.local

uci set wireless.sta.disabled="0"
uci commit/etc/init.d/network restart
sleep 10
uci set wireless.sta.disabled="1"
uci commit

4. Setup firewall to enable access internet through your hotspot.

uci set firewall.@zone[1].forward="ACCEPT"
uci commit                    

5. Add additional parameters to configure appropriate WiFI radio frequencies based on your country such as Canada or US, respectively:

uci set wireless.ra0.country="CA"
uci set wireless.ra0.country="US"

More country codes at: https://www.arubanetworks.com/techdocs/InstantWen...

uci commit

6. Set Access Point Login Credentials and Encryption

The device comes without a password on its WiFi access point (SSID: VoCore2…), so add one here.

uci set wireless.ap.key="New_WiFi_Password"
uci set wireless.ap.encryption="psk2"
uci commit

Note that psk2 includes WPA2

7. Update Wirelesss by running:

wifi reload

or by running

/etc/init.d/network restart

or if it's still not behaving, by rebooting device:

reboot

which will of course take longer than reload or restart.

8. Wait 30-60 seconds for the device to enter AP+STA mode.

9. Connect your host computer to WiFi, picking the network called VoCore2...

10. Confirm Internet connection by running:

ping -w 5 www.vocore.io

The response should show something like:

64 bytes from 192.81.249.134: seq=0 ttl=56 time=76.269 ms
64 bytes from 192.81.249.134: seq=1 ttl=56 time=65.666 ms
64 bytes from 192.81.249.134: seq=2 ttl=56 time=68.216 ms
64 bytes from 192.81.249.134: seq=3 ttl=56 time=63.554 ms
64 bytes from 192.81.249.134: seq=4 ttl=56 time=66.769 ms

If you're having troubles getting network connections to work, use the previously mentioned reboot command. If that doesn't work, disconnect the USB cable, wait 30 seconds, reconnect the cable. You can also check the /sys/config/ folder to ensure that the commands (above) configured their associated files correctly.

Step 8: Controlling the Onboard Red LED

To control the onboard LED which flashes red during WiFi activity, I found that the following approach works:

Un-trigger LED in Luci App

From the Luci app:

  1. Use the menu to navigate to System > LED Configuration.
  2. Set the trigger to "none".
  3. Press Save and Apply

Presumably the default setting would make this the state after boot-up, but I didn't test that.

Control LED with Console Commands

To turn the LED on:

echo 1 > /sys/class/leds/vocore2\:fuchsia\:status/brightness

To turn the LED off:

echo 0 > /sys/class/leds/vocore2\:fuchsia\:status/brightness

Caution

Controlling the LED this way may conflict with OpenWrt's use of the LED, but worked during my tests.

A better way of controlling GPIO is to use the export command, however this command does not work for GPIO44 (which controls the LED, based on schematics and router manual screenshots shown above). So the Operating System is likely, still holding on to this LED, despite Luci setting.

Step 9: Resources

Here are some links that I found helpful or interesting as I learned about the VoCore-OpenWrt ecosystem.

VoCore

Ultimate https://vocore.io/v2u.html

Wiki VoCore https://vocore.io/wiki.html

Schematics http://vonger.cn/misc/vocore2/vocore2.hd.zip

GitHub www.github.com/vonger/vocore2

Luci http://192.168.61.1/cgi-bin/luci (once connected to VoCore WiFi)

Designer's Blog http://vonger.cn

OpenWrt

User Guide https://openwrt.org/docs/guide-user/start

Quick Start https://openwrt.org/docs/start

uci https://openwrt.org/docs/guide-user/base-system/u...

Network https://openwrt.org/docs/guide-developer/networki...

Wireless

Passwords https://openwrt.org/docs/guide-user/network/wifi/...

Home Automation https://openwrt.org/docs/guide-user/services/auto...

uBoot https://www.denx.de/wiki/U-Bootdoc/BasicCommandSe...

Applications

Puffy LEDs https://shiftj.is/post/puffy/

LED/unbrick https://www.shortn0tes.com/2015/11/vocore-tutoria...

Mediatek https://docs.labs.mediatek.com/resource/linkit-sm...

Global Engineer https://globalengineer.wordpress.com/tag/openwrt/

Hackaday https://hackaday.com/2015/11/15/vocore-tutorial-g...

VoCore 1 https://www.shortn0tes.com/2015/11/vocore-tutoria...

PC Connect http://vonger.cn/?p=8127

Other

CLI basics https://openwrt.org/docs/guide-user/network/openw...

Be the First to Share

    Recommendations

    • Assistive Tech Contest

      Assistive Tech Contest
    • Reuse Contest

      Reuse Contest
    • Made with Math Contest

      Made with Math Contest

    Discussions