Closed gkg-7 closed 1 year ago
Is the client using a mobile phone, or an ESP32C3-MINI device?
The client is using the ESP32C3-Mini DevKit.
What is the probability of a issue occurring?
This issue occurs almost 90% of the time.
At what step does a BLE disconnect usually occur?
I have tested 10 times and still can't reproduce your problem, can you provide the AT log with timestamp?
Server side Steps:
Client side steps:
As soon as I give the At command for connection, it takes almost 5 seconds and it gets disconnected.
I have tested 10 times and still can't reproduce your problem, can you provide the AT log with timestamp? ESP32C3MINIClient_LOG [ESP32C3MINIServer_LOG.txt](https://github.com/espressif/esp-at/files/8754580/ESP32C3MINIServer_LOG.txt) .txt
I am sorry, don't have the server log with timestamp. I can get that for you in sometime.
Is your BLE environment very complicated? From the log, the scanned BLE server rssi is -67. Frequent disconnections should be related to this .
This is the server log with timestamp. ESP32C3MINIServer_LOG_Timestamp.txt
Is your BLE environment very complicated? From the log, the scanned BLE server rssi is -67. Frequent disconnections should be related to this .
Can I share my BLE environment schematic? if you could go through that and let me know, it would be really helpful.
You can change to a place with less BLE devices (if it is a shielded box, it is better) to test.
Please let me know if I can share my BLE environment schematic and the gerber file, also I can show you the location where it is placed on our board.
Few weeks back we had done a schematic and gerber review from espressif, I have the report for that as well.
You can change to a place with less BLE devices (if it is a shielded box, it is better) to test.
Sure I will try that as well.
Please let me know if I can share my BLE environment schematic and the gerber file, also I can show you the location where it is placed on our board.
Few weeks back we had done a schematic and gerber review from espressif, I have the report for that as well.
Is your board not an official module from Espressif? A board of your own design?
Yes it is an official module from espressif, we have mounted that on our target board. I will share you the schematic and a picture of our board as well.
Schematic: SNM476M_Espressif review_21032022.pdf
Placement:
my personal mail id: geoffreykgeorge@gmail.com.
Could you please share your mail ID to that mail? I could share more info regarding this issue.
We have made a cutout region for the antenna.
Maybe you can set the AT+CWMODE=0 command before both devices make a BLE connection to see if the situation improves.
I have done that but the server RSSI still remains somewhere around -65 to -70 dB. Can we increase the gain with AT+RFPOWER?
We are desperately in need of a solution here. We have another part ESP32C3MINI1U with us also, what antenna should we use for this module? We are just trying different options as we are in a very critical stage of product development.
Can you help to download the firmware from the attachment and burn it to the device and test if the same disconnection issue exists? I want to see if it's a software problem. ESP32-C3-MINI-1_AT_Bin_V2.3.0.0 (4).zip
Okay sure I will try that now.
5/24/2022 12:48:58 [RX] - AT+BLESCAN=1,1
I changed some configuration in the attached temporary test firmware, can you help me test this firmware again? factory.zip
Yes, sorry for the late reply. I am trying this firmware in my end now.
I have tried this as well.
5/25/2022 15:44:54 [TX] - AT+BLESCAN=1,1
5/25/2022 15:44:54 [RX] - AT+BLESCAN=1,1
5/25/2022 15:55:18 [RX] - AT+BLESCAN=1,1
Hi, I am very sorry, I would like to confirm one thing again, regarding your pcb design you have gone through this channel (https://www.espressif.com/en/contact-us/circuit-schematic-pcb-design-review ) Has it been reviewed at Espressif? I would like to ask you abruptly, are you currently working in China? If so, can you send us a board? After the issue is solved, it will be returned to you.
Yes we had done a review by espressif but not through the channel you mentioned here. We had sent our files to your Indian vendor RaByte and they had forwarded the things to you for review. We are from Trimble, India. We are not from China. Yes we can send the board to you.
I am sorry just to confirm again, did your hardware team receive any documents from your Indian Vendor RaByte? I am attaching the review report by espressif here: #2295_【Trimble Mobility】Hardware Review Report_202202330_EN.pdf
Yes we had done a review by espressif but not through the channel you mentioned here. We had sent our files to your Indian vendor RaByte and they had forwarded the things to you for review. We are from Trimble, India. We are not from China. Yes we can send the board to you.
I am sorry just to confirm again, did your hardware team receive any documents from your Indian Vendor RaByte? I am attaching the review report by espressif here: #2295_【Trimble Mobility】Hardware Review Report_202202330_EN.pdf
I'm not sure about this, maybe you can confirm this with Indian vendor RaByte. If you are not in China, mailing boards back and forth can take a lot of time. You can purchase a packet capture network card online, and then view the packet capture tutorial. Then provide BLE disconnected packets?
We can send a board for you to test and provide a solution. Meanwhile could you help us with doing a review of our hardware design and the module placement? So that we know that the performance issue is not caused because of that. We at this point can't do a re-spin, is there any way espressif can tune or customize a firmware for good performance with the current design? In production we have a huge target. Please help us here.
On the other hand, we haven't used the Packet capture network card, so its actually new to us.
We can send a board for you to test and provide a solution. Meanwhile could you help us with doing a review of our hardware design and the module placement? So that we know that the performance issue is not caused because of that. We at this point can't do a re-spin, is there any way espressif can tune or customize a firmware for good performance with the current design? In production we have a huge target. Please help us here.
On the other hand, we haven't used the Packet capture network card, so its actually new to us.
Can you help to download the BLE demo (ble_connect_demo.zip) test in the attachment to see if the BLE connection will be disconnected? For the burning method, please refer to the flash_args file in the attachment.
Sure, I will test at my end and let you know.
Maybe you have tested the connection function of ESPAT BLE with ESP32-C3-DevKitM-1 development board, what is the result?
Yes I have tested ESP-AT with the Dev Kit. It doesn't disconnect at all. It works perfectly.
We can send a board for you to test and provide a solution. Meanwhile could you help us with doing a review of our hardware design and the module placement? So that we know that the performance issue is not caused because of that. We at this point can't do a re-spin, is there any way espressif can tune or customize a firmware for good performance with the current design? In production we have a huge target. Please help us here. On the other hand, we haven't used the Packet capture network card, so its actually new to us.
Can you help to download the BLE demo (ble_connect_demo.zip) test in the attachment to see if the BLE connection will be disconnected? For the burning method, please refer to the flash_args file in the attachment.
I have flashed this BLE demo firmware into the board. But its is not discoverable when BLE scanning is done on the client side.
I have tested once more with your AT version:2.4.0.0(4c6eb5e - ESP32C3 - May 20 2022 03:11:59), SDK version:qa-test-v4.3.3-20220423,compile time(5641e0a):May 20 2022 11:13:44, Bin version:2.4.0(MINI-1) firmware.
I have attached the log here. The server gets connected and operates well and then later has disconnection issue in a similar RSSI level. As you can see in this log the server gets connected to the client in -45 dB and operates well exchanging data but gets disconnected in the same RSSI level for another instance. ESP32MINIClient_LOG_Timestamp.txt
I think I have found out the reason why these disconnections happen. Scenario:
Steps to test:
Please let me know if you see a similar issue here.
Can you send me the AT command sequence to reproduce the issue? When the device is disconnected without exiting SPP, it will automatically reconnect,the relevant configuration see AT+BLESPPCFG command (https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/BLE_AT_Commands.html#at-blesppcfg-query-set-bluetooth-le-spp-parameter)
So to end the SPP mode, I should send "+++"?
Can you send me the AT command sequence to reproduce the issue? When the device is disconnected without exiting SPP, it will automatically reconnect,the relevant configuration see AT+BLESPPCFG command (https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/BLE_AT_Commands.html#at-blesppcfg-query-set-bluetooth-le-spp-parameter)
I have mentioned the steps to reproduce the issue above, I am putting it here once again, Steps to test:
So to end the SPP mode, I should send "+++"?
When sending a packet containing only +++, the device exits SPP mode and returns to normal command mode. Please wait at least one second before sending the next AT command.
Can you send me the AT command sequence to reproduce the issue? When the device is disconnected without exiting SPP, it will automatically reconnect,the relevant configuration see AT+BLESPPCFG command (https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/BLE_AT_Commands.html#at-blesppcfg-query-set-bluetooth-le-spp-parameter)
I have mentioned the steps to reproduce the issue above, I am putting it here once again, Steps to test:
- Initialize one ESP32C3 as your server and one as your client.
- Make the connection.
- Enable the SPP connection and transfer some data and then immediately reset or shutdown any of those modules.
Hi, I have seen your reproduction steps, I am not sure if I understand exactly what you are trying to express. If I didn't understand wrong you meant to express that resetting or shutting down the module (either server or client) while the server or client is not out of SPP mode will cause the BLE connection to be disconnected right? If my understanding is correct, probably this BLE disconnect is a normal behavior. If I'm wrong, could you please tell me more about what steps you took and what you expected in the end, but what would actually happen?
So to end the SPP mode, I should send "+++"?
When sending a packet containing only +++, the device exits SPP mode and returns to normal command mode. Please wait at least one second before sending the next AT command.
I tried sending +++\r\n and it did not exit from the SPP, I sent this command from the client side. Anything else is required while sending the "+++"?
So to end the SPP mode, I should send "+++"?
When sending a packet containing only +++, the device exits SPP mode and returns to normal command mode. Please wait at least one second before sending the next AT command.
I tried sending +++\r\n and it did not exit from the SPP, I sent this command from the client side. Anything else is required while sending the "+++"?
You should send '+++' instead of '+++\r\n'(https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/TCP-IP_AT_Commands.html#data-mode-only-exit-from-data-mode).
Can you send me the AT command sequence to reproduce the issue? When the device is disconnected without exiting SPP, it will automatically reconnect,the relevant configuration see AT+BLESPPCFG command (https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/BLE_AT_Commands.html#at-blesppcfg-query-set-bluetooth-le-spp-parameter)
I have mentioned the steps to reproduce the issue above, I am putting it here once again, Steps to test:
- Initialize one ESP32C3 as your server and one as your client.
- Make the connection.
- Enable the SPP connection and transfer some data and then immediately reset or shutdown any of those modules.
Hi, I have seen your reproduction steps, I am not sure if I understand exactly what you are trying to express. If I didn't understand wrong you meant to express that resetting or shutting down the module (either server or client) while the server or client is not out of SPP mode will cause the BLE connection to be disconnected right? If my understanding is correct, probably this BLE disconnect is a normal behavior. If I'm wrong, could you please tell me more about what steps you took and what you expected in the end, but what would actually happen?
Yes you understood it right. The BLE disconnects when shutdown or reset during the SPP mode. The issue I am facing is that, it disconnects in every 5 seconds of connection attempts after it's disconnected once from the reset or shutdown. I mean to say that once it gets exited from the SPP mode with a abrupt shutdown or reset, it is not able to connect in subsequent attempts.
So to end the SPP mode, I should send "+++"?
When sending a packet containing only +++, the device exits SPP mode and returns to normal command mode. Please wait at least one second before sending the next AT command.
I tried sending +++\r\n and it did not exit from the SPP, I sent this command from the client side. Anything else is required while sending the "+++"?
You should send '+++' instead of '+++\r\n'(https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/TCP-IP_AT_Commands.html#data-mode-only-exit-from-data-mode).
This worked. Thanks.
What is the ideal RSSI value for a module with both Wifi and BLE ON?
What is the ideal RSSI value for a module with both Wifi and BLE ON?
Maybe you can open an issue again.
Sure, I'll do that. But have you tested my scenario at your end?
I have configured one ESP32C3-Mini as the server and one on the DevKit as the client. When I try to connect it gets connected but disconnects in less than 5 seconds. But sometimes it doesn't disconnect and allows me to do my project. Due to the frequent disconnection and the unstable behavior, I am not able to proceed to the next step.