I have the HM-10 Arduino BLE module. I am also building an app to send and read characteristics on the BLE module. On the Arduino BLE side of things though, how do I set up which characteristic listens for which kind of data?

So, if the BLE module has 1 service containing two characteristics the first one being read-only and the second one being write-only. On my android app, I can find the UUIDs of these two characteristics and perform read and write operations on the corresponding characteristics. But how would I go about initializing which characteristic on the BLE module should expect which kind of operation?

All I see other people do is they perform BLE.read and BLE.write functions to accomplish this. But if you have multiple characteristics and some that can do both kinds of operations, how do you distinguish between them in the code? Does the BLE module only think of the characteristics as one entity that can either be read to or written to, whereas the android app needs to know which is which? The HM-10 documentation talks about setting up the characteristic UUID but talks about pins on the chip to control things, which is weird because the arduino already has pins that you can use.

Worst case scenario, I guess I could just look at ArduinoBlue or Dabble's arduino source code.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.