Widig-802 QuickStart WiFi

From I-CubeX Wiki
Jump to: navigation, search

The below information applies to version 2.014 or higher of WiConnect.



Connect the WiDig

0. Out of the box, once powered with the USB battery or via the USB connection to a computer, the WiDig's WiFi needs to be enabled using the Connect software v1.6.3 or higher (on MacOS) or v1.5.3 or higher (on Windows).

As of WiConnect v2.017 the WiFi credentials can be entered from the digitizer view in Connect v1.7.0.6 or higher (on MacOS) or v1.6.0.4 or higher (on Windows), and you can jump to step 3a.

If that fails, or the WiDig is running WiConnect v2.016 or older, the WiDig sets up a WiFi access point (AP) to enable you to enter the name and password of the WiFi network you want the WiDig to connect to. If the WiDig is to be connected via USB to a computer, use the supplied micro USB cable. It's possible to use any other micro USB cable but some cables can be of inferior quality such that the power supply to the WiDig is insufficient which may result in the inability to communicate with the WiDig.

The WiDig will keep this AP alive for about 5 minutes after startup. During that time you can't access the WiDig via USB, and the WiDig will not appear in Connect. Once the AP has timed out, restart Connect or click "Refresh Devices" in Connect and the WiDig will appear in Connect's device list. While the WiDig is trying to connect to a WiFi network its blue LED is blinking once a second.

As of WiConnect v2.017 the AP can be disabled by pressing the button on top of the WiDig next to the blinking blue LED and then re-plugging the WiDig. After re-plugging the WiDig's WiFi must be re-enabled in Connect.


1. Find the WiDig AP in the list of access points in your WiFi menu of a mobile device such as a phone, or of a computer, and connect to it. The WiDig will be listed as "WiDig SSSS", where SSSS is its serial number (the last 4 digits on the label on the bottom of the WiDig).


Widig-802 ap name.png


A "captive portal" window should open entitled "Join WiDig SSSS". If you don't select the AP in the list manually, the captive portal should open eventually automatically. If the captive portal doesn't appear, even though you are connected to the WiDig's AP, enter http://192.168.132.1 in a browser to access the captive portal.

If the WiDig's blue LED blinked at power-up but then eventually turned off it means the WiDig's WiFi AP timed out. Press the button on the top middle of the WiDig near the blue LED or re-power the WiDig to restart the WiDig's WiFi AP and try again to connect to it.


Widig-802 wifimanager join.png


2. Select "Configure WiFi" and in the following screen select the network you want to use and enter its password. Make sure that the network the WiDig is connected with has access to the internet as the WiDig loads software from the internet that it needs to render its configuration webpage (see below). The WiDig now has the necessary credentials to be able to obtain an IP address from the network router. If the blue LED eventually is steady ON it was successful in connecting to the WiFi network. If it is turned off, it timed out (5 minutes passed since bootup) - reboot the WiDig by pressing the button on top in the middle next to the blue LED, or re-power the WiDig, and start again at step 1.

3a. If the WiDig is connected via USB, run Connect v1.6.3 or higher (on MacOS) or v1.5.3 or higher (on Windows) and check the Digitizer View to find out what IP address was assigned to the WiDig. Click on this address to automatically go to a browser where the WiDig's configuration page will be opened. Make sure that the network the WiDig is connected with has access to the internet as the WiDig loads software from the internet that it needs to render its configuration webpage (see below).

