Wio Devices

From AMTech WikiDocs
Revision as of 16:48, 11 January 2019 by Amarrero (Talk | contribs) (Troubleshooting)

Jump to: navigation, search

Wio* devices is a class of devices that allows the integration in the AMTech Platform of hundreds of sensors, actuators, etc. The hardware is mostly developed by Seeed Technology Co.,Ltd. but they allow the development of drivers to integrate new devices as well. Each device expose between 2 and 6 ports where you can connect analog, digital, I2C or UART devices. They all use grove connectors which are developed by the same company. We currently support the integration with Wio Link and Wio Node devices.

Configuration procedures and troubleshooting

How to configure and flash a Wio Link

Procedure to flash a Wio Link after something goes wrong or the device is bricked:

  • A python module is required. Consequently we start by installing virtualenv
 pip install virtualenv
  • Create a new virtualenv environment for python 2
 virtualenv -p python2 py2
  • Load environment
 source py2/bin/activate
  • Install esptool requirement
 pip install esptool
  • Create directories for required wio files. For instance: wio
 mkdir wio
  • Change directory to wio
 cd wio
  • Download firmware files user1.bin and user2.bin into this directory
  • Download esp8266sdk1.4.1.zip and unzip it into wio directory
  • Connect the wio device through USB and identify the device in your system. By running dmesh you can try to find a line like:
 usb 1-1.3: cp210x converter now attached to ttyUSB0
  1. Meaning that the device was recognized and is attached to /dev/ttyUSB0
  • Execute the following line (correcting references if needed):
  • esptool.py -p /dev/ttyUSB0 -b 230400 write_flash --flash_size 32m-c1 0x0000 boot_v1.4\(b1\).bin 0x1000 user1.bin 0x101000 user2.bin 0x3fc000 esp_init_data_default.bin 0x3fe000 blank.bin

Configure a Wio device using the command line interface tool wio-cli

  • A python module is required. Consequently we start by installing virtualenv
 pip install virtualenv
  • Create a python2 environment:
 virtualenv -p python2 py2
  • Load the environment:
 source py2/bin/activate
  • Install requirements
 pip install wio-cli
  • Login with wio login. If first time:
    • Select customize server
    • Select raspberry pi address like http://<external address>:8080 even if running locally
    • Type email address: amtech@amtech.mx
    • Password: 4mt3ch.
  • Setup a new device with wio setup
  1. Read on-screen instructions: make sure that the wio is in setup mode and that you are connected to the server
    • Select wio link or node depending on the device you are configuring
    • Choose to enter wifi configuration manually
      1. SSID: amtech-pi
      2. WIFI password: freepass
    • Type a device name
    • Accept information and wait for the setup to finish. You should see a success message and a "Configuration complete!" message at the end.

Using these instructions from a M2MBridge device

The image provided by AMTech for their M2MBridges already contains a configured environment for the execution of the two procedures previously detailed. If you login as amtech in the M2MBridge there are two folders py2 (with a python 2 virtual environment) and wio that you may use. Execute the following instructions to load the python environment:

source py2/bin/activate
cd wio

And then proceed to the connection of the wio device to the Raspberry PI, identify the USB device in the system and now you get all set to execute any of the two procedures: You can skip steps 1-8 of procedure to Flash a Wio device or steps 1-4 of procedure to configure a Wio device


See [1] for more info