If you find difficulties using Waspmote, first please make sure you read the documentation available on the Development Section. https://development.libelium.com/development-libelium/
2 Uploading code
The following steps must be done each time we must upload code, always:
- Make sure the battery is connected and charged.
- "DO NOT TRY TO RECHARGE THE NON-RECHARGEABLE BATTERY. IT MAY EXPLODE AND CAUSE INJURIES AND DESTROY THE EQUIPMENT. DEVICES WITH NON-RECHARGEABLE BATTERIES MUST BE PROGRAMMED THROUGH THE USB CABLE WITHOUT THE BATTERIES CONNECTED. PLEASE DOUBLE CHECK THIS CONDITION BEFORE CONNECTING THE USB. DO NOT CONNECT EITHER UNDER ANY CIRCUMSTANCE THE SOLAR PANEL TO A DEVICE WITH A NON-RECHARGEABLE BATTERY AS IT MAY EXPLODE AND CAUSE INJURIES AND DESTROY THE EQUIPMENT."
- Switch Waspmote ON (in the image, move both switches to the left).
- If your code uses other modules, then plug to Waspmote all the needed devices (XBee, communication modules, Sensor Board, etc).
- You have downloaded the latest version of the API available at https://development.libelium.com/waspmote/software
- You have selected right board in the IDE (tools → board)
- Connect Waspmote to your PC through the USB cable and select the right USB port (tools → serial port). If it is the first time you plug a Waspmote on your PC and you are unable to see the proper USB port, maybe you should install the latest FTDI drivers: https://ftdichip.com/drivers/d2xx-drivers/
Moreover, if you have troubles installing FTDI drivers and your computer is unable to recognize Waspmote, please follow the installation guide for your operating system on your next link: https://ftdichip.com/document/installation-guides/.
Note: This process will be required only the first time.
Note: The name of the USB ports depends on the OS and the particular PC you have. The best way to find the USB where Waspmote is connected is trial & error.
- Prepare your code for Waspmote. In our case, go to the template of the “hello_world” or copy and paste the text in the sketch.
- Save the sketch (the IDE has a button for that), for example with the name “hello_world”, and check the IDE states “Done Saving”.
- Compile the code and check there are no errors or warnings. The IDE should say “Done Compiling” after the progress bar ends.
- Upload the code to Waspmote: click the “Upload” button and wait a few seconds until the process ends; check there are no error messages, just “Done uploading”.
- Now open the serial monitor and see the output of your code. Remember to select the right baudrate (by default is 115200).
- If the sketch is using XBee, connect the Gateway to your PC through a USB port. The antenna must be connected to the Gateway's XBee too.
- Select this new device in the “Tools/Serial Port” menu (if it was not auto-detected) and open another serial monitor to see the gateway data.
- You can also open another graphical serial terminal application like CuteCom or GTKTerm to see the incoming wireless frames to the Gateway. Please note the correct configuration:
NOTE: In fact, the MAC of the sender Waspmote can be also read on the bottom of its XBee:
(*) For ZigBee and DigiMesh users: when the Gateway's red LED is not blinking, it means it is configuring the network. When the red LED blinks, the network is already configured and ready to be used.
3 Networking problems
If you have networking problems, please check first this tips:
- All XBees are in the same network that the Gateway (or Meshlium). In Waspmote's API, PANID parameter is set with “setPAN” function. You can also set this parameter for each XBee plugging it to the Gateway, and then connecting it to a PC: the Digi's X-CTU application helps to check and set the XBee's configuration. In this case, you must use the ATID command.
- All XBees are in the same channel. The CHANNEL parameter is set with “setChannel” function. If you want to do it in the X-CTU way, you must use the ATCH command.
- All Waspmotes are transmitting towards the MAC of the Gateway (or Meshlium).
- All XBees are configured to 115200 bps. In X-CTU, you can control data rates executing the ATBD command.
- All XBees have the same encryption options. The ENCRYPTION MODE parameter is set with ”encryptionMode” function. In X-CTU, the related command is ATEE. And the ENCRYPTION KEY parameter is set with “setLinkKey” function. In this case, the X-CTU command is ATKY.
- All Waspmotes' XBees are set in mode AP = 2 (API mode).
Details for the X-CTU operation are in X-CTU tutorial.
4 Usage and storage recommendations for the batteries
The rechargeable, ion-lithium batteries, like the ones provided by Libelium, have certain characteristics which must be taken into account:
- Charge the batteries for 24 hours before a deployment. The aim is to have the charge of the batteries at 100% of their capacity before a long period in which they must supply current, but it is not necessary to improve the performance.
- It is not advised to let the charge of the batteries go below 20% of capacity, since they suffer stress. Thus, it is not advised to wait for the battery to be at 0% to charge it.
- Any battery self-discharges: connected to Waspmote or not, the battery loses charges by itself.
- Maximum capacity loss: as the charge and discharge cycles happen, the maximum charge capacity is reduced.
- Batteries work better in cool environments: their performance is better at 10 ºC than at 30 ºC.
- At temperatures below 0 ºC, batteries can supply current (discharge), but the charge process cannot be done. In particular:
- discharge range = [-10, 60] ºC
- charge range = [0, 45] ºC