firmata / firmata.js

JavaScript implementation of the Firmata protocol
710 stars 147 forks source link

Timing issue, in many cases when running node firmata, it will hang #73

Closed born2net closed 9 years ago

born2net commented 9 years ago

Timing issue, in many cases when running node firmata, it will hang. Happens about 50% of the time.

See below:

I, [2014-10-24T19:25:53.682Z] INFO -- : Initializing connections. I, [2014-10-24T19:25:53.704Z] INFO -- : Initializing connection 'arduino'. D, [2014-10-24T19:25:53.714Z] DEBUG -- : Loading adaptor 'firmata'. D, [2014-10-24T19:25:56.319Z] DEBUG -- : Registering Firmata adaptor for Robot 76175 D, [2014-10-24T19:25:56.542Z] DEBUG -- : Registering i2c BlinkM driver for Robot 76175 D, [2014-10-24T19:25:57.013Z] DEBUG -- : Registering i2c HMC6352 driver for Robot 76175 D, [2014-10-24T19:25:57.048Z] DEBUG -- : Registering i2c MPL115A2 driver for Robot 76175 D, [2014-10-24T19:25:57.055Z] DEBUG -- : Registering i2c BMP180 driver for Robot 76175 D, [2014-10-24T19:25:57.058Z] DEBUG -- : Registering i2c MPU6050 driver for Robot 76175 D, [2014-10-24T19:25:57.062Z] DEBUG -- : Registering i2c LCD driver for Robot 76175 D, [2014-10-24T19:25:57.065Z] DEBUG -- : Registering i2c LSM9DS0G driver for Robot 76175 D, [2014-10-24T19:25:57.069Z] DEBUG -- : Registering i2c LSM9DS0XM driver for Robot 76175 I, [2014-10-24T19:25:57.093Z] INFO -- : Initializing devices. I, [2014-10-24T19:25:57.098Z] INFO -- : Initializing device 'led'. D, [2014-10-24T19:25:57.110Z] DEBUG -- : Loading driver 'led'. I, [2014-10-24T19:25:57.124Z] INFO -- : Initializing device 'servo'. D, [2014-10-24T19:25:57.128Z] DEBUG -- : Loading driver 'servo'. I, [2014-10-24T19:25:57.138Z] INFO -- : Initializing device 'button'. D, [2014-10-24T19:25:57.141Z] DEBUG -- : Loading driver 'button'. I, [2014-10-24T19:25:57.171Z] INFO -- : Starting connections. I, [2014-10-24T19:25:57.187Z] INFO -- : Connecting to 'arduino' on port /dev/ttyATH0.

rwaldron commented 9 years ago

What type of board are you trying to connect to? Using an UNO or Mega, I cannot reproduce this hanging behavior once, let alone 50% of the time.

rwaldron commented 9 years ago

Those look like Cylon.js logs, not Firmata.js.

born2net commented 9 years ago

I am using a latest rev. Arduino Yum with Serial1 disabled between Linux and Arduino as described here: http://cylonjs.com/documentation/platforms/yun/ so this is disabled:

ttyATH0::askfirst:/bin/ash --login

and about 1/2 the time when I reboot. the driver will not connect :(

born2net commented 9 years ago

yes but they use Firmata as the driver :(

born2net commented 9 years ago

I wouldn't mind hiring / paying someone to help me resolve this issue as I really need this to be stable and connect 100% of the time ...

rwaldron commented 9 years ago

There is nothing that Firmata.js can do about this, it's connection is handled by node-serialport

rwaldron commented 9 years ago

https://github.com/voodootikigod/node-serialport

rwaldron commented 9 years ago

cc @voodootikigod

born2net commented 9 years ago

ok tx, will post on node-serailport