A
A
Anton2020-10-11 11:56:07
Arduino
Anton, 2020-10-11 11:56:07

Bluetooth module HC-05 does not transmit received data to UART?

Infrastructure:

There is a HC-05 module in Slave mode and a speed of 19200, connected to a computer via a usb <-> uart FT232L adapter, as well as to a phone via BT (Bluetooth terminal).

Faced the following problem

: From the computer, all the data goes great, and comes to the phone without problems and delays, but if I send something from the phone, then there is silence on the computer, I watched the TX module oscilloscope, there is silence (high level) when sending data from phone to computer

But some messages from the phone do not disappear, they are accumulated in a certain amount in the HC-05 buffer and are periodically sent to the computer, with an incoming message from the computer.

The HC-05 settings are as follows:

AT+DISC\r\n

AT+ORGL\r\n

AT+RMAAD\r\n

AT+NAME=TNC_MODEM_192\r\n

AT+ROLE=0\r\n

AT+UART=19200,0,0\r\n

AT+RESET\r\n

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lonelymyp, 2020-10-12
@lonelymyp

Have you tried different apps on your phone?
It seems to me that this is more likely to work in an application that transmits a buffer.

A
Anton, 2020-10-13
@antowkacom

Tried different ones, including self-written. I also tried to set different speeds for UART from 2400 to 115000.
Interestingly, incoming bluetooth messages are not read out of the module buffer entirely for any incoming, but exactly as many bytes as were transferred from the computer.
For example, it was sent via BT from the phone: 123456789, the module accepted, but nothing went to the computer.
Then I send ABC from the computer, immediately after sending I receive message 123 on the computer,
then I send ABC again and again I get 456 on the computer, etc. until the message ends. I made a temporary solution, with MK sending a ping from zeros to the maximum allowable length of the incoming command every 1 second, thus everything is subtracted from the module, a crooked solution of course.
I could assume that the module is defective, but at the same time, the command works clearly in AT mode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question