johnny-five icon indicating copy to clipboard operation
johnny-five copied to clipboard

Hangup on start.

Open divanvisagie opened this issue 13 years ago • 37 comments

After starting the ready event never fires , I would blame the firmata version but its the same as what I've used in the past . Running OSX 10.8 , firmata 2.2 installed with Arduino IDE 1.0.2

1364059764367 Board Connecting... 1364059764419 Serial Found possible serial port cu.usbmodemfa1311 1364059764421 Board -> Serialport connected cu.usbmodemfa1311 (get stuck here)

Firmata is working , tested using Firmata Test OSX app

however the JS version if firmata seems to not work as well so the problem may lie with firmata.js.

divanvisagie avatar Mar 23 '13 17:03 divanvisagie

Crisis seems to be resolved:

Steps taken:

drop to node 0.8.x Cleaned out node_modules folder in home directory ( firmata required sudo to remove so that was probably an issue ) clean j5 install

divanvisagie avatar Mar 24 '13 10:03 divanvisagie

I'm running in to the same issue on Linux Mint Nadia (Ubuntu 12.04):

    board = new five.Board();
    board.on('ready', function() {
        console.log('does not fire');
    });

even though the Arduino Uno R3 is connected:

    Board Connecting... 
    Serial Found possible serial port ttyACM0
    Board -> Serialport connected ttyACM0

I've tried different Arduino IDE versions and am running StandardFirmata. I'm currently running Arduino IDE v1.02 since that version has worked for me in the past. I've set permissions on the device--i.e. sudo chmod a+rw /dev/ttyACM0. I even bought another Arduino board to verify I hadn't fried the board somehow.

I'm running node v0.10.2. WIll try downgrading to node 0.8.x :~(

twalker avatar Apr 02 '13 02:04 twalker

@twalker Did you try cleaning the node_modules folder first? Would be nice to narrow this problem down a bit

divanvisagie avatar Apr 02 '13 08:04 divanvisagie

Deleting node_modules doesn't fix it, and I'm running johnny-five examples from a cloned repo. No matter which led example I run with a single led light in pin 13 is:

  3 blinks..pause..2 blinks..pause..3 blinks

I'm sure that's a meaningful pattern, I should RTFM.

twalker avatar Apr 02 '13 14:04 twalker

@twalker can you list out your environment? I have:

  • OSX (10.6.8, but that's irrelevant)
  • node v0.10.0
  • Johnny-Five (master branch)
  • StandardFirmata 2.3.1 on all of my boards.

https://dl.dropbox.com/u/3531958/Firmata.tar

rwaldron avatar Apr 02 '13 15:04 rwaldron

Ok, well I upgraded to v0.10 and had the issue again , reverting to 0.8 solved it once more , so the problem seems to lie with the change in node version ( this is with both firmata 2.2 and 2.3.1 ). Interestingly the behaviour is the same as that of a board that doesn't have firmata loaded on it. Anyway I'm going to reopen this issue on the account that it doesn't always seem to work with the newer node version.

divanvisagie avatar Apr 02 '13 19:04 divanvisagie

@divanvisagie I made a mistake, running with v0.10.0 does hang on connection. I have no idea where to begin looking, but I'll report back when I know more.

rwaldron avatar Apr 02 '13 19:04 rwaldron

@rwldrn Well that explains it then , I think the problem lies in the js implementation of firmata, when I first had the problem I tried using firmata directly so that I could manually select the board , and that hung up too.

divanvisagie avatar Apr 02 '13 20:04 divanvisagie

@divanvisagie I've boiled it down to something between node-firmata (let's just call it that haha) and node-serialport, but nothing has changed in node-firmata in 7 months

rwaldron avatar Apr 02 '13 21:04 rwaldron

Thanks for the help, sorry for the delay. Here are my specs

  • Linux Mint Nadia (Ubuntu 12.04)
  • node v0.10.2
  • Arduino Uno R3
  • Johnny-Five (master branch)
  • StandardFirmata from Arduino IDE 1.02

I'll try the StandardFirmata version from your dropbox, thank you...

twalker avatar Apr 03 '13 01:04 twalker

FWIW, I had no luck with the StandardFirmata from @rwldrn above.

twalker avatar Apr 03 '13 03:04 twalker

@twalker yes, I had made a mistake in my initial diagnosis ;)

I've filed this as well: https://github.com/jgautier/firmata/issues/17

rwaldron avatar Apr 03 '13 16:04 rwaldron

@twalker , as a temporary solution you could use this https://github.com/isaacs/nave. I am also closing this issue on the account that the problem lies with node-firmata and not johnny-five.

divanvisagie avatar Apr 04 '13 16:04 divanvisagie

@divanvisagie thanks for your diligence and all around support on this, hopefully we can get firmata issues resolved soon. I have confidence in @jgautier :)

rwaldron avatar Apr 04 '13 17:04 rwaldron

@divanvisagie Thank you for pointing out nave--it's very useful. The board "ready" event is firing for me with node v0.8.17.

twalker avatar Apr 05 '13 01:04 twalker

@twalker @divanvisagie great news, @jgaultier landed my patch just now that I believe will fix this issue. https://github.com/jgautier/firmata/pull/18

I've reopened so we can get some testing going :)

rwaldron avatar Apr 05 '13 22:04 rwaldron

See also https://github.com/joyent/node/issues/5098

rwaldron avatar Apr 05 '13 22:04 rwaldron

Confirmed that this fixes the hanging issue for me and the 'ready' event is fired with v0.10.2.

jonlong avatar Apr 10 '13 14:04 jonlong

The 'ready' event is firing for me also. Thanks for the tenacity.

jenkinslight

twalker avatar Apr 10 '13 23:04 twalker

YES!!

rwaldron avatar Apr 11 '13 01:04 rwaldron