Problem RFBee and Firmata

wireless communication and related Bees.

Moderators: lily.li, violet, jessie

essembeh
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Mon Mar 18, 2013 8:30 pm

Problem RFBee and Firmata

Post by essembeh » Mon Mar 18, 2013 9:27 pm

Hello all

I am trying to control my arduino with the Firmata library using 2 RFBee v1.1.

Here is my target setup description:
- A PC with Firmata client with a UARTSBEE (from seeedstudio) to connect a RFBee v1.1
- An arduino with Standard Firmata Firmware and a RFBee v1.1
- The two RFBees are working with default settings, in broadcast mode (I've successfully tested the communication with an Hello world sample)

First problem, RFBee cannot work with baudrate 57600 which is Firmata default baudrate.
Firmata works fine with 9600 and 115200 which are RFBee compliant baudrates.

What I do not understand is why Firmata@115200 does not work with two RFBees@115200 !??

Firmata@115200 and with USB works fine.
RFBees@115200 with Hello world works fine.
But I don't manage to make thw whole thing work :(
And it does not work with baudrate 9600 neither!

One solution could be to use RFBee with 57600 baurdarte, can the RFBee firmware be tweaked to use it?
If anyone has an idea it would be very usefull because I'm stuck :S


Thanks

User avatar
loovee
Elementary-3
Elementary-3
Posts: 352
Joined: Fri Nov 02, 2012 9:15 am

Re: Problem RFBee and Firmata

Post by loovee » Tue Mar 19, 2013 7:56 am

essembeh wrote:Hello all

I am trying to control my arduino with the Firmata library using 2 RFBee v1.1.

Here is my target setup description:
- A PC with Firmata client with a UARTSBEE (from seeedstudio) to connect a RFBee v1.1
- An arduino with Standard Firmata Firmware and a RFBee v1.1
- The two RFBees are working with default settings, in broadcast mode (I've successfully tested the communication with an Hello world sample)

First problem, RFBee cannot work with baudrate 57600 which is Firmata default baudrate.
Firmata works fine with 9600 and 115200 which are RFBee compliant baudrates.

What I do not understand is why Firmata@115200 does not work with two RFBees@115200 !??

Firmata@115200 and with USB works fine.
RFBees@115200 with Hello world works fine.
But I don't manage to make thw whole thing work :(
And it does not work with baudrate 9600 neither!

One solution could be to use RFBee with 57600 baurdarte, can the RFBee firmware be tweaked to use it?
If anyone has an idea it would be very usefull because I'm stuck :S


Thanks
hi~ actually, after initialize rfbee, you can initialize baudrate again, then you can use 57600 again .
eg:

rfBeeInit();
Serial.begin(57600);

essembeh
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Mon Mar 18, 2013 8:30 pm

Re: Problem RFBee and Firmata

Post by essembeh » Wed Mar 20, 2013 4:11 am

loovee wrote: hi~ actually, after initialize rfbee, you can initialize baudrate again, then you can use 57600 again .
eg:

rfBeeInit();
Serial.begin(57600);
Thank you for the answer.

I've just tested it with no success :(
I have modified RFBee.ino to set
Serial.begin(57600);
I also use 57600 in my sample on my Uno.

Opening the /dev/tty.usbserial-A1017ICY with screen at 57600 gives me unprintable chars.
But i can see the right number of "???" every second but not the "Uno" string :(

Am I missing something?
Have you ever tested RFBee@57600?

Thanks

User avatar
loovee
Elementary-3
Elementary-3
Posts: 352
Joined: Fri Nov 02, 2012 9:15 am

Re: Problem RFBee and Firmata

Post by loovee » Thu Mar 21, 2013 11:11 am

hey~ I am sorry that I made a mistake, I had try 9600 ,38400 and 115200, all works fine~
it 's strange that It does work fine at 57600, I think it's maybe RFBee use the Atmega168 internal crystal, which is unstable. :(

essembeh
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Mon Mar 18, 2013 8:30 pm

Re: Problem RFBee and Firmata

Post by essembeh » Thu Mar 21, 2013 3:25 pm

I don't think that the baudrate is the point in my problem.

The hello world works with RFBee link with both 115200 and 9600 baudrates.
Firmata works on USB link with both 115200 and 9600 baudrates.

But I cannot make firmata work with RFBee!
Does anyone knows enough the Firmware to explain that?


I tried to remove all extra string prints by rfbee firmware (like "ok") not to mess with the firmata protocole, but without success...

User avatar
loovee
Elementary-3
Elementary-3
Posts: 352
Joined: Fri Nov 02, 2012 9:15 am

Re: Problem RFBee and Firmata

Post by loovee » Thu Mar 21, 2013 3:40 pm

essembeh wrote:I don't think that the baudrate is the point in my problem.

The hello world works with RFBee link with both 115200 and 9600 baudrates.
Firmata works on USB link with both 115200 and 9600 baudrates.

But I cannot make firmata work with RFBee!
Does anyone knows enough the Firmware to explain that?


I tried to remove all extra string prints by rfbee firmware (like "ok") not to mess with the firmata protocole, but without success...

seems that there's some problem when rfbee communicate with firmate.. or can you just use the rfbee as a arduino board , and send some data via uart, see if firmate can get it ?

essembeh
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Mon Mar 18, 2013 8:30 pm

Re: Problem RFBee and Firmata

Post by essembeh » Thu Mar 21, 2013 3:53 pm

I use StandartFirmata project as is, like a Firmware and it is quite big so I don't know if RFBee chips have enough memory.
Plus merging the two firmwares into one is a little challenging as I'm an arduino beginner :)

Firmata over UART works (on Uno/Leonardo) so I assume it will work on Atmega168...
But I will test it on a RFBee chip via its UART soon ;)

User avatar
loovee
Elementary-3
Elementary-3
Posts: 352
Joined: Fri Nov 02, 2012 9:15 am

Re: Problem RFBee and Firmata

Post by loovee » Thu Mar 21, 2013 4:10 pm

essembeh wrote:I use StandartFirmata project as is, like a Firmware and it is quite big so I don't know if RFBee chips have enough memory.
Plus merging the two firmwares into one is a little challenging as I'm an arduino beginner :)

Firmata over UART works (on Uno/Leonardo) so I assume it will work on Atmega168...
But I will test it on a RFBee chip via its UART soon ;)

Actually I had modified the rfbee firmware sometimes ago, maybe you can have a look at it ~ :D

essembeh
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Mon Mar 18, 2013 8:30 pm

Re: Problem RFBee and Firmata

Post by essembeh » Thu Mar 21, 2013 4:21 pm

Thanks, I will test your RFBee lib ASAP ;)

Could you tell me what are the changes from the google code version?

Searching for documentation, I saw a github project: https://github.com/robots/RFBee
Unfortunatly, I don't know how to use it without the Arduino IDE (there is no .ino), as I said, I'm an arduino beginner :|

User avatar
loovee
Elementary-3
Elementary-3
Posts: 352
Joined: Fri Nov 02, 2012 9:15 am

Re: Problem RFBee and Firmata

Post by loovee » Thu Mar 21, 2013 4:31 pm

essembeh wrote:Thanks, I will test your RFBee lib ASAP ;)

Could you tell me what are the changes from the google code version?

Searching for documentation, I saw a github project: https://github.com/robots/RFBee
Unfortunatly, I don't know how to use it without the Arduino IDE (there is no .ino), as I said, I'm an arduino beginner :|
my code is more easy to combine with other code ~ cu'z I add some useful API, such as sendDta(), and isDta(), and so on! :D

Post Reply