Open adotg opened 6 years ago
Seems to be the same as https://github.com/noble/bleno/issues/404 . The solution given there did not work for me, but maybe you can try.
Did you guys find a solution for that? I am not able to find make it.. I have tried everything on the web. Not even an other library for creating peripherals on MacOSX
Hey guys, I made a working version, see my repo at this commit:
https://github.com/LukasBombach/de1-emulator/tree/6d31cd4fa51dbe3c0f0bf039f0bc20bebf85c326
basically you need this package.json
:
{
"dependencies": {
"bleno": "github:notjosh/bleno#inject-bindings",
"bleno-mac": "github:notjosh/bleno-mac",
"xpc-connection": "sandeepmistry/node-xpc-connection#pull/26/head"
},
"resolutions": {
"xpc-connection": "sandeepmistry/node-xpc-connection#pull/26/head"
}
}
and then you can run the echo example: https://github.com/noble/bleno/tree/master/examples/echo
See my whole commit here: https://github.com/LukasBombach/de1-emulator/commit/6d31cd4fa51dbe3c0f0bf039f0bc20bebf85c326
Thanks @LukasBombach for your version!! It works for me, but only if I switch my version of Python back to the default pre-installed one (v2.7)
I forgot node-gyp doesn't support Python 3, so it took me a while to figure out why I was still getting errors when running npm install
, so just in case someone is having an issue, make sure to check you're using Python 2.7! (python --version
) :)
I got stuck, so I started completely reimplementing Noble. You can follow my progress here:
https://github.com/LukasBombach/sblendid/
Current status: everything seems to work fine but I am developing on macOS (Mojave) only right now and I need to add support for other platforms
To anyone interested none of the solutions were working for me anymore (mostly due to versions update). I managed to update bleno-mac to make it work though.
"dependencies": {
"bleno-mac": "github:farfromrefug/bleno-mac"
}
@LukasBombach BTW would love to help you make a new bleno plugin like you did with noble. Let me know if i can help
@farfromrefug sure, thanks. BTW there is
https://github.com/notjosh/bleno-mac
which is a native implementation for bleno on macOS, not sure if that helps you. it worked for me though.
@LukasBombach yes that s what i am using (modified version though). But as it is not maintained and as i like your adpater approach i though a new plugin would be lovely :D
Of couse. For now I want to finish Sblendid first, to improve what Noble is lacking, I don't think I will put my hands on Bleno any time soon though.
Using bleno as sandalone module to mock a peripheral
Steps of running:
Console shows
on -> stateChange: poweredOn
buton -> advertisingStart: success
not coming.Debug log
Environment MacOS Mojave version 10.14