Closed born2net closed 9 years ago
Problem solved:
yes I had the same issue..
using node.js and Firmata.
FIXED:
in /usr/lib/node_modules/firmata/lib/firmata.js edit the line
if(typeof port === 'object'){ this.sp = port; } else { this.sp = new SerialPort(port, { baudrate: XXXX, buffersize: 1
});
} and set XXXX to be 9600
and in StandardFirmata set the same:
Serial1.begin(9600); // Set the baud.
now Node.js speaks to Firmata no problem!!!!!!!
hope this helps someone get their Arduino Yun to speak to Firmata / Cyclon.js
Did you try other baud rates? like higher ones? seems pretty low baud rate to me, but hey if it works it works. I will update the cylon-yun docs to reflect this and also add a section specifying they need to modify the baud rate t in the firmata library itself.
great, I will play around with some more rates...
Did you noticed if the baudrate in firmata was different to the one we were setting in the modified standard-firmataATH0 file?
actually no, they were both set high (like 56k or something) but same value, so I scaled it down to 9600 and all started working, I didn't try higher up bauds...
This are the standard baud rates:
Standard baud rates supported by most serial ports: 110, 300, 600, 1200, 2400,4800,9600,14400,19200,28800,38400,56000,57600,115200
Standard baud rates supported by some serial ports: 128000, 153600, 230400, 256000, 460800, 921600
My guess is that since the serial port ATH0 (not sure if it is an actual physical port or not) is just an interface it does not support all of them, even so, the firmata lib uses kind of a the standard that most serialports support, it is weird that it locks the Linux distro.
Anyhow might be worth taking a look and experimenting some more, that way we could avoid having to modify the firmata module.
seems that only 9600 doesn't make it hang on boot... odd
It is weird, I need to test this more thoroughly, I've never seen the issue but maybe the latest distro updates introduced an issue. I'll check it out as soon as I have some time and report back.
I was never able to reproduce, but it seems changing the baudrate fixes it for the boards with that issue. I'm closing this one for now.
Hello, I am using your StandardFirmataForATH0.ino with latest firmware on Arduino Yun. It works great with Cyclon...
BUT, the problem is that after a reboot, the device will not boot Linux (maybe Linux interfaces are down).
for whatever reason, these lines are causing the problem:
Serial1.begin(57600); // Set the baud. Firmata.begin(Serial1);
but if I do it like the original file:
Firmata.begin(57600);
the Linux works fine on boot, but I can't get Firmata to work if I take that line... so it's a catch 22..
can you pleeeeeeeeeeeeeease help me,
I am already 2 days on this and I can't find a solution,
Regards,
Sean.