Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advertising not starting in macos Mojave #416

Open
adotg opened this issue Oct 6, 2018 · 10 comments
Open

Advertising not starting in macos Mojave #416

adotg opened this issue Oct 6, 2018 · 10 comments

Comments

@adotg
Copy link

adotg commented Oct 6, 2018

Using bleno as sandalone module to mock a peripheral

Steps of running:

  • clone the repo
  • Navigate inside bleno/examples/echo
  • node main.js

Console shows on -> stateChange: poweredOn but on -> advertisingStart: success not coming.

Debug log

bleno - echo
  bleno platform darwin +0ms
  bleno addressChange 8c:85:90:64:f0:b4 +3ms
  highsierra-bindings sendCBMsg: 1, {
  highsierra-bindings   "kCBMsgArgName": "node-1538851048987",
  highsierra-bindings   "kCBMsgArgOptions": {
  highsierra-bindings     "kCBInitOptionShowPowerAlert": 1
  highsierra-bindings   },
  highsierra-bindings   "kCBMsgArgType": 1
  highsierra-bindings } +0ms
  highsierra-bindings xpcEvent: {
  highsierra-bindings   "kCBMsgId": 4,
  highsierra-bindings   "kCBMsgArgs": {
  highsierra-bindings     "kCBMsgArgState": 5
  highsierra-bindings   }
  highsierra-bindings } +1ms
  highsierra-bindings state change poweredOn +0ms
  bleno stateChange poweredOn +2ms
on -> stateChange: poweredOn
startAdv { kCBAdvDataLocalName: 'echo',
  kCBAdvDataServiceUUIDs: [ <Buffer ec 00> ] }
  highsierra-bindings sendCBMsg: 16, {
  highsierra-bindings   "kCBAdvDataLocalName": "echo",
  highsierra-bindings   "kCBAdvDataServiceUUIDs": [
  highsierra-bindings     {
  highsierra-bindings       "type": "Buffer",
  highsierra-bindings       "data": [
  highsierra-bindings         236,
  highsierra-bindings         0
  highsierra-bindings       ]
  highsierra-bindings     }
  highsierra-bindings   ]
  highsierra-bindings } +3ms

Environment MacOS Mojave version 10.14

@jwheatp
Copy link

jwheatp commented Oct 6, 2018

Seems to be the same as #404 . The solution given there did not work for me, but maybe you can try.

@rafaelbuiu
Copy link

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

@LukasBombach
Copy link

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: LukasBombach/de1-emulator@6d31cd4

@charliegerard
Copy link

charliegerard commented Jul 11, 2019

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) :)

@LukasBombach
Copy link

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

@farfromrefug
Copy link

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"
    }

@farfromrefug
Copy link

@LukasBombach BTW would love to help you make a new bleno plugin like you did with noble. Let me know if i can help

@LukasBombach
Copy link

@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.

@farfromrefug
Copy link

@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

@LukasBombach
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants