hybridgroup / gobot

Golang framework for robotics, drones, and the Internet of Things (IoT)
https://gobot.io
Other
8.88k stars 1.04k forks source link

[question, ble] go ble-serial #987

Open vlappa opened 1 year ago

vlappa commented 1 year ago

Hi, I want to make something like this, but then in Go: https://github.com/Jakeler/ble-serial/blob/a429060faf6dfe38615af28712afa8ee4ef271fd/examples/ble_standalone.py#L5

Is it possible with this library? Any examples available for using the SerialPort?

What are address, rid and tid here? https://github.com/hybridgroup/gobot/blob/v2.1.1/platforms/ble/serial_port.go#L19

Or is there a better way to get data from bluetooth (using Linux)?

gen2thomas commented 1 year ago

Hi @vlappa , because the feature is inspired by https://github.com/monteslu/ble-serial, I assume the rid and tid are optional values for "transmitCharacteristic" and "receiveCharacteristic". See also the comment for Subscribe - usage of "rid" and the name of the write methode - usage of tid.

Hope this helps

gen2thomas commented 7 months ago

Please refer now to examples with usage of bleclient and serialport.