The Smart Citizen Kit can be managed over a basic serial protocol. You just need the Arduino IDE Serial Monitor or any other Serial Utility like Screen in order to use it.
- Connect to your kit using any serial utility, any baud-rate should work but
115200is recommendable. - Send the starting commands.
- Notice all the commands except the starting commands require a carriage return at the end:
CRor\r. - Call any command you want, change
XXXwith the corresponding value.
This commands are commands to talk directly to the Wi-Fi module (RN-XV WiFly) own interface.
$$$Wake up the module and enter WiFly commands modeset wlan ssid XXX\rAdd a new SSID to memoryset wlan phrase XXX\rAdd a new phrase to memoryset wlan key XXX\rAdd a new key to memoryset wlan auth XXX\rAdd an authentication method into memoryset wlan ext_antenna XXX\rAdd an antenna type into memoryset sys iofunc 0x7Disable the Wi-Fi module blue LED'sexit\rGo back to normal operational mode
This commands are commands to talk talk to the SCK configuration interface.
###Wake up the module and enter SCK commands modeget mac\rGet the MAC address of the kitget time update\rRetrieve the sensor update intervalset time update XXX\rUpdate the sensor update intervalget number updates\rRetrieve the max number of bulk updates allowedset number updates XXX\rUpdate the max number of bulk updates allowedget apikey\rRetrieve the kit APIKEYset apikey XXX\rUpdate the kit APIKEYget wlan ssid\rRetrieve the SSID saved on the kitget wlan phrase\rRetrieve the phrase and KEY saved on the kitget wlan auth\rRetrieve the authentication methods saved on the kitget wlan ext_antenna\rRetrieve the antenna types saved on the kitget all\rRetrieve all config saved on the kit in a single line (|version|MAC|ssid1 ssid2,pass1 pass2,auth1 auth2,ant1 ant2|hardcodedNets|timeUpdate|numPosts|)post data\rRetrieve sensor readings and post them to server if network connection is available.clear nets\rRemove all saved Wi-Fi configuration information (except hardcoded)clear memory\rRemove all configuration informationexit\rGoes back to normal operational mode#data\rRetrieves sensor readings stored in memory