0
\$\begingroup\$

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. I'm 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 don't know how to access the received/sent data.

I would like to do something like:

if (data == "Hi") 
{ 
 send signal
}

I know the received data would be in HEX, but I don't even know how to access this data.

Velvet
4,9085 gold badges18 silver badges32 bronze badges
asked Aug 3, 2021 at 8:29
\$\endgroup\$

1 Answer 1

1
\$\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.

answered Aug 3, 2021 at 13:06
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.