3b. Start an IP/WiFi/LAN/network scanner (eg. Trendmicro's Housecall for Home Networks or, for mobile devices, Fing, and there are many others), start a web browser and access the configuration page of your network's router. You can find the WiDig's IP address in the list of connected devices provided by the IP/WiFi/LAN/network scanner or on the configuration page of your network's router, by looking for the WiFi chip's manufacturer name "Espressif".

3c. Alternatively, start an Open Sound Control (OSC) monitor (eg. using the software that you plan to send the WiDig sensor data to, F53 OSC Monitor (MacOS only), Protokol or OSC Data Monitor) and configure it to listen for messages on port 9999. Reboot the WiDig by pressing the button on top in the middle and check the OSC monitor for messages. Once the WiDig has obtained an IP address it will send an OSC message to all computers on the network on port 9999 with this IP address. The WiDig, if OSC is enabled, sends this OSC message with its IP each time it is powered up or re-booted.

4. If you had to execute step 3b or 3c, enter the WiDig's IP address in the URL field of a web browser (on a computer or on a mobile device) to access the configuration page of the WiDig. Make sure that the network the WiDig is connected with has access to the internet as the WiDig loads software from the internet that it needs to render its configuration webpage (see below).


Widig-802-1922 sensors.png


5. Connect a sensor to an input.

6. Click the "Off" button of the input to start streaming sensor data of the input (the button will turn green and show "On") and confirm that you are receiving this data in OSC-capable software and/or in the OSC monitor.

You're up and running !

Note that changing the WiDig configuration via USB with Connect or other software is (mostly) not reflected in the WiDig configuration web page. Reload the page to update it and show the current state after any changes effectuated in Connect or other software.

Sensors

1. Select the sensor type you have plugged into the WiDig's input from the pull-down menu.

2. When selecting a digital I2C sensor, the field to its right will be enabled for entering the sensor method, if needed.

3. Switch between raw and processed modes of operation by clicking the raw/processed button. The raw mode corresponds to host mode (see eg. Connect), while the processed mode corresponds to standalone mode. With EditorX you can configure more features of the processed mode than possible with the web browser page.

4. Click "Show" (which then changes to "Hide") to see the values of the sensors that are enabled, and start collecting sensor data for display in a chart. Click "Hide" to disable this, and stop collecting sensor data for display in a chart. All sensor data collected thus far is still kept in the browser memory.

5. Click on a sensor value to view it change over time in a chart that will open to the right. Close the chart by clicking the sensor value again. Closing the chart doesn't delete any sensor data, and its values continue to be collected as long as the sensor is enabled and as long as the "Show"/"Hide" button is set to "Hide". Click on the sensor value of another sensor to see its data (since it was enabled or since the "Show"/"Hide" button was set to "Hide", whichever last occurred) in a chart instead.

6. Click "Curve" (which then changes to "Dots") to switch to viewing the actual sensor values as dots. When set to "Curve" a smooth line is interpolated between the sensor values. Beware that this is a mathematical interpolation, ie. values of the curve between the actual sensor values (as seen in the "Dots" mode) may not be accurate.

7. Change the value to the far right of "Range" to set the time span (in milliseconds) of the chart.

8. Click "Pause" (which then changes to "Scroll") to stop the chart from scrolling. Pausing the chart doesn't stop the receipt of sensor values. Then change the two values next to "Range" to select a time span to view in the chart. These values are the absolute time in milliseconds since January 1, 1970 at 00:00:00 GMT. Hover over sensor values in the chart to see the time represented in a more readable format. The timeline at the bottom display time in yet another time format.

9. Change the value to the right of "Update Interval" to set the interval between the receipt of successive sensor values. This value is independent of the sampling interval and setting it lower than the sampling interval has no use. Setting it higher than the sampling interval will result in sensor values not shown in the chart. The transmission of sensor data at very high sampling rates (sampling interval less than 10 ms) and update rates (update interval less than 10 ms) may depend on the quality of the WiFi network. The chart is updated at a rate independent of the previous two update rates, where its update interval is equal to the "Update Interval" with a minimum of 20 ms.

10. Done with collecting data ? Click "Data" to save all the sensor values collected since the sensor value under "Show"/"Hide" was clicked. If the chart scrolling is paused and/or the sensor is still enabled, the last received sensor value just before clicking the "Data" button will be included in the file. Beware that if the "Update Interval" value is higher than the sampling interval, not all sampled values will have been sent from the WiDig to the web page and hence not all sampled values will be included in the saved data file.

11. In the Chart section, click "Clear" to reset the chart, ie. delete all its data and start again. This action only applies to the selected sensor and all other data from enabled sensors is still being collected. Reloading the web page will delete all data.

12. In the Sensors section the "Clear" button to set the configuration of all input/output slots of the WiDig that are not used by digital I2C actuators to default values for sensors.

13. Click on the "Sensors" link (which then changes to "Actuators") to access the configuration page for actuators (see below).

14. In stand alone mode, if holding down the Shift key on the keyboard while clicking a button, the sensor input will be set to ghost mode. The input will then process the data from the adjacent lower-numbered input such that this data can be mapped to another MIDI message. Use the same sensor type and method selection for inputs set to ghost mode and the input from which the data originates.

15. Use the Update button to refresh the page so that it matches the actual configuration of the WiDig after changing the WiDig configuration via another interface, such as Connect.


Widig-802-1922 actuators.png

Actuators

1. Click the "Actuators" link to access the configuration page for sensors (see above).

2. See the actuator outputs section of the EditorX software support for detailed information about actuator output control.

3. Select the actuator type you have plugged into the WiDig's output from the pull-down menu.

4. When selecting a digital I2C actuator, the field to its right will be enabled for entering the actuator method, if needed. The button to the right of the On/Off button switches between Threshold Control (TC) and Continuous Control (CC). See the actuator outputs section for more information.

5. When enabling the pulse-width modulation of a digital binary actuator by clicking the button "DC" (it'll change to "PWM") enter the PWM value in the field to the left of the On/Off button. The value range is 0-125, and represents (<pulse width range> x <PWM value> / 125) milliseconds, where 1 ms has to be added if the pulse width range field is set to "2" or "0", which setting represents a 1 ms pulse width range of 1-2 ms.

6. If PWM is set for any of the digital binary actuators, change the pulse interval with the field to the right of "Interval". Change the pulse width range with the field to its right. The default setting of 20 ms for the pulse interval and "2" ms for the pulse width range is compatible with most RC servos. This "2" ms range is actually a 1 ms range of 1-2 ms, and is equal to entering "0" in the pulse width range field. When setting the range to 3 ms (or higher, or 1 ms) it represents 0-3 ms (or 0-higher, or 0-1 ms). Note that the pulse interval always has to be 3 ms higher than the pulse width range.

7. Click the button "Current" to switch to "Init", and vice versa. If the Current/Init button is set to Current (pink color), the On/Off buttons set the current state. If the button is set to Init (violet color), the buttons and fields below them set the status of the actuator outputs at power-up or after a software reset. In host mode, all settings are set to defaults after a software reset or at power-up, so only the I2C actuator method to be used for the ON status can be set.

8. The "Update" button in the actuators page allows you to see the status of the outputs if they are controlled externally via OSC messages or have been set via USB using a software program such as Connect.

9. Click the "Clear" button to set the configuration of all input/output slots of the WiDig that are not used by digital I2C sensors to default values for actuators.


WiFi

1. When the blue LED is steady on it indicates that the WiDig is connected to WiFi. When the blue LED blinks once a second it indicates it is trying to connect to a WiFi network. If the blue LED is off the WiDig is not connected to WiFi, nor is it trying to connect.

2. The WiFi functionality can be turned off/on by clicking the WIFI/USB button in EditorX or Connect. Turning off the WiFi while holding down the Alt/Option key in Connect also clears the WiDig's storage for the credentials (ie. WiFi network name and password) it used to access the most recently used WiFi network.

3. Upon boot, if the WiFi functionality is enabled, the WiDig will try to connect. If it succeeds in connecting to a WiFi network, the blue LED will turn on. If the WiFi connection attempt fails, and no WiFi access credentials have been stored previously, the WiDig will start a WiFi access point (AP) and keep it alive for about 5 minutes after startup. During that time you can't access the WiDig via USB, and the WiDig will not appear in Connect. While the WiDig is trying to connect to a WiFi network the blue LED will blink once a second. Once the AP times out the blue LED will turn off. If you now restart Connect or click "Refresh Devices" in Connect, the WiDig will then appear in Connect's device list. If you want to retry to connect to the AP, press the button on the top middle of the WiDig near the blue LED or re-power the WiDig to restart the WiDig's WiFi AP.

4. If WiFi functionality is enabled and the WiDig successfully connected to a WiFi network but then loses the WiFi connection (eg. due to a power outage), the WiDig will try to re-connect until it can successfully connect using the most recently used WiFi credentials (ie. WiFi network name and password).

5. To connect to a different network while the WiDig can detect the network it most recently successfully connected to, this network must be turned off and the WiDig rebooted, or use Connect to disable while holding down the Alt/Option key, and then enable, the WiDig's WiFi. It will then start a new WiFi access point.

6. To get even more mobile, setup a smartphone as a (mobile) hotspot so that it functions as a WiFi network router to which the WiDig can connect. Use another smartphone or laptop to configure the WiDig's WiFi credentials for connecting to the smartphone's hotspot. Now you can bring this setup in your car !


OSC

1. Configure the OSC output and input addresses and ports as needed. Out of the box the OSC output is configured to broadcast to the entire network (using address 255.255.255.255 as shown in the image above) but you may want to change that to send OSC messages to a specific computer's IP address.

2. To maximize performance and minimize latency of OSC messaging, disable the display of data in a chart by setting the "Hide"/"Show" button in the Sensors section to "Show", and disable USB serial communications.

3. If working via USB and if you don't need OSC messaging, maximize performance and minimize latency even further by turning off any OSC messaging by setting the "On"/"Off" button to "Off".

4. Use one of the above mentioned OSC monitors to capture data and save it to a file. We've successfully recorded sensor data for at least 8 hours uninterrupted with F53 OSC Monitor (MacOS only), which can be set to write all messages time-stamped to a file automatically upon start in the preferences.

5. Control and configure the WiDig by sending it OSC messages. See also these Python examples.

If the OSC messages match (case insensitive) the format "/<digitizer_name> <command> <set_value(s)>", where digitizer_name is the name of a connected digitizer, the following commands are available:

command set_value1 set_value2 Action
host switch to host mode
standalone switch to standalone mode
reset reset the WiDig to default values or, if in standalone mode, reload the current configuration
resetoutput initialize the actuator outputs, like after power-up or software reset (see OUTPUT INIT command for more details)
mute mute all output from the WiDig
unmute unmute all output from the WiDig
interval 1 .. 16383 set the sampling interval in ms
solo 0 .. 63 set the (virtual) sensor input to allow output from (only available in standalone mode, see SET SOLO command for more details)
pwm 0 .. 127 0 .. 127 set the pulse interval and maximum pulse width for pulse width modulated output (see SET OUTPUT PULSE command for more details)

If the OSC messages match (case insensitive) the format "/<digitizer_name>/<input_name> <command> <set_value>", where digitizer_name is the name of a connected digitizer, the following commands are available:

command Action
{analog, angled .. voltd} {0 .. 127} configure the input for the specified sensor and execute the specified method
on turn the input on
off turn the input off
ghost set the sensor input to ghost mode
sample sample the sensor input once

If the OSC messages match (case insensitive) the format "/<digitizer_name>/<output_name> <command(s)> <set_value>", where digitizer_name is the name of a connected digitizer, the following commands are available (see SET OUTPUT and SET OUTPUT INIT commands for more details) where if the set_value is left unspecified the value (method, delay or pulse width) currently stored for this output is used:

command command2 command3 set_value Action
{digital, cvolt .. seergb} {0 .. 127} configure the input for the specified actuator and execute the specified method
on {0 .. 127} if configured for threshold control, set the output to the ON status and switch to the OFF status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms} else if configured for continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the ON status
off {0 .. 127} if configured for threshold control, set the output to the OFF status and switch to the ON status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms} else if configured for continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the OFF status
tc {0 .. 127} configure the output for threshold control, set the output to the ON or OFF status as already set by another command and switch the status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms}
cc {0 .. 127} set the output to use continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the ON or OFF status as already set by another command
oni {0 .. 127} at power-up or initialization, if configured for threshold control, set the output to the ON status and switch to the OFF status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms} else if configured for continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the ON status
offi {0 .. 127} at power-up or initialization, if configured for threshold control, set the output to the OFF status and switch to the ON status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms} else if configured for continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the OFF status
tci {0 .. 127} at power-up or initialization, configure the output for threshold control, set the output to the ON or OFF status as already set by another command and switch to the ON status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms}
cci {0 .. 127} at power-up or initialization, set the output to use continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the ON or OFF status as set using another command - in the case of an I2C actuator, the specified value also sets the current ON status value
on tc {0 .. 127} configure the output for threshold control, set the output to the ON status and switch to the OFF status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms}
off tc {0 .. 127} configure the output for threshold control, set the output to the OFF status and switch to the ON status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms}
on cc {0 .. 127} set the output to use continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the ON status
off cc {0 .. 127} set the output to use continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the OFF status
init on tc {0 .. 127} at power-up or initialization, configure the output for threshold control, set the output to the ON status and switch to the OFF status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms}
init off tc {0 .. 127} at power-up or initialization, configure the output for threshold control, set the output to the ON status and switch to the ON status after the specified delay in steps of 100 ms, ie. the range is {100 .. 12700 ms}
init on cc {0 .. 127} at power-up or initialization, set the output to use continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the ON status - in the case of an I2C actuator, the specified value also sets the current ON status value
init off cc {0 .. 127} at power-up or initialization, set the output to use continuous control, set the output to the specified value (which is the method in case of an I2C actuator or a pulse width in case of a binary digital actuator) and default to the OFF status - in the case of an I2C actuator, the specified value also sets the current ON status value

If the OSC messages match (case insensitive) the format "/<digitizer_name>/<output_name> <set_value>", where digitizer_name is the name of a connected digitizer, and set_value is in {.. -128, 0 .. 127, 128 .. }, the set_value will be mapped to a SET OUTPUT message as follows:

set_value Action
{0 .. 127} enable and set pulse width modulation (if implemented) or set the I2C actuator method as per OSC message value
{-128 (or less), off} turn output off
{128 (or more), on} turn output on