Update Firmwae - Page 1
Forum section: electronics / beginners

author: Peili
author_rank: Regular Contributor
timestamp: December 22, 2018, 04:59:03 am
content: Hi,i'm developing a mesh with some routers and end devices using LWmesh stack.. i would like to upgrade the firmware of routers through OTA.. i'm not familiar with OTA.. can anyone help me to use OTA? how to program the routers for OTA upgrade and how to perform the OTA ??

author: Rerouter
author_rank: Super Contributor
timestamp: December 22, 2018, 05:10:13 am
content: If your developing the routers, then that means cooking up a bootloader or adapting one to suit your purpose,Its a bit of code that sits on your device, generally stores the updated flash image somewhere on your device, loads the flash memory programming code to memory and reflashes the program memory with the updated image,Fancy additions are things like fallback program images. or fallover methods to load the program to the device if an image was corrupted.And finally to complete the picture is a function to update the bootloader while the device is running.

author: Peili
author_rank: Regular Contributor
timestamp: December 22, 2018, 05:16:18 am
content: Quote from: Rerouter on December 22, 2018, 05:10:13 amso it means when i program a router device , first i have to make it booloaded,is it?

author: ataradov
author_rank: Super Contributor
timestamp: December 22, 2018, 05:20:04 am
content: You can program multiple images into the device - one is a bootloader, the other one is an application. Or you can combine them externally.Actually creating an OTA implementation is a big topic far outside of what can be described in a forum post. Start by creating code to transfer large files. Then add code for storing those files in the memory, etc.LwMesh v1.1.1 included OTA example. You can look at that code, but be warned, it is not a plug and play thing, you will actually have to think and write code. Here is the link to the releasehttps://www.dropbox.com/s/n6jwnj7otrioa4p/lightweight_mesh_stack_v1.1.1.zip?dl=0

author: Peili
author_rank: Regular Contributor
timestamp: December 22, 2018, 05:28:59 am
content: Quote from: ataradov on December 22, 2018, 05:20:04 ami'm using LwMesh v1.2.1...it has no OTA example.. then how can i use OTA?

author: ataradov
author_rank: Super Contributor
timestamp: December 22, 2018, 05:30:26 am
content: You can look at how it is done in the old one, copy some files, see what is necessary to make it work in v1.2.1. You know, actual software development work.As I said, it is probably not going to be very useful as is, you can look at it for an idea.You at first need to decide what will be the source of the update firmware and what type of architecture you want for your system.

author: Peili
author_rank: Regular Contributor
timestamp: December 22, 2018, 05:43:12 am
content: Quote from: ataradov on December 22, 2018, 05:30:26 amI have one coordinator and 30+routers places in corridors... i have to upgrade those routers using OTA if any change in the router code..

author: ataradov
author_rank: Super Contributor
timestamp: December 22, 2018, 05:44:50 am
content: Quote from: Peili on December 22, 2018, 05:43:12 amGood, then the code in the archive will be very close to what you want. It is architected to be a firmware push from a source device (coordinator).

author: Peili
author_rank: Regular Contributor
timestamp: December 22, 2018, 06:21:30 am
content: Quote from: ataradov on December 22, 2018, 05:44:50 amso it means i can use the coordinator as the OTA server.. is it? or does i need another device as OTA server

author: ataradov
author_rank: Super Contributor
timestamp: December 22, 2018, 06:22:40 am
content: Yes, you can. You are the developer, you can do whatever you want. That's the magic of programming.

author: Peili
author_rank: Regular Contributor
timestamp: December 26, 2018, 04:16:31 am
content: What are the main difference in LwMesh1_2_1 and LwMesh1_1_1 versions? Is it only the OTA ? if i'm developing OTA with the LwMesh1_2_1 version, where i need to change the code? can i use the OTAServerDemo Application in the LwMesh1_1_1 version in LwMesh1_2_1 ? i'm successfully completed the OTA with LwMesh1_1_1, but stucked with LwMesh1_2_1 version... Please help me

author: ataradov
author_rank: Super Contributor
timestamp: December 26, 2018, 04:28:15 am
content: I don't remember what the differences are. What specific problems are you having?You need to change the code based on what compiler tells you in the error messages.

author: Peili
author_rank: Regular Contributor
timestamp: January 07, 2019, 05:36:56 am
content: hi,i'm using LwMesh1_2_1 version and i want to use the OTA upgrade in this.. is it possible to use the bootloader version from 1_1_1 version and load 1_2_1 version for my purpose?

author: ataradov
author_rank: Super Contributor
timestamp: January 07, 2019, 05:38:20 am
content: Yes, bootloader is independent. Versions are just numbers. Look at the actual code, and see what will and will not work.

author: Peili
author_rank: Regular Contributor
timestamp: January 18, 2019, 05:27:23 am
content: hi,Using OTA upgrade , can we upgrade more than one device at a time?

author: ataradov
author_rank: Super Contributor
timestamp: January 18, 2019, 05:33:16 am
content: Not with this implementation. But you can extend it to support more than one client. You would need to have an array of OtaServer_t structures, and corresponding logic. It should be fairly simple to implement.But it is kind of pointless, since the bottle neck is the server throughput, so you will not get any speed advantage.

author: Peili
author_rank: Regular Contributor
timestamp: January 18, 2019, 05:45:19 am
content: doing with the OTA upgrade i'm facing some issues.."Error: response timeout" is getting when i tried to upgrade it

author: ataradov
author_rank: Super Contributor
timestamp: January 18, 2019, 05:46:50 am
content: DEBUG! Seriously, I can't teach you how to write software in this thread. Start from the message and follow things back to the source of the error, an then eliminate whatever the problem is.

author: Peili
author_rank: Regular Contributor
timestamp: March 06, 2019, 07:46:29 am
content: Hi,I'm planning to program multiple devices via USB sequentially. I have developed a board, which can hold upto 6 devices at a time but, data connection to only one and once the firmware update has done data pins automatically switches to the next. Now the problem is i need to program the boot loader one by one.Is it possible toload BOOTLOADER via com port?

author: ataradov
author_rank: Super Contributor
timestamp: March 06, 2019, 07:49:24 am
content: If device does not already have a bootloader of some sort that would listen on a COM port, then it is impossible to load a new bootloader. Only a programmer will help. This is sort of common sense.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 05:21:39 am
content: hi,i successfully upload the boot loader image and my terminal shows 'C'.. and send file with xmodem.. Now i'm trying to upgrade it through OTA... program the OTAserver and tried to upload the new image.. But i'm getting error likeCode:-> UART_COMMAND_COMM_CHECKU���STATus128Status Here <- APP_UART_STATUS_CONFIRMATIONU���STATus129Status Here <- APP_UART_STATUS_PASSED* Comm check passedAfter Communication Check-> UART_COMMAND_START_REQUESTU���STATus128Status Here <- APP_UART_STATUS_CONFIRMATIONU<�STATus4Error: unexpected status (OTA_NO_RESPONSE_STATUS)What will be the reason for it?please help

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 05:26:02 am
content: Your client does not respond. Check that you have specified the correct address and other network parameters. And that you actually have another device in the network running the OTA client.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 05:40:05 am
content: Quote from: ataradov on March 31, 2019, 05:26:02 amWhat you mean by another device ?

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 05:41:20 am
content: What are you updating over the air? Server contacts a client (which address you specify in the command line) and uploads the firmware remotely.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 05:43:16 am
content: Quote from: ataradov on March 31, 2019, 05:41:20 ami'm updating the Wsndemo.bin through the over the air.. Specified the last address i gave to the client when program it through serial interface. Does the OTAserver need bootloader?

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 05:45:41 am
content: Well, somehow the client does not respond to the OTA request. Debug that.No, the server does not need a bootloader. The server is working as designed here, but your client does not respond to the OTA Start request. So check the client.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 07:13:55 am
content: Quote from: ataradov on March 31, 2019, 05:26:02 amChecked the address and other parameters . They are correct and still it shows that error as "Error: unexpected status (OTA_NO_RESPONSE_STATUS)"What will be the reason?

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 07:15:16 am
content: Quote from: ataradov on March 31, 2019, 05:45:41 amok i Will check the client

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 07:16:52 am
content: Quote from: Peili on March 31, 2019, 07:13:55 amClient does not respond. There may be 1000 reasons. Get a sniffer. I don't even understand how you can do any wireless development without a sniffer.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 07:41:32 am
content: Quote from: ataradov on March 31, 2019, 07:16:52 amUsed sniffer and its log is

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 07:45:03 am
content: Screenshot of a single frame is useless. I don't know your network. Also, decoding LwMesh as ZigBee is useless. Wireshark supports LwMesh (somewhat).Does that device ever send anything? Is it in the right PAN? Does it have OTA enabled and configured?

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 08:01:24 am
content: Quote from: ataradov on March 31, 2019, 07:45:03 amYes the device is sending... right pan and OTA enabledi'm Attaching the configurtaion file and Wsndemo file

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 08:05:17 am
content: Destination PAN in the sniffer is 0x3124, in the config 0x1234.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 08:09:56 am
content: Quote from: ataradov on March 31, 2019, 08:05:17 amsorry, i changed the panid for OTA upgrade.. first it was 0x3124 and make and programmed the device through serial and i changed the panID to 0x1234 and make Wsndemo.bin file for the OTA

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 08:12:13 am
content: Capitalize the sentences.Show the frame log (just a list, no decode) when you start OTA. See what exactly happens at that moment.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 08:18:13 am
content: Quote from: ataradov on March 31, 2019, 08:12:13 amHow to Catch the FRAME log? sorry,i don't understand it.

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 08:19:51 am
content: The sniffer log. It is useless to look at a single frame, you need to look at everything that is going all. All the frame that are being exchanged. There are many stages to this whole process, and failure at any of them may result in that status code.

author: Peili
author_rank: Regular Contributor
timestamp: March 31, 2019, 09:05:52 am
content: Quote from: ataradov on March 31, 2019, 08:19:51 amuploading the sniffer pcap file as zip

author: ataradov
author_rank: Super Contributor
timestamp: March 31, 2019, 05:39:30 pm
content: In this log the PAN is still 0x3124. And the device 0x8555 (OTA server) sends a route request for device 0x0. Device does not respond. Figure out your PAN ID confusion.

author: Peili
author_rank: Regular Contributor
timestamp: April 01, 2019, 03:57:39 am
content: Quote from: ataradov on March 31, 2019, 05:39:30 pmi want to upgrade the device with panID 0x3124 to a device with panid 0x1234... Now the device panID is 0x3124 so specified the panid as "-i 0x3124 " option... is this correct? New firmware configuration is 0x1234 panID

author: ataradov
author_rank: Super Contributor
timestamp: April 01, 2019, 04:00:50 am
content: In that case your target device is not responding. Check that it is actually running some firmware. You said that it sends frames, but there is no evidence of that in the log.

author: Peili
author_rank: Regular Contributor
timestamp: April 01, 2019, 04:05:02 am
content: Quote from: ataradov on April 01, 2019, 04:00:50 amIt is actually running some firmware.. i'm writing its APP_CAPTION to UART and it successfully writing it...

author: ataradov
author_rank: Super Contributor
timestamp: April 01, 2019, 04:07:01 am
content: Have it send frames so that you know that network stuff works too. May be build some other configuration, not a coordinator (address > 0).

author: Peili
author_rank: Regular Contributor
timestamp: April 01, 2019, 04:23:18 am
content: Quote from: ataradov on April 01, 2019, 04:07:01 amok i will check it and thank you for your support

author: Peili
author_rank: Regular Contributor
timestamp: April 01, 2019, 05:15:59 am
content: Quote from: ataradov on April 01, 2019, 04:07:01 amBuild other configuration as Router and send some data to coordinator and received successfully.. But when i try with OTA same issue is getting as"Error: unexpected status (OTA_NO_RESPONSE_STATUS)".. What to do?

author: ataradov
author_rank: Super Contributor
timestamp: April 01, 2019, 05:25:16 am
content: Send the new sniffer capture that captures both C & R talking to each other and the update server trying to reach one of the devices.

author: ataradov
author_rank: Super Contributor
timestamp: April 01, 2019, 05:29:15 am
content: Actually, if I remember correctly you had NWK_ENABLE_ROUTE_DISCOVERY disabled in your projects, but update server attempts to do the route discovery, which means it must be enabled there.Your network configurations must be the same on all devices.

author: Peili
author_rank: Regular Contributor
timestamp: April 01, 2019, 07:26:57 am
content: Quote from: ataradov on April 01, 2019, 05:29:15 amchanged the configuration and recompiled the code.. now the response is attaching..

author: ataradov
author_rank: Super Contributor
timestamp: April 01, 2019, 07:29:35 am
content: Well, it looks like your device started to receive the data, and then stopped. There is no way to tell what is wrong. Debug it.It is probably stopped at the point where it saves the new image to the temporary location.

author: Peili
author_rank: Regular Contributor
timestamp: April 01, 2019, 07:54:24 am
content: When i try to upgrade,router stops sending data to coordinator. When i got error from OTAserver the router terminal shows"C".. But when ireconnect the routerit will send data to coordinator . What is the issue?

author: ataradov
author_rank: Super Contributor
timestamp: April 01, 2019, 07:56:52 am
content: I DO NOT KNOW. Use a debugger and debug stuff. If I'm going to do your work for you, I'd like to be paid for that too.

author: Peili
author_rank: Regular Contributor
timestamp: April 06, 2019, 06:51:46 am
content: I have had some success. I got bootloader and OTA worked.Thank you so much for your support

author: Peili
author_rank: Regular Contributor
timestamp: April 30, 2019, 05:56:22 am
content: Hi, i would like to use my coordinator and OTA server as one device.. But the fuse settings are seems to be different.. At the Coordinator side the setting are as :Code:EXTENDED :0xFEHIGH :0x9DLOW :0xC2and the OTA server Fuse Settings are as:Code:EXTENDED :0xFEHIGH :0x1DLOW :0xE2please help me to solve this confusion of Fuse setting..

author: ataradov
author_rank: Super Contributor
timestamp: April 30, 2019, 05:59:00 am
content: Do some work - decode those settings and see what is the actual difference. I have not touched AVR in ages, and I don't remember what those fuses mean.It is probably something related to the bootloader size.