Device Configuration Block (WM2000 and WS1102 Only)
The Device Configuration Block (DCB) of the WM2000 and the WS1102 has the following parameters:
Parameter |
Possible values |
Default value |
Description |
autoconnect |
no | yes |
no |
Determines whether the device will attempt to associate with (connect to) a wireless access point (Wi-Fi network) and maintain this association whenever possible. Must be set to yes for Wi-Fi Updates and wireless debugging (debugmode = net) to work. |
domain |
0 (US) | 1 (EU) | 2 (Japan) ... |
0 (US) |
The wireless regulatory domain. Affects the list of channels the device's Wi-Fi interface will use to communicate when autoconnect = yes. |
ssid |
0-32 characters |
<empty string> |
The SSID (name) of the access point (Wi-Fi network) to connect to when autoconnect = yes. |
password |
0-64 characters |
<empty string> |
The password for the access point (Wi-Fi network) to connect to when autoconnect = yes. |
dhcp |
no | yes |
no |
Determines the default value of the wln.dhcp property. When set to yes, starts the DHCP process before your app launches, thus getting your device a valid IP address even faster — more on this below. |
debugmode |
serial | net |
serial |
Determines whether the serial port or Wi-Fi network will be used for debugging. Must be set to net for the device to be visible in Device Explorer. |
defaultapp |
0 | 1 |
1 |
Determines which compiled Tibbo BASIC/C binary will be loaded at boot — APP0 or APP1. Note that there is an MD button override that force-launches APP0 regardless of the defaultapp value. |
More on the dhcp Parameter
Prior to the WM2000, Tibbo devices implemented the DHCP client through the DHCP library. The WM2000 and the WS1102 allow you to delegate DHCP to the internal process of Tibbo OS (TiOS). This really speeds up the IP procurement! The new wln.dhcp property of the wln. object is provided for enabling this "internal DHCP."
The default value of wln.dhcp is determined by the dhcp parameter of the DCB. If the dhcp parameter is set to no, then wln.dhcp will be 0 (disabled) by default and your code will need to set it to 1 (enabled) to take advantage of the internal DHCP service offered by TiOS. If the dhcp parameter is set to yes, your app will start running with wln.dhcp at 1 (enabled).
We have provided the dhcp parameter not to (potentially) save you a line of code. The real reason is that enabling DHCP before your app starts shaves additional milliseconds off that wait for the IP address to be configured. This means that your app will be ready to perform its network-related tasks even sooner!
Accessing and Initializing the DCB
There are three ways of reading and writing DCB parameters:
- Through the BLE console. This console is a feature of the Monitor/Loader (M/L) used by the WM2000 and WS1102.
- Using the Companion App. The WM2000 ships with this app preloaded as APP0.
- In Tibbo BASIC/C code, using the provided API (properties and methods of the sys. object and wln. object.
It is also possible to reset the DCB parameters to their default values.