How to send "AT" commands over Ionic(Angular)?

Hello,
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.

  1. On which service and characteristic do I have to send the command?
  2. Do I need to send the command with write?
  3. 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.

1 Like

Hello thank you for you helpful answer. Is there any app where I can connect with my OBD an see wich service are using the livedata

{
   "status":"discovered",
   "services":[
      {
         "characteristics":[
            {
               "descriptors":[
                  {
                     "uuid":"2902"
                  }
               ],
               "properties":{
                  "notify":true,
                  "indicate":true
               },
               "uuid":"2AF0"
            },
            {
               "descriptors":[
                  
               ],
               "properties":{
                  "writeWithoutResponse":true,
                  "write":true
               },
               "uuid":"2AF1"
            }
         ],
         "uuid":"18F0"
      },
      {
         "characteristics":[
            {
               "descriptors":[
                  
               ],
               "properties":{
                  "read":true
               },
               "uuid":"2A25"
            },
            {
               "descriptors":[
                  
               ],
               "properties":{
                  "read":true
               },
               "uuid":"2A28"
            },
            {
               "descriptors":[
                  
               ],
               "properties":{
                  "read":true
               },
               "uuid":"2A27"
            },
            {
               "descriptors":[
                  
               ],
               "properties":{
                  "read":true
               },
               "uuid":"2A29"
            },
            {
               "descriptors":[
                  
               ],
               "properties":{
                  "read":true
               },
               "uuid":"2A24"
            }
         ],
         "uuid":"180A"
      },
      {
         "characteristics":[
            {
               "descriptors":[
                  {
                     "uuid":"2902"
                  }
               ],
               "properties":{
                  "notify":true,
                  "write":true,
                  "indicate":true,
                  "read":true,
                  "writeWithoutResponse":true
               },
               "uuid":"BEF8D6C9-9C21-4C9E-B632-BD58C1009F9F"
            }
         ],
         "uuid":"E7810A71-73AE-499D-8C15-FAA9AEF0C3F2"
      }
   ],
   "name":"IOS-Vlink",
   "address":"4604371B-25B3-C1A0-E6BA-A43EDD56EC17"
}

on the BluetoothLE there is no startNotification, so I tried with subscribe. But I get no value. I tried with Service: 18F0 and Charateristic: 2AF0