muka / go-bluetooth

Golang bluetooth client based on bluez DBus interfaces
Apache License 2.0
653 stars 123 forks source link

Cannot create device object without opening Discover channel #180

Open Jakob-k opened 1 year ago

Jakob-k commented 1 year ago

I am trying to create device objects to connect to. I already know the MAC address. It works fine as long as a Discover service has been started, regardless of whether I am using the returned events from the channel or a hardcoded address. The issue is that the function for creating the device object returns nil if I use it without starting the Discover service.

Is there some sort of hidden dependency that some parameters can only be obtained through the Discover service? I have tried both NewDevice1 and NewDevice functions. Both works with Discover started but none do without it.