clarification needed about OTA procedure

Using OTA functions with Waspmote
Post Reply
arcticsnow
Posts: 18
Joined: Mon Aug 29, 2016 3:59 pm

clarification needed about OTA procedure

Post by arcticsnow » Wed Sep 21, 2016 3:09 pm

Hello,

I am trying to set up my Waspmote network to work with OTA, but I am a little confused on how to proceed. Maybe you can help me by clarifying few of my misunderstandings.

1) To start, I have access to my meshlium through SSH and the OTAP software is installed and seem to run properly. Now I am wondering as I would like to push new program through OTA, how I can get the HEX file generated by my laptop IDE onto the Meshlium for sending them to a waspmote. Is this done by the OTA-FTP interface? if yes, where is the file saved then onto the Meshlium?

2) When I use the command -scan_nodes, does the waspmote have to be in a specific place within their script run, or they simply needs the xbee to be on for the OTA program on Meshlium to detect them?

3) is the Utils.setAuthKey(“LIBELIUM”); required to be set on LIBELIUM or can it be anything?

Thanks for the help.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: clarification needed about OTA procedure

Post by libelium-dev » Thu Sep 22, 2016 10:37 am

Hi,

You can push new program through OTA using the OTA-FTP interface at Meshlium. The files are stored in the path: /mnt/user/ota

Using the ‘scan_nodes’ function we can search for a specific node or send a global query looking for any node which is ready to be reprogrammed with the OTA process.

By default, authkey is set as ‘LIBELIUM’, you can change it into the code of Waspmote and when you do OTA, include

Code: Select all

--new_authkey [authkey]
Take a look at Over the Air Programming Guide (OTAP) for more information.

Regards.

arcticsnow
Posts: 18
Joined: Mon Aug 29, 2016 3:59 pm

Re: clarification needed about OTA procedure

Post by arcticsnow » Fri Sep 23, 2016 4:57 pm

Thanks for the help.

I think I made some progress in understanding the OTA process, however, I keep hitting a problem that seems recurrent to other people too. Unfortunately I have found too little to solve it.

Here are the step I have followed
1) I ssh on the meshlium
2) stop the sensor parser
3) attempt to scan nodes of the network

Code: Select all

laticewsn:~# 
laticewsn:~# 
laticewsn:~# sensorParserD.sh stop
sensorParser.sh: no process killed
laticewsn:~# cd /mnt/user/ota/otap/
laticewsn:/mnt/user/ota/otap# ./otap -scan_nodes --mode BROADCAST --time 30
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB2: File exists
RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyS0
 
----------------------------------------------------------------
Total Nodes: 0 - Time elapsed: 2s
----------------------------------------------------------------
laticewsn:/mnt/user/ota/otap# 
When I start the script sensorParserD.sh as follow, see the return:

Code: Select all

laticewsn:/mnt/user/ota/otap# sensorParserD.sh start
laticewsn:/mnt/user/ota/otap# Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB2: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB2: File exists
I have tried to reboot the meshlium, with no success. The same problem keep coming. I have read this post:
viewtopic.php?f=19&t=8784
Where it was advised to kill certain processes, as one would be locking the port, and creating the LCK file. As I do not know which process to kill I have not adventure myself there.

So first would that be a problem in using the OTA command shell on the meshlium (as I cannot find any node)? and if yes, how can I go at solving it?

Thanks

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: clarification needed about OTA procedure

Post by libelium-dev » Mon Sep 26, 2016 5:22 pm

Hi,

You try changing the AP mode of the xbee in the meshlium to AP1

Try with these code lines after killing the sensor parser,

Code: Select all

capturer s0 38400
+++ (wait to OK answer)
ATAP1
ATWR
ATWR
After doing OTA you should change again to AP0.

Also, take a look at this topic where an user has a similar issue to discover nodes.

Regarding the issue with the sensor parser, please post your issue at Meshlium section where our colleagues will help you kindly.

Regards.

arcticsnow
Posts: 18
Joined: Mon Aug 29, 2016 3:59 pm

Re: clarification needed about OTA procedure

Post by arcticsnow » Wed Sep 28, 2016 10:43 am

Thanks, I got it to work after following your method. This wasn't the most straight forward to get OTA to run.

But what do you call AP mode? I haven't found documentation on this.
Thanks

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: clarification needed about OTA procedure

Post by libelium-dev » Wed Sep 28, 2016 11:09 am

AP is to set the API mode.
AP0=API disabled
AP1=API enabled
AP2=API enabled w/PPP
Regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest