2. Prepare your device

2.1. Network Connectivity

The first step of a Wubby enabled device when it starts its operation is to gain network connectivity so it can grant access to the Wubby Cloud.

There are two possible ways to set the WiFi settings of the device, so that is is able to connect to the network

  1. Via the Wubby IDE. See section Configuring the WiFi settings of the device for detailed instructions.
  2. Using WPS (Push button method). To initiate WPS, SW1 and SW2 buttons should be pressed simultaneously.
_images/wps.png

c) By setting the Wubby device in SoftAP mode and accessing the HTTP configuration server. To do so, after reseting the device press the SW1 and SW2 buttons simultaneously and afterwards the SW1 button alone.

_images/httpConf1.png

Then, connect your WiFi to the ConfigurationAP that will be available (using the “wubby_AP” as passphrase) and access the 193.168.0.1 page from your browser. Enter the WiFi credentials of your selected network and press “submit”.

_images/httpConf2.png

Note

The device will not start running the Python application if the wifi settings are not correct.

2.2. Setup the communication with the device

In order to be able to see debug messages printed by the running Python application, as well as information messages printed by the Wubby VM, a terminal emulation application such as Cutecom (Linux) or Teraterm (Windows) is necessary. The Wubby IDE also comes with an integrated serial monitoring console (see section The Serial Viewer).

2.2.1. Instructions for the Cypress BCM943362WCD4EVB WICED Dev. Board Kit

Windows

Download the BCM9WCD1EVAL1 Drivers for Windows zip file and unzip it in your filesystem. Plug the WICED evaluation board into the development PC using a USB cable. In the “Found New Hardware” Wizard select “Install from a specific location” and give the BCM9WCD1EVAL1 Drivers’ folder.

The WICED evaluation board has two logical USB devices: a USB-JTAG device and a USB-UART device, so you will have to perform the installation process twice.

To verify that driver installation has completed successfully, do the following:

  1. Open the Device Manager (right-click My Computer, select Properties).
  2. In the System Properties window, select Hardware, Device Manager.
  1. The WICED USB Serial Port is listed under Ports (COM & LPT) as shown in the screen capture below (shaded yellow).
  2. The WICED USB JTAG Port is listed under WICED USB JTAG Devices as shown in the below screen capture (shaded blue).

At the screen capture below, the Device Manager window identifies the WICED USB Serial COM port as COM21. The assigned port number varies among systems.

_images/windows_bcm.png

In Teraterm select the COM port that appears in the Device Manager and set the baudrate to 115200.

Linux

Download the BCM9WCD1EVAL1 Drivers for Linux zip file and unzip it in your filesystem. Navigate to the unzipped folder and perform the following steps:

  1. Copy the rules to udev.
$ sudo cp ./99-bcm.rules /etc/udev/rules.d/99-bcm.rules
  1. Copy the script for the ftdi.
$ sudo mkdir /opt/bcm
$ sudo cp ./bcm.sh /opt/bcm/bcm.sh
$ sudo chmod +x /opt/bcm/bcm.sh
  1. Plug the WICED evaluation board into the development PC using a USB cable.
  2. Start Cutecom
$ sudo cutecom

Note

In order to have access to the USB port with no need of administrator permissions (no need for sudo), you have to add your user to the group that owns the device. To find the group use the command:

$ ls -l /dev/ttyUSB*

This will give you a list of one or more serial port devices of the form:

crw-rw---- 1 root uucp 188, 0 Jul 22 02:49 /dev/ttyUSB0

In this case the serial device is owned by user “root” and group “uucp”, so you want to add yourself to the “uucp” group. In the examples below we will use “dialout” for the group we need to join.

Using a terminal, you can enter the following command:

$ sudo adduser (username) dialout

Substitute your login name for (username).

You can check to make sure that you are now a member of the dialout group with the command:

$ groups

which will respond with the full list of groups you belong to.

After adding the user to the dialout group you can start cutecom whithout sudo:

$ cutecom
  1. In Cutecom select the /dev/ttyUSB* port and set the baudrate to 115200. To find which USB port to use issue the command in a terminal

    $ ls -la /dev/
    

    which will give you something like the output shown in the figure below:

_images/usbPorts_linux_wiced.png

The ttyUSB that should be selected in Cutecom is the one that is related to the wubbySERIAL_ device.

Note

Ηave in mind to first close the port in Cutecom before unplugging the device from the PC, because Cutecom releases the port with a small delay, within which the device may not be recognizable.

MAC

Coming soon...

2.2.2. Instructions for the Murata LBWB1ZZYDZ-DTEMP-SNIC-A Dev. Board Kit

Follow the same instructions as in section Instructions for the Cypress BCM943362WCD4EVB WICED Dev. Board Kit.