Sending RAW serial data #82
Replies: 3 comments
-
Hi @TheBoogieKnight, ble-serial itself does not modify or encode the data in any way, it just forwards the bytes from/to the device file. With the handle value here the stack can resolve the service/characteristic UUIDs. That being said, ATT and GATT are part of the ble core specification, it wouldn't be Bluetooth anymore if these parts are not used. |
Beta Was this translation helpful? Give feedback.
-
Hi Jakeler and thank you so much for the reply, it's massively appreciated. I was using this library here with the Bosch Lidar (I'm using a PLR30 but others work too): https://github.com/philipptrenz/BOSCH-GLM-rangefinder Basically, it connects to the device (after it's been paired in Windows), then sends raw commands using the serial protocol such as: b'\xC0\x40\x00\xEE' (This measures distance) Then receives data back using the serial protocol. |
Beta Was this translation helpful? Give feedback.
-
Aha, now it is much clearer, when looking at the code. Keywords are RFCOMM and Serial Port Profile (SPP), that means it uses Bluetooth Classic. Let me explain this with a graphic again: As you can see, these versions are not more or less raw, protocols are just different. Changes with version 4+ are actually so big that it breaks compatibility completely. Many devices contain therefore 2 controllers (dual mode) connected to the same lower level interface. To finally answer your initial question: ble-serial focuses on the new bluetooth versions, so you can't use it with this device. Unfortunately I also don't know any good legacy library for modern platforms, it is all deprecated by now, since BT 2.0 was released in 2004. Probably the best backward compatibility has Android, maybe also iOS. Anyway I hope the infos help a bit to understand the topic and maybe finding a solution. |
Beta Was this translation helpful? Give feedback.
-
Hi there, fantastic project and I apologise in advance if this question is obvious and I'm just being dense. I have done multiple searches for this!
I'm trying to interface a Bosch LIDAR pointer with OsX (M1, Ventura). On Windows I was able to just pass it RAW serial data but all the libraries I've seen on OsX (except depreciated ones that don't work) seem to require the UUID framework which the device doesn't use. Is it possible to just send and receive RAW data using this library?
Thank you so much in advance and all the best.
Beta Was this translation helpful? Give feedback.
All reactions