
Anyone see this before?
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Anyone see this before?
I'm excited too! 

Re: Anyone see this before?
Ok, I was finally able to solder the boards and put them through the test.
I was able to have serial communication just fine with the xbee modems when set to 57600 baud, but was not successful in uploading codes to it when set to 115200 baud.
When I was testing at 57600 baud, I talked to the controller and requested the internal web server page and got responses just fine. So I confirmed I had two way communication just fine.
Then, I moved to 115200 baud, which is the speed that optiboot uses to communicate. When the upload process starts, I get some response back, but it stops and fails
This is what I got:
According to this, the first two bytes received are correct:
This indicates the controller rebooted and accepted the byte to start the bootloader.
Then, the second sequence of bytes start and that's when things got corrupted...
avrdude sends 3 bytes: 41, 80 and 20 and the board was supposed to respond with 14,03 and 14.
But avrdude receives back 14,03 and fc and that's when avrdude quits saying there was a protocol error.
So, at this point, I'll need more time to investigate what is going on.
The quick google search I did led me to believe nobody was able to do this on the optiboot bootloader yet, except for one person or company, but they used a different modem.
It's called synapse RF100.
Here is the link that discouraged me:
http://arduino.cc/forum/index.php/topic,153565.0.html
This is the document I read about the RF100:
https://solarbotics.com/download.php?file=300
I was able to have serial communication just fine with the xbee modems when set to 57600 baud, but was not successful in uploading codes to it when set to 115200 baud.
When I was testing at 57600 baud, I talked to the controller and requested the internal web server page and got responses just fine. So I confirmed I had two way communication just fine.
Then, I moved to 115200 baud, which is the speed that optiboot uses to communicate. When the upload process starts, I get some response back, but it stops and fails

This is what I got:
Code: Select all
The following features were automatically added:
Watchdog Timer
Version Menu
The following features were detected:
Simple Menu
Binary sketch size: 19,902 bytes (of a 32,256 byte maximum)
C:\Program Files (x86)\Reef Angel Controller\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM3 -b115200 -D -Uflash:w:C:\Users\Owner\AppData\Local\Temp\build5872162785073746506.tmp\Template.cpp.hex:i
avrdude: Version 6.0, compiled on Apr 6 2012 at 19:29:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf"
Using Port : \\.\COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
Rebooting Reef Angel Controller
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
avrdude: Send: A [41] . [80] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [fc]
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: Send: A [41] . [81] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [04]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [fc]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: Send: A [41] . [98] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
Hardware Version: 1984904986
Firmware Version: 4.-2
avrdude: Send: A [41] . [84] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: Send: A [41] . [85] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: Send: A [41] . [86] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: Send: A [41] . [87] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: Send: A [41] . [89] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
Vtarget : 3.2 V
Varef : 268590.0 V
Oscillator : 1.372 Hz
SCK period : 2153852453.4 us
avrdude: Send: A [41] . [81] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: Send: A [41] . [82] [20]
avrdude: Recv:
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41
avrdude: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [04] . [00] . [00] . [00] . [80] . [00] [20]
avrdude: Recv:
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x42
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: Send: Q [51] [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude done. Thank you.
Code: Select all
avrdude: Recv: . [14]
avrdude: Recv: . [10]
Then, the second sequence of bytes start and that's when things got corrupted...
Code: Select all
avrdude: Send: A [41] . [80] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [fc]
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
But avrdude receives back 14,03 and fc and that's when avrdude quits saying there was a protocol error.
So, at this point, I'll need more time to investigate what is going on.
The quick google search I did led me to believe nobody was able to do this on the optiboot bootloader yet, except for one person or company, but they used a different modem.
It's called synapse RF100.
Here is the link that discouraged me:
http://arduino.cc/forum/index.php/topic,153565.0.html
This is the document I read about the RF100:
https://solarbotics.com/download.php?file=300
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Anyone see this before?
Darn! I didn't see the arduino article before. 
BUT you can be the first to get them working
lol at least it starts transmitting correctly!

BUT you can be the first to get them working

-
- Posts: 289
- Joined: Wed May 16, 2012 9:52 pm
Re: Anyone see this before?
I may be missing something obvious here, but why not just push the upload at a slower speed? Is the 115200 a requirement? Id be happy to turn a 30 second upload to the controller into a minute long upload for the advantage of it being wireless. Even more so if I don't ever have to disconnect my Ethernet adapter again to do it
Small price to pay in my eyes.
Nick

Nick
Last edited by 00Warpig00 on Wed Mar 20, 2013 5:32 pm, edited 1 time in total.
180G FOWLR
20GH QT#1
29G QT#2

20GH QT#1
29G QT#2
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Anyone see this before?
Crossed my mind as well.00Warpig00 wrote:I may be missing something obvious here, but why not just push the upload at a slower speed? Is the 115200 a requirement? Id be happy to turn a 30 second upload to the controller into a minute long upload for the advantage of it being wireless.
Nick
-
- Posts: 289
- Joined: Wed May 16, 2012 9:52 pm
Re: Anyone see this before?
Hell, it takes me longer than the time difference would be just to find my 20 foot USB cable, drop it across the floor, and plug it in to both my RA and computer. lol 
Nick

Nick
180G FOWLR
20GH QT#1
29G QT#2

20GH QT#1
29G QT#2
Re: Anyone see this before?
I found out that the xbee radios are actually working on a different baud rate and that's probably why the data gets corrupted.
It is trying to communicate at 117647 instead of 115200
It is trying to communicate at 117647 instead of 115200

Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Anyone see this before?
Maybe a software or hardware mod could fix that
Re: Anyone see this before?
I think we need one of these:
http://www.dfrobot.com/index.php?route= ... Vck0KPn-70
They claim it works on our bootloader
http://www.dfrobot.com/index.php?route= ... Vck0KPn-70
They claim it works on our bootloader
Roberto.
Re: Anyone see this before?
Wouldn't we need the whole kit?
http://www.dfrobot.com/index.php?route= ... VcolFeQO9I
Well, I'm guessing you would need everything but the IO expansion shield. In place of that you would need a board for the 2nd WPN to plug into the pins on the RA, yes? or is there a way to plug that in under the hood? If we plug into the pins that means we still have to unlug the wifi to program.
~Charlie
http://www.dfrobot.com/index.php?route= ... VcolFeQO9I
Well, I'm guessing you would need everything but the IO expansion shield. In place of that you would need a board for the 2nd WPN to plug into the pins on the RA, yes? or is there a way to plug that in under the hood? If we plug into the pins that means we still have to unlug the wifi to program.
~Charlie
Last edited by Piper on Mon Apr 01, 2013 10:09 am, edited 1 time in total.
Re: Anyone see this before?
Ok, after the failed attempt to use the xbee, I decided to revisit my first choice of upload without wires.
My first attempt a while ago was unsuccessful and the module sat in the shelf for quite a while.
So, I decided to put another effort in tying to find out why I failed last time and this is what I got it this time:
[youtube]http://www.youtube.com/watch?v=mi3d2EjXSqk[/youtube]
This is the first step into getting it this completed.
The next step is trying to integrate the wifi as well as the bluetooth radio.
Right now, the code fails to upload if the wifi is connect too, so I'll have to come up with a way to isolate the wifi when we are uploading.
More to come
My first attempt a while ago was unsuccessful and the module sat in the shelf for quite a while.
So, I decided to put another effort in tying to find out why I failed last time and this is what I got it this time:
[youtube]http://www.youtube.com/watch?v=mi3d2EjXSqk[/youtube]
This is the first step into getting it this completed.
The next step is trying to integrate the wifi as well as the bluetooth radio.
Right now, the code fails to upload if the wifi is connect too, so I'll have to come up with a way to isolate the wifi when we are uploading.
More to come

Roberto.
Re: Anyone see this before?
Sweet. So we'll be able to connect via bluetooth
Then maybe I can go back to developing on my Mac

Re: Anyone see this before?
That's awesome! Even through my RA is less that 10' away from my computer I'll still pick one of these modules up when they become available. That would be awesome being able to upload a small change without stringing out the USB cable and disconnecting the wifi.
~Charlie
~Charlie
Re: Anyone see this before?
Ok, so I figured out the way to coexist both modules and isolate the channels, so they don't get each others' transmissions.
My proto board looks ugly with lots of wires, but it does the job
Check it out:
[youtube]http://www.youtube.com/watch?v=q59IwQ0o4BY[/youtube]
My proto board looks ugly with lots of wires, but it does the job

Check it out:
[youtube]http://www.youtube.com/watch?v=q59IwQ0o4BY[/youtube]
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Anyone see this before?
Great success! Congrats! This will be a great expansion for RA users
Re: Anyone see this before?
This is awesome! Pricing and availability estimates?
--Colin
--Colin
Re: Anyone see this before?
So are they ready yet???


Re: Anyone see this before?
Would the BT work with the RA client
-
- Posts: 180
- Joined: Thu Apr 05, 2012 6:20 am
- Location: JHB, South Africa
Re: Anyone see this before?
This is awesome - congrats man!
To be honest when i first recieved my RA i thought the wifi module alone could do this
To be honest when i first recieved my RA i thought the wifi module alone could do this

Re: Anyone see this before?
Very nice

I wish we could see the spark cloud working to see if we can add out libraries

Roberto.
Re: Anyone see this before?
That's pretty slick.
I've been thinking about picking up an arm dev board of some kind; had been waiting for the Leaf Labs "Oak", which seems on hold now, but then thinking about the Leaf Labs "Maple", but maybe I'll look into this Spark Cloud board now...
I've been thinking about picking up an arm dev board of some kind; had been waiting for the Leaf Labs "Oak", which seems on hold now, but then thinking about the Leaf Labs "Maple", but maybe I'll look into this Spark Cloud board now...

Current setup:
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
60g 24" custom cube (fish and softies right now)
AI Sol Blue, Ecotech MP-10wES
Coralife skimmer
100% customer controller, transitioning to ReefAngel
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Anyone see this before?
Very interesting. Could we (as RA) figure out how to do a firmware update type thing? Sending a file over the wifi connection , store on SD (RA side) decomplie and program like a flash? Not sure if this method would be better versus trying to upload small bits of data over and over via wifi??? Isnt this where our issue lays? If an SD (or other storage) could receive the flash file then upload we wouldn't be dealing with the small bits of data right?
I could be way off??? I don't have the components to mess with this at the moment
I could be way off??? I don't have the components to mess with this at the moment

Re: Anyone see this before?
Hey Roberto have you had any time to play with this
Also can you cobble a drawing together that shows the wifi and bt connected
I have just recived a new bt module and would love to play with this..
Not so much the wireless programing but the xfer aspect of it BT would be a great way to connect fo ra control while in the house.. VS having to pull the laptop out each time i want to check on things
http://dx.com/p/jy-mcu-arduino-bluetoot ... ule-104299
is the module i picked up
Also can you cobble a drawing together that shows the wifi and bt connected
I have just recived a new bt module and would love to play with this..
Not so much the wireless programing but the xfer aspect of it BT would be a great way to connect fo ra control while in the house.. VS having to pull the laptop out each time i want to check on things
http://dx.com/p/jy-mcu-arduino-bluetoot ... ule-104299
is the module i picked up
Re: Anyone see this before?
I've had problems using those cheap BT adapters for programming, but it worked fine for data xfer.
Simply connect Tx/Rx from RA to TX/RX of the BT module. Simple as that
Just make sure you connect over 57600 baud.
I've got the first prototype done yesterday and installed on my RA for remote programming. It worked out pretty nice
I just need to make one small revision and produce a new prototype to finalize the pcb design.
Simply connect Tx/Rx from RA to TX/RX of the BT module. Simple as that

Just make sure you connect over 57600 baud.
I've got the first prototype done yesterday and installed on my RA for remote programming. It worked out pretty nice

I just need to make one small revision and produce a new prototype to finalize the pcb design.
Roberto.
Re: Anyone see this before?
Cool.. Ya cheap is not always a good thing as we have talked about before.. i will try it later tonigh and see if i can get my data back from it...
What BT did you use for testing
What BT did you use for testing
Re: Anyone see this before?
Looks the same. I think there is a 5 and a 6 version and I tried both of them. Could only get data.
It would freeze when I tried using it for programming.
It would freeze when I tried using it for programming.
Roberto.
Re: Anyone see this before?
Ya they have a 3-10 versions they all look pretty close to each other.. Ok any who.. i will keep playing thats what it is all about anyways...
I may be one of the few people that own a ra that has not used it to control my tank im having way too much fun on the programing and just the understanding of how it works,,,
Total Love the RA
I may be one of the few people that own a ra that has not used it to control my tank im having way too much fun on the programing and just the understanding of how it works,,,
Total Love the RA