wifi and ble not reliable on esp32-c3 port
-
- Posts: 9
- Joined: Tue May 03, 2022 9:56 am
wifi and ble not reliable on esp32-c3 port
i have tried using firmware version 1.18 and the latest version 1.19.1 on esp32-c3 port(currently i have ai-thinker and liligo ttgo-oi-plus). in my experience wifi and ble function not reliable.when using ble ,sometime it won't function after connect and disconnect cycle.when using utfpd on wifi connection,it can only can transfer 1kb of data and then not responding.the program i have written works flawlessly on esp32 port(tested on lolin32 lite and mh-et live board). any advice on these case?
Re: wifi and ble not reliable on esp32-c3 port
Sounds abnormal. What about the other features of the board? Can you upload codes to it?
Re: wifi and ble not reliable on esp32-c3 port
The BLE support on ESP32C* and ESP32S* is somewhat experimental at the moment. I have recently acquired some C3 and S3 boards and will try to do some testing.puppet13th wrote: ↑Tue Jul 12, 2022 7:46 amin my experience wifi and ble function not reliable.when using ble ,sometime it won't function after connect and disconnect cycle.when using utfpd on wifi connection,it can only can transfer 1kb of data and then not responding.the program i have written works flawlessly on esp32 port(tested on lolin32 lite and mh-et live board). any advice on these case?
See also https://github.com/micropython/micropyt ... 1154564382
-
- Posts: 9
- Joined: Tue May 03, 2022 9:56 am
Re: wifi and ble not reliable on esp32-c3 port
please check attached file.
error output when running the code:
Code: Select all
connection time : 1122
min: 413 mean: 1223 max: 2424 connect delay: 3000
ct: 20 cd: 19 cf: 1
connection time : 1142
min: 413 mean: 1219 max: 2424 connect delay: 3000
Traceback (most recent call last):
File "<stdin>", line 177, in <module>
File "uasyncio/core.py", line 1, in run
File "uasyncio/core.py", line 1, in run_until_complete
File "uasyncio/core.py", line 1, in run_until_complete
File "<stdin>", line 168, in main_loop
File "<stdin>", line 102, in disconnect_all_devices
File "<stdin>", line 95, in disconnect
OSError: -128
>>> %Run -c $EDITOR_CONTENT
ct: 1 cd: 0 cf: 1
ct: 2 cd: 0 cf: 2
ct: 3 cd: 0 cf: 3
the code run flawlessly on esp32 though.
- Attachments
-
- ble_bench2.zip
- (1.67 KiB) Downloaded 540 times
-
- Posts: 9
- Joined: Tue May 03, 2022 9:56 am
Re: wifi and ble not reliable on esp32-c3 port
there is no issues when running the code on esp32 port.jimmo wrote: ↑Tue Jul 12, 2022 11:44 amThe BLE support on ESP32C* and ESP32S* is somewhat experimental at the moment. I have recently acquired some C3 and S3 boards and will try to do some testing.puppet13th wrote: ↑Tue Jul 12, 2022 7:46 amin my experience wifi and ble function not reliable.when using ble ,sometime it won't function after connect and disconnect cycle.when using utfpd on wifi connection,it can only can transfer 1kb of data and then not responding.the program i have written works flawlessly on esp32 port(tested on lolin32 lite and mh-et live board). any advice on these case?
See also https://github.com/micropython/micropyt ... 1154564382
aioble looks interesting,i will try i later. please test my code on your C3 board.
-
- Posts: 9
- Joined: Tue May 03, 2022 9:56 am
Re: wifi and ble not reliable on esp32-c3 port
updated test code to better describe the problem i mentioned about ble.
as for uftpd module and wifi,look like there is some error/glitch on uftpd module side.
output from esp32 port before i stopped the execution(no issue):
output from esp32-c3 port:
now this is weird part,from above output we can see that there is two 'b'f3f06b581563' connected!' and it should not happen.this event occurred randomly(please check attached file) and does not occurr in esp32 port.
maybe there is some glitch on ble_irq when combined with uasyncio.
please edit this part accordingly to your setup:
as for uftpd module and wifi,look like there is some error/glitch on uftpd module side.
output from esp32 port before i stopped the execution(no issue):
Code: Select all
- - - = = = 805 = = = - - -
b'f3f06b581563' connected! [(0, b'f3f06b581563', 1)]
min: 24 mean: 1395 max: 15974 current: 3924
b'f3f06b581563' disconnected!
try: 805 connected: 805 failed: 0 missmatch: 0
Code: Select all
- - - = = = 675 = = = - - -
b'f3f06b581563' connected! [(0, b'f3f06b581563', 1)]
min: 16 mean: 900 max: 5162 current: 467
try: 675 connected: 675 failed: 0 missmatch: 0
b'f3f06b581563' connected! [(0, b'f3f06b581563', 1), (0, b'f3f06b581563', 1)]
ble crashed!!!
try: 675 connected: 676 failed: 0 missmatch: 0
maybe there is some glitch on ble_irq when combined with uasyncio.
please edit this part accordingly to your setup:
Code: Select all
from machine import Pin
led_pin = 3
led = Pin(led_pin,Pin.OUT,value=0)
ble_addr_type = 1
ble_mac_addr = b'f3f06b581563'
- Attachments
-
- ble_bench4.zip
- code and output example
- (2.59 KiB) Downloaded 529 times
Re: wifi and ble not reliable on esp32-c3 port
Have you found a solution to this problem I am having the same issue