1
\$\begingroup\$

First of all, thanks for reading this question.

I'm developing an application which involves a keypad. This keypad stores passwords and if the password matches, the ESP32 sends a signal. This part of the project is done and works well, my problem appears when i try to implement BLE.

I programmed a code to be able to change the password by the keyboard, pressing a key combination... this is done and works well, but i want to change this password via BLE. Im currently using this example.

I understand some things of this code, and i'm able to communicate, sending and receiving using a mobile APP, but i want to "play" with the data. For example, i would like to send a signal when the ESP32 receives the word "Hi", but i dont know how to acces to the received/send data. (I would like to do something like if (data == "Hi") { send signal} i know the received data would be in HEX, but i dont even know how to acces to this data.

Thank you very much.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

It sounds like you want Bluetooth to give you serial data. It can, but you need to implement a serial port service. There should be examples of this on the web. On the app side, this also needs to work with the serial port service. You might want to search for SPP (serial port profile)

The received data is not in HEX. What gave you that impression? Hexadecimal is just a way of representing numbers. 0x20 is the same as decimal 32 or binary 00100000 Hex is just a convenient way of expressing binary values.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.