ESP32-MiniWebRadio icon indicating copy to clipboard operation
ESP32-MiniWebRadio copied to clipboard

Bluetooth problems

Open valera39 opened this issue 1 year ago • 7 comments

Hello Dear Wolle! I still continue to have problems identifying the bluetooth module. BT-Emitter: KCX_BT_Emitter not found. Accordingly, the buttons on the display and on the page do not work. I replaced the module with another one from radio version 3.4 where everything works fine, but in this version it is also not detected. And what is interesting, if I turn on the bluetooth headphones, they connect to the radio and there is a broadcast of sound from the radio. But all the buttons are still not active. What do you think?

valera39 avatar Oct 22 '24 18:10 valera39

Hi valera, this is probably the same problem as #524. I have no idea what is causing this. The KCX_BT_Emitter has its own library. I have now added an internal pull-up image KCX_BT_Emitter.cpp It is conceivable that UART will behave differently in the new IDF V5. Alternatively, could a 10KOhm resistor or greater on the TX and RX pin help?

schreibfaul1 avatar Oct 22 '24 18:10 schreibfaul1

According to the schematic, I have 4.7k resistors. But I also tried without them, but still the module is not visible

valera39 avatar Oct 22 '24 19:10 valera39

Yes, that was rubbish with the resistors. But I still have no idea what the cause is. It's like searching in the fog. I now clear the buffer of the serial interface after the start to remove any existing characters. Hope it helps. If not, please enter btp in the terminal. This will generate a protocol of the serial interface. It should look like this. Maybe it's different for you? image

It is important that the first command is "AT+" and the response is "OK+". Thank you for your help.

schreibfaul1 avatar Oct 23 '24 05:10 schreibfaul1

I applied your latest updates and the bluetooth module is detected. I don't quite understand how to enter commands in the terminal, please explain the sequence of my actions in detail.

I open a terminal window, write "btp" and the response is that the command does not exist. Or is it necessary to write the command in the serial monitor window?

I'll continue testing

valera39 avatar Oct 23 '24 11:10 valera39

Hello Wolle and Valera,

For a while, i thought i was going crazy.

Just a quick update... By the way, My Shematic shows two 47K instead of a 4.7k Presently my board has those two resistors installed. i downloaded Version 3.5k - Oct 23/2024 did a FULL CLEAN, ERASE FLASH and UPLOAD in KCX_BT_Emitter.cpp around line 52 i dont see a INPUT_PULLUP. (Probably my eyesight) Once compiled, the BT button is active (so far so good) Power off / Power on the unit, BT button disabled. (Similar problem)

Thanks Wolle, i wish i could help a lot more.

ve2cfb avatar Oct 23 '24 19:10 ve2cfb

ve2cfb,I made a mistake, just put the comma wrong :), of course 47 kOhm.

valera39 avatar Oct 23 '24 20:10 valera39

@valera39 There is no input field in the terminal. You simply click with the mouse on the serial terminal and then type the letters btp for "blue tooth protocol" You cannot see the input, but the terminal responds when you press enter.

schreibfaul1 avatar Oct 23 '24 20:10 schreibfaul1

Hello Wolle, Just wandering... Is the BT problem fixed...? did i missed something ?

Thanks again.

ve2cfb avatar Oct 31 '24 11:10 ve2cfb

There have been some changes in the KCX_BT_Emitter library to make the UART interface more stable. In addition, the receive buffer is cleared before the first commands are sent. This entry should appear in the log a few seconds after the start: image If this does not happen, you could reset the BT emitter by pressing and holding the button. Perhaps the baud rate has changed and is preventing communication.

schreibfaul1 avatar Oct 31 '24 18:10 schreibfaul1

I have version 1.7 written on the module, but in the terminal the module is defined as V 1.4. Is this normal?

valera39 avatar Oct 31 '24 19:10 valera39

You must mean this: image I have two boards. V1.7 is printed on them and 1.4 is read from the chip. Is the BT_Emitter running reliably or are you having similar problems to ve2cfb?

schreibfaul1 avatar Oct 31 '24 19:10 schreibfaul1

I too have two boards version 1.7 and both are detected as 1.4. Another module should be arriving soon, I'll see how it is detected. I have one module in radio version 3.4 and one in radio version 3.5. The one in the receiver 3.4 subjectively evaluating works more stable.

valera39 avatar Oct 31 '24 19:10 valera39

Hello Wolle,

i cannot figure out the following... Using the web application, when trying to add stations from Germany, the stations list is still empty. I did check other Country and no problem there... Go figure.

Have a nice day.

ve2cfb avatar Nov 01 '24 19:11 ve2cfb

That is strange. The function only runs in the browser using JS. I simply query the database. You can also do this by typing https://de1.api.radio-browser.info/json/countries#name into your browser. I have now changed the sorting criterion. First comes the country code, then the country name.

image

Maybe that will solve your problem with "DE"

schreibfaul1 avatar Nov 02 '24 11:11 schreibfaul1

Hello Wolle, It is a lot better. Now i am able to get Germany. it worked 20 times and failed 2 times.

Concerning the BT button problem, here is the message from the BTP command when problem exist..

---- Opened the serial port COM15 ---- ---- Sent utf8 encoded message: "btp" ---- 15:29:56 Terminal : btp [604490][E][main.cpp:2771] loop(): TX: AT+ [604498][E][main.cpp:2771] loop(): TX: AT+ADDLINKADD=263510091300 [604505][E][main.cpp:2771] loop(): TX: AT+VMLINK? [604510][E][main.cpp:2771] loop(): TX: AT+VMLINK? [604516][E][main.cpp:2771] loop(): TX: AT+RESET [604521][E][main.cpp:2771] loop(): TX: AT+RESET 15:30:10 click on .. backpane 15:30:11 click on .. backpane

Many thanks...

ve2cfb avatar Nov 02 '24 14:11 ve2cfb

Thank you for the protocol. It can be seen that the BT emitter is not responding. The UART interface has been changed with the new IDF version V5. I will stay on the subject.

schreibfaul1 avatar Nov 02 '24 18:11 schreibfaul1

Confirmed, the bluetooth module is not detected You can only enable the module from the settings page in your browser, everything changes after reloading. The function of the lilac bluetooth icon button on the display next to the off icon is unclear. It is inactive and does not respond to presses

valera39 avatar Nov 03 '24 17:11 valera39

I have noticed that the UART interface (Serial2) is not operated as long as a connection to a radio station is being established. It takes even longer for encrypted connections. If the BT emitter responds during this time, the information is lost. I have no idea why this is the case. Now the BT emitter is requested afterwards and that works better.

schreibfaul1 avatar Nov 03 '24 21:11 schreibfaul1

It looks like you've defeated the bluetooth module detection issue, but the module's current state settings are not saved after a reboot

valera39 avatar Nov 07 '24 09:11 valera39

Right, I don't have the BT mode (RX/TX) in the settings.json yet. I'll catch up on that soon.

schreibfaul1 avatar Nov 11 '24 17:11 schreibfaul1

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Dec 12 '24 02:12 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Dec 27 '24 02:12 github-actions[bot]