I would like to program an app where I can read live data from an ODB2 ELM327 BLE connector. For this use the BluetoothLE plugin. I already get a connection, but I don’t know where and how to send my “AT” command to get live data.
On which service and characteristic do I have to send the command?
Do I need to send the command with write?
What should the command look like (hexadecimal, etc)?
I assume you’re talking about a Capacitor app and this plugin.
Generally you should check the documentation of your peripheral device about it’s Bluetooth interface. The services and characteristics will be different for each device.
If you don’t have the documentation, you can use getServices (after connecting) to get a list of all services of a device. If you’re looking for live data, you need a characteristic with notify of indicate property. This means you can use startNotifications on that characteristic and get the live data in the callback.
Here you’ll find a document with commonly used services and characteristics (16-bit UUIDs):
Furthermore nRF Connect (by Nordic) is a useful app to explore the services and charateristics of BLE devices.