mitxela.com forum
Welcome. Please log in or register.

kiloboot atmega8 sim800
CONSTANTINE Posted: 6 Dec 2019, 03:12 PM
Avatar
electronics maniac

Member
Posts: 2
Joined: 6-December 19
hi everybody
special tanks to mit

i have an iot project for myself
it has a board including atmega8 connected to sim800
via hardware uart and some other parts to do what it must do

atmeva8 programmed via bascom i dont have any knowledge in other language

in other side i have a website that i used same host for
support my iot system getting reports from board and send commands to

everything was good untile something change in server
and i need to change software in chip but it is in other city
i solve it one time but it can not continue like this

now i need a bootloader can download file from my server
via sim 800 to atmega8

for this i have few ideas

1. main program will make sim800 to request file via ftp
then will reset chip with watchdog.
connection will be stable between sim800 and server.
file will be received and sim800 will reply it to hardware uart chip is waiting for download after reset to bootloader
in this way we can use a normal bootloader without any optimization for web
is this theory right? can it work in this way or again we must change something in bootloader
a thing that i dont know is, if the bootloader can receive stream of data or must receive part by part with coordination

it have some good some bad facts
it will be simple but if it have a problem during receive everything will be crashed and system will be stopped working


2. i must manage everything in bootloader independently like mit done in his project
it will be amazing but i dont have any knowledge in assembly or C
then i can not do it by myself


Last edit by CONSTANTINE at 6 Dec 2019, 07:12 PM

-------------
everything is possible just we dont know how
[top]
mit Posted: 6 Dec 2019, 04:12 PM
Avatar
yeah whatever

Admin
Posts: 246
Joined: 4-May 16
Hi. I've never used the SIM800 but I imagine it uses AT commands. Your proposed method 1 sounds very risky. Does the SIM800 output the entire file over UART in one go? FTP is normally multiplexed with two TCP connections. By "normal bootloader" do you mean an existing one, or writing one to use the AT commands for the SIM800?

Even if it works I would be worried about latency affecting it, if it crashes for some reason you would definitely want it to recover on its own.

-------------
[top]
CONSTANTINE Posted: 6 Dec 2019, 07:12 PM
Avatar
electronics maniac

Member
Posts: 2
Joined: 6-December 19
yes sim800 work very simple with AT command sended via uart
and after connecting to server you can request to download a previously uploaded file. all done with simple 2 or 3 line of code
i can do this with basic in main app of avr
then the results will send like a text stream via uart from sim800 to mcu but i dont know if it can be received with bootloader working structure or not
but if you dont want to take risk you must write a bootloader managing all of this and it must written in assembly or c

normal bootloader i mean the one simply waiting for file from uart rx and tx connetion after mcu reset not optimized for ftp or have any AT commands

my theory is like this
connection between mcu and sim800 is not a established continuous connection then i think if we command to sim800 to establish a connection to server and request ftp connection and attempt to download the hex file from server then do a watchdog reset to mcu
sim800 will send file via uart to mcu while bootloader on mcu is waiting for download file

-------------
everything is possible just we dont know how
[top]

Sign in to post a reply.