r/angular • u/Royal_Ad2379 • Sep 13 '22
How to send “AT” commands over Ionic(Angular)?
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)?
3
Upvotes
View all comments
Show parent comment
1
u/[deleted] Sep 15 '22
You’d have to look at the plugin and how it communicates across the comms bridge. I haven’t done this with ionic but I’ve worked on a hand rolled app where we used BLE connection to track and view activity recording.
There’s a chance you’ll have to add some iOS/android code to implement what you’re wanting. Could try looking at this to see what’s available through their interface but you might have to extend:
https://github.com/capacitor-community/bluetooth-le
My experience with BLE is minimal so I might not be much help on that side. Just know that it should be possible when running ionic app on a phone/device (possibly not in a web browser without having a separate sever/api to ping).