View previous topic :: View next topic |
Author |
Message |
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
Posted: Thu Feb 02, 2012 11:42 pm Post subject: RFM12B Wireless Bootloader |
|
|
This project is a wireless bootloader for the RFM12B based jeenode and jeelink hardware. It can easily be adapted to other avr hardware. In fact I prefer to build my projects on protoboards but I have chosen the jeenode and jeelink hardware here because of there easy use.
The loader requires three hardware devices. A windows PC, an uploader (the jeelink) and a target device (the jeenode). Your compiled bascom program is uploaded and runs on the target device. This version reads and writes to both the flash memory and eeprom memory. It uploads the standard intel hex files generated by bascom. Included in the zip file are the three programs needed to get this project working. They are the PC program is called Loader2.6.exe written in freebasic, the uploader program for the jeelink is called DC_Link_jeeLink_v2.55.hex written in bascom, and the bootloader program is called DC_Boot_jeenode_v2.55.hex also written in bascom. All the source is also in the zip file.
The Bootloader:
The bootloader fits into 2K bytes of flash memory in the boot space of the Atmega328P on the jeenode. You will need an ISP to load the bootloader into the Atmega328P. Also some fuse bits may need to be changed. The Boot size fuses should be set to 1024 Words and BOOTRST should be set. My jeenode has been slightly modified. I use the 8MHz internal oscillator instead of the 16MHz resonator that is normal. I have also added a LED to indicate Tx status. I recommend adding the Tx LED for a quick check that the loader is working. The oscillator frequency on the target device is not critical and will likely work anywhere in the 8 to 16MHz range.
The Uploader:
The uploader runs on the jeelink and plugs into one of your USB slots on your PC. You may need to install a USB driver for the jeelink to work on your PC. The jeelink has a arduino compatible bootloader pre installed so loading my uplaoder onto the jeelink requires a arduino compilable uploader on your PC. I use avrdude but it may be possible to upload from bascom directly.
The PC Loader:
The PC loader program is a work in progress. The PC code has been the most problematic part of the project. I have done complete rewrites in 3 different languages, VB6, Lazarus and freebasic. The current version is written in freebasic and is sort of a hybrid dos/windows program. At some point I would like to make it a pure windows program. One problem to warn you about is that the PC loader program will hang if a unavailable com port is opened. Sometimes windows reports com ports are available that are not. When one of those is opened on my PC the program freezes.
A quick web search will show where to buy the jeenode and jeelink in your area. The jeenode and jeelink can be purchased with 915MHz modules or 868MHz modules. My code is written for the 915MHz modules but it can be easily change for the other. Also if there is interest I can show how to build on a protoboard to save some money.
Please let me know if you find this useful or if you need help getting it working. And if you make improvements please share them with the rest of us here.
Dave
Project Updated Feb. 19, 2012
Last edited by Dave on Sun Feb 19, 2012 9:39 pm; edited 4 times in total |
|
Back to top |
|
|
MAK3
Joined: 24 Sep 2010 Posts: 449 Location: Germany
|
Posted: Fri Feb 03, 2012 8:10 am Post subject: |
|
|
Hello Dave,
very nice project. Thanks for sharing.
MAK3 |
|
Back to top |
|
|
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
Posted: Tue Feb 07, 2012 11:03 pm Post subject: |
|
|
MAK3 - Thanks for your kind comment.
I've attached a quick start guide.
I hope it is of some help.
Dave |
|
Back to top |
|
|
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
Posted: Wed Feb 15, 2012 2:11 am Post subject: |
|
|
Hello
I have written a little tutorial showing how to use terminal mode of the Wireless Bootloader Project.
Regards,
Dave |
|
Back to top |
|
|
forter
Joined: 12 Jan 2012 Posts: 8
|
Posted: Wed Feb 15, 2012 1:43 pm Post subject: |
|
|
This is very intresting project!
I'll try test it on may development board.
Thank you. |
|
Back to top |
|
|
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
Posted: Sat Feb 18, 2012 12:37 am Post subject: |
|
|
Forter - Your welcome. Let me know how your testing goes. - Dave |
|
Back to top |
|
|
polmanswe
Joined: 13 Dec 2007 Posts: 3 Location: Uppsala
|
Posted: Tue Jun 20, 2017 7:07 pm Post subject: Need som help |
|
|
Hello.
Is there anyone that has this to work?
We are trying and trying different things but cannot get it to work. For instance we get errors when compiling regarding the ASM commands.
//Stefan |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Jun 20, 2017 7:30 pm Post subject: |
|
|
asm commands need a preceding !
Like :
! NOP
Or when you use multiple asm statements :
$ASM
NOP
NOP
$END ASM
Inside asm scope, pressing CTRL+SPACE will give you asm related pop up _________________ Mark |
|
Back to top |
|
|
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
Posted: Sat Aug 05, 2017 1:00 am Post subject: |
|
|
Stefan
Sorry for the delay responding. I'm not getting notification of forum post anymore and I don't know why. Maybe they are being treated as spam by my spam filter.
I would recommend using a newer rfm module then the rfm12 for any new projects, especially battery operated projects. The reason is that I have never been able to get an rfm12 to go into a very low power state. I have working boot loaders for the rfm22, rfm24 and rfm26 and the low power state works as it should for these. Also all of these newer modules have much better range. The new wireless boot loader does not need any uploader software running in your pc to work. If anyone is interested I will post the updated code.
Dave |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Sun Aug 06, 2017 7:52 pm Post subject: |
|
|
Quote: | If anyone is interested I will post the updated code. |
VERY much interested.
Also what kind of additional range are you getting with the newer models?
Thanks! |
|
Back to top |
|
|
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
Posted: Mon Aug 07, 2017 1:41 am Post subject: |
|
|
With a 1/4wave length piece of wire for the antenna I get about 300 foot range at best with rfm12. All the other modules I mentioned have a range 3 or 4 times as much.
I forgot to mention that the boot loaders I have for the rfm22, 24 & 26 are all written for the xmega256A3U. I tried to get the code to fit in atmega324 boot section but it was to big. I do have the code to use the atmega parts with the new modules just no wireless boot loading.
I will post code in the next week or so. |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Mon Aug 07, 2017 3:30 pm Post subject: |
|
|
That is a nice range improvement for sure.
Look forward to your code post.
TIA.
Mark |
|
Back to top |
|
|
Dave
Joined: 05 Feb 2005 Posts: 314 Location: OR
|
|
Back to top |
|
|
|