View previous topic :: View next topic |
Author |
Message |
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
Posted: Sat Jan 08, 2022 5:54 pm Post subject: update the microprocessor firmware |
|
|
hi,
how can i update the microprocessor firmware remotely?
(BASCOM-AVR version : 2.0.8.5 ) |
|
Back to top |
|
|
JC
Joined: 15 Dec 2007 Posts: 584 Location: Cleveland, OH
|
Posted: Sat Jan 08, 2022 9:33 pm Post subject: |
|
|
Not my area of expertise, but I'll start the ball rolling.
What micro?
Mission critical, i.e. what happens if the system crashes from an update failure?
How far away is "remotely", across the room, across the city, across the country, on the other side of the world?
What type of connectivity does the product have?
WiFi, Bluetooth, XBee, etc.
Does the product have an SD Card where a "temporary" version of the firmware can be stored?
Is the process initiated by you, or by someone at the site of the product?
Is there power failure prevention build into the device so that it cannot lose power in the middle of an update?
Is there any person at the site of the product who can attach a small external programmer to the PCB? (Alan's device).
Is the device connected to a PC via USB?
Can you mail your clients an updated box?
Have you ever written, or modified, a Bootloader before?
Lots of questions, but these should help get things started.
JC |
|
Back to top |
|
|
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
Posted: Sun Jan 09, 2022 9:18 pm Post subject: |
|
|
I'm sorry ... let me explain:
I have a lighting pole and I need to make it smart and connected via LoRaWan protocol.
I am thinking of using a TR-72DAT module connected to a micro ATmega... that takes care of turning on and off, reading the voltage, current, dimming etc ...
Obviously on the circuit I will provide an ISP connector for programming the microprocessor locally.
Not considering for now if the update is not successful (blackout, .. etc), how can I update the firmware of the micro remotely? (obviously via LoRa Network)
Thanks for your invaluable help |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Mon Jan 10, 2022 9:54 am Post subject: |
|
|
For remote upgrade I have VPS server in the cloud.
My devices time to time check if new firmware is released. If so then they download Xtea encrypted BIN file into SDCARD or some memory/flash.
If download is complete and CRC of the file is match then device can update immediatelly or shedule it for the night.
For update a flag in the eeprom is set and device reset itself.
Bootloader check the flag. Bootloader decoding Xtea on the fly and program device.
Only if finished correctly the flag in the eeprom is cleared. If not it takes another try.
On the screen below you can see the log from some early version.
PS. After some fire on the France OVH server room I must launch new server with new IP. This was pain in the... because all devices had IP hardcoded.
This was a huge mistake. Now I have domain and I can switch it into any new IP I want so devices check domain, not IP.
|
|
Back to top |
|
|
atmega64
Joined: 23 Feb 2005 Posts: 298 Location: ITALY
|
Posted: Mon Jan 10, 2022 10:10 am Post subject: |
|
|
compliments...
since I have always programmed the micro via ISP connector locally ...
could you give me some tutorials to use your solution? thank you. |
|
Back to top |
|
|
|