Cyton Simulate EPIPE Error

michaeljobmichaeljob Basel, CH
edited July 2018 in Software
After successfully working with hardware and simulated Cyton Board, I now have the following problem: If I run the board with simulate: true in a specific setup, where the sample data gets put into a python script from node.js; the simulated board seems to be disconnecting itself. Funny thought that the exact same software runs on my friends Windows 10. On my MacBookAir (mid 2012) macOS 10.12.6 with node 9.10.1 npm 5.6.0 python 3.6 the sim-board disconnects giving the following error:
$$$
Error: write EPIPE 443
    at _errnoException (util.js:1022:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:880:14)
exit
stop streaming
Serial Port Closed 451
Error: write EPIPE
    at _errnoException (util.js:1022:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:880:14)
exit
Error: no board connected
    at Promise.resolve.then.then (/Users/mjair/Documents/GitHub/OpenBCI_NodeJS_IP6/node_modules/openbci-cyton/openBCICyton.js:388:31)
    at <anonymous>
    at Immediate._tickCallback (internal/process/next_tick.js:188:7)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
Error: write EPIPE
    at _errnoException (util.js:1022:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:880:14)
exit
####
I tried lower (8.9.4) and higher (10.6.0) node.js versions and npm rebuild, nothing helps.
If I uncomment the pyshell script it works, but this does not seem to be the root cause, as the pyshell script works this way on my friends Win10 machine.
Also, if I run the board simulator with other node.js scripts, it does not fail.
Does anybody have a clue what this could be about? Thanks

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Michael, hi.

    Can you clarify, what do you mean by 'simulated' Cyton board?

    Thanks,

    William

  • michaeljobmichaeljob Basel, CH
    Hi William, when you start / initialize the board, there is a boolean: simulate, which can be set to true, so that sample data are generated by random, for testing. But actually the board also stops when simulate is false and I use the hardware. So this is a minor detail. Just wanted to point out that it has nothing to do with the hardware wireless transmitter and board itself. best regards, Michael
  • wjcroftwjcroft Mount Shasta, CA
    (1) so your Cyton works fine with the OpenBCI_GUI, but not with not with OpenBCI_NodeJS_IP6 (both true and false 'simulate' mode)?
    (2) the simulation function is performed by the NodeJS, so the errors you are seeing are really that and not Cyton hardware related.
    (3) it appears that your NodeJS_IP6 was derived from OpenBCI_NodeJS_Cyton, does it also fail with the official OpenBCI version?


    (4) have you contacted the IP6 developer about the issue with their code?
    (5) if the issue is also present in the official OpenBCI version, you can log the issue here.


    Thanks,

    William

  • michaeljobmichaeljob Basel, CH
    Hi William,
    thank you so much for the answer.
    1) the Cyton works fine in all versions except in my IP6 project "npm run mind" on my mac! (this does run on win10)
    2) yes, hardware is fine as it works in all other scenarios
    3) as it is running in IP6 with for example "npm run blink" I guess it would work for sure in the original source
    4) ;-) I am the developer. Together with the gitowner of IP6
    5) would do so, but will not be the case, thx
    Will keep this thread updated if I resolve the issue.
  • wjcroftwjcroft Mount Shasta, CA
    I suggest testing with the original OpenBCI_NodeJS_Cyton on your Mac, to see if the problem is present in the original code. If that code works fine, then the bug would appear to be in your IP6 variant.

    Regards,

  • michaeljobmichaeljob Basel, CH
    with OpenBCI_NodeJS_Cyton is runs; the bug is in our IP6 variant, what I find curious that it works on one machine (win) and not on the other (mac) - I guess the various python conda env. have something to do with it; as for now hardware and node.js sw can be ruled out - thanks a lot
Sign In or Register to comment.