freehaha / myo4l

node module to access myo without the myo dongle
9 stars 3 forks source link

Cannot connect #1

Open ScarletStar opened 9 years ago

ScarletStar commented 9 years ago

When I execute ws.js the console only shows "Server On" but never goes beyond this. What could be the problem?

Also when I scan for devices I see one with the name of my Myo and one undefined device with the same address:

sudo hcitool lescan LE Scan ... FF:9C:8D:93:7C:E0 PiMyo FF:9C:8D:93:7C:E0 (unknown)

Is that normal?

freehaha commented 9 years ago

sorry for the late response.. I've just updated the library to use the newest noble so please update the package first. Also, what command do you use to run the server? is it node ws.js PiMyo ?

Also, it's normal for the myo device to have two.

ScarletStar commented 9 years ago

I redownloaded the code in a new directory and set up with the latest noble from npm, but it still does not work. Same behavior as before.

I use sudo node ws.js PiMyo since I did not understand how to use this find -path '*noble*Release/hci-ble' -exec sudo setcap cap_net_raw+eip '{}' \; snippet.

freehaha commented 8 years ago

Hi are you still having trouble with this? sorry I haven't been active in this project in the last few months but it still work for me. If your device is indeed detecting your myo you can probably check the code around

index.coffee:253 where it says if peri.advertisement.localName.substring(0, len - 1) == @devName

in my case the name of my MYO contains a special, unidentified character at the end, which is why I use len-1 here but it could be just my case so you can probably play around this and see what's going on. Make sure you recompile the coffeescript to javascript if you are not currently using coffee to run the ws server.

ScarletStar commented 8 years ago

Hello,

I finished my project already and don't have the myo anymore to test this. Thanks though. It might help someone else.