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

Crashing on scan / connect loop (OSX) #91

Open
matti777 opened this issue Jun 16, 2017 · 2 comments
Open

Crashing on scan / connect loop (OSX) #91

matti777 opened this issue Jun 16, 2017 · 2 comments

Comments

@matti777
Copy link

Hi, am trying to extend the Explorer example to print out the Manufacturer name Characteristic of the Primary Service of each device. However the library is quickly crashing to the following (or similar):

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x43887c6]

goroutine 17 [running, locked to thread]:
github.com/paypal/gatt.(*device).HandleXpcEvent(0xc420076200, 0xc420236c90, 0x0, 0x0)
	/Users/matti/go/src/github.com/paypal/gatt/device_darwin.go:456 +0xe66
github.com/paypal/gatt/xpc.handleXpcEvent(0x4a00020, 0x4b002f0)
	/Users/matti/go/src/github.com/paypal/gatt/xpc/xpc_darwin.go:200 +0x209
github.com/paypal/gatt/xpc._cgoexpwrap_9c8af0d8d6e4_handleXpcEvent(0x4a00020, 0x4b002f0)
	github.com/paypal/gatt/xpc/_obj/_cgo_gotypes.go:458 +0x35

My main difference is Im not calling StopScanning() but instead trying to connect to each device as soon it is discovered and then extracting the manufacturer name. I would prefer not to connect but I assume it is mandatory for accessing the Characteristics? I am not familiar with BLE that well.

@matti777
Copy link
Author

Hmm so apparently this project is dead in the water. The lib seems highly unstable at least on OSX, so I am forced to look for alternatives. Anyone have nice suggestions? I plan to run the app on OSX, Desktop linux as well as Raspberry Pi so those platforms / architectures should be supported..

@mikevoyt
Copy link
Contributor

@matti777 take a look at this comment:
#75 (comment)

The new project is here: https://github.com/currantlabs/ble

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

2 participants