BLE Server and Client coexisting

etha890
Posts: 9
Joined: Tue Oct 23, 2018 2:27 am

Re: BLE Server and Client coexisting

Postby etha890 » Thu Dec 20, 2018 5:05 am

The same crash again with another dump....

Code: Select all

===============================================================
==================== ESP32 CORE DUMP START ====================

================== CURRENT THREAD REGISTERS ===================
pc             0x40084835       0x40084835 <r_assert_param+309>
lbeg           0x4008476d       1074284397
lend           0x40084774       1074284404
lcount         0x0      0
sar            0x4      4
ps             0x60124  393508
threadptr      <unavailable>
br             <unavailable>
scompare1      <unavailable>
acclo          <unavailable>
acchi          <unavailable>
m0             <unavailable>
m1             <unavailable>
m2             <unavailable>
m3             <unavailable>
expstate       <unavailable>
f64r_lo        <unavailable>
f64r_hi        <unavailable>
f64s           <unavailable>
fcr            <unavailable>
fsr            <unavailable>
a0             0x40046350       1074029392
a1             0x3ffe12c0       1073615552
a2             0x1      1
a3             0x0      0
a4             0x0      0
a5             0x60008054       1610645588
a6             0x3ffbdcd0       1073470672
a7             0x60008050       1610645584
a8             0x80084835       -2146940875
a9             0x3ffe12a0       1073615520
a10            0x4      4
a11            0x0      0
a12            0x6000804c       1610645580
a13            0xffffffff       -1
a14            0x0      0
a15            0xfffffffc       -4

==================== CURRENT THREAD STACK =====================
#0  0x40084835 in r_assert_param ()
Backtrace stopped: Cannot access memory at address 0x40046350

======================== THREADS INFO =========================
  Id   Target Id         Frame
  30   process 29        0x40093761 in xQueueGenericReceive (xQueue=0x3ffb79f8, pvBuffer=0x0, xTicksToWait=4294967295,                                                                 xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  29   process 28        0x40093761 in xQueueGenericReceive (xQueue=0x3ffd1240, pvBuffer=0x3ffd2670, xTicksToWait=42949                                                                67295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  28   process 27        0x40093761 in xQueueGenericReceive (xQueue=0x3ffaff64, pvBuffer=0x0, xTicksToWait=4294967295,                                                                 xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  27   process 26        0x40093761 in xQueueGenericReceive (xQueue=0x3ffb9a3c, pvBuffer=0x0, xTicksToWait=4294967295,                                                                 xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  26   process 25        0x40093761 in xQueueGenericReceive (xQueue=0x3ffd00e8, pvBuffer=0x3ffd1160, xTicksToWait=42949                                                                67295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  25   process 24        0x40093f30 in prvProcessTimerOrBlockTask (xNextExpireTime=<optimized out>, xListWasEmpty=<opti                                                                mized out>) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/timers.c:588
  24   process 23        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  23   process 22        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  22   process 21        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  21   process 20        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  20   process 19        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  19   process 18        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  18   process 17        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  17   process 16        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  16   process 15        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  15   process 14        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  14   process 13        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  13   process 12        0x40082368 in esp_crosscore_int_send (core_id=<optimized out>, reason_mask=<optimized out>) at                                                                 C:/msys32/home/EthanA/esp-idf-master/components/esp32/crosscore_int.c:104
  12   process 11        0x40093761 in xQueueGenericReceive (xQueue=0x3ffbd5f0, pvBuffer=0x3ffd0030, xTicksToWait=11, x                                                                JustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  11   process 10        0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  10   process 9         0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  9    process 8         0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  8    process 7         0x4009218e in vTaskDelay (xTicksToDelay=<optimized out>) at C:/msys32/home/EthanA/esp-idf-mast                                                                er/components/freertos/tasks.c:1484
  7    process 6         0x400d331b in esp_vApplicationIdleHook () at C:/msys32/home/EthanA/esp-idf-master/components/e                                                                sp32/freertos_hooks.c:51
  6    process 5         0x4019f1e6 in esp_pm_impl_waiti () at C:/msys32/home/EthanA/esp-idf-master/components/esp32/pm                                                                _esp32.c:487
  5    process 4         0x4000bff0 in ?? ()
  4    process 3         0x4000bff0 in ?? ()
  3    process 2         0x40093761 in xQueueGenericReceive (xQueue=0x3ffdff8c, pvBuffer=0x3ffe8e00, xTicksToWait=42949                                                                67295, xJustPeeking=0) at C:/msys32/home/EthanA/esp-idf-master/components/freertos/queue.c:1591
  2    process 1         cause_sw_intr_to_core_wrapper (core_id=0, intr_no=7) at C:/msys32/home/EthanA/esp-idf-master/c                                                                omponents/bt/bt.c:698
* 1    <main task>       0x40084835 in r_assert_param ()

======================= ALL MEMORY REGIONS ========================
Name   Address   Size   Attrs
.rtc.text 0x400c0000 0x0 RW
.rtc.dummy 0x3ff80000 0x0 RW
.rtc.force_fast 0x3ff80000 0x0 RW
.rtc_noinit 0x50000000 0x0 RW
.rtc.force_slow 0x50000000 0x0 RW
.iram0.vectors 0x40080000 0x400 R XA
.iram0.text 0x40080400 0x17b74 RWXA
.dram0.data 0x3ffbdb60 0x3b0c RW A
.noinit 0x3ffc166c 0x0 RW
.flash.rodata 0x3f400020 0x27cfc RW A
.flash.text 0x400d0018 0xd2328 R XA
.coredump.tasks.data 0x3ffb5770 0x164 RW
.coredump.tasks.data 0x3ffe1200 0x258 RW
.coredump.tasks.data 0x3ffb5fb4 0x164 RW
.coredump.tasks.data 0x3ffe35c0 0x2a0 RW
.coredump.tasks.data 0x3ffe3868 0x164 RW
.coredump.tasks.data 0x3ffe8d00 0x1bc RW
.coredump.tasks.data 0x3ffe3cd0 0x164 RW
.coredump.tasks.data 0x3ffea120 0x314 RW
.coredump.tasks.data 0x3ffb5b60 0x164 RW
.coredump.tasks.data 0x3ffe2bb0 0x2ac RW
.coredump.tasks.data 0x3ffbc4a0 0x164 RW
.coredump.tasks.data 0x3ffbc2f0 0x1a8 RW
.coredump.tasks.data 0x3ffbbd34 0x164 RW
.coredump.tasks.data 0x3ffbbba0 0x18c RW
.coredump.tasks.data 0x3ffef3f4 0x164 RW
.coredump.tasks.data 0x3ffef260 0x18c RW
.coredump.tasks.data 0x3ffecf84 0x164 RW
.coredump.tasks.data 0x3ffecdc0 0x1bc RW
.coredump.tasks.data 0x3ffd75a4 0x164 RW
.coredump.tasks.data 0x3ffd8cd0 0xb30 RW
.coredump.tasks.data 0x3ffdf680 0x164 RW
.coredump.tasks.data 0x3ffdf4f0 0x188 RW
.coredump.tasks.data 0x3ffbd6c4 0x164 RW
.coredump.tasks.data 0x3ffcfee0 0x200 RW
.coredump.tasks.data 0x3ffee41c 0x164 RW
.coredump.tasks.data 0x3ffee230 0x1e4 RW
.coredump.tasks.data 0x3fff1338 0x164 RW
.coredump.tasks.data 0x3fff11b0 0x180 RW
.coredump.tasks.data 0x3ffeee88 0x164 RW
.coredump.tasks.data 0x3ffeecf0 0x190 RW
.coredump.tasks.data 0x3ffeb050 0x164 RW
.coredump.tasks.data 0x3ffec1e0 0x184 RW
.coredump.tasks.data 0x3fff1da4 0x164 RW
.coredump.tasks.data 0x3fff1c10 0x18c RW
.coredump.tasks.data 0x3ffed8f0 0x164 RW
.coredump.tasks.data 0x3ffed760 0x188 RW
.coredump.tasks.data 0x3fff327c 0x164 RW
.coredump.tasks.data 0x3fff30f0 0x184 RW
.coredump.tasks.data 0x3fff55b4 0x164 RW
.coredump.tasks.data 0x3fff5410 0x19c RW
.coredump.tasks.data 0x3fff08cc 0x164 RW
.coredump.tasks.data 0x3fff0720 0x1a4 RW
.coredump.tasks.data 0x3ffefe60 0x164 RW
.coredump.tasks.data 0x3ffefcb0 0x1a8 RW
.coredump.tasks.data 0x3fff2810 0x164 RW
.coredump.tasks.data 0x3fff2660 0x1a8 RW
.coredump.tasks.data 0x3fff3be8 0x164 RW
.coredump.tasks.data 0x3fff3a60 0x180 RW
.coredump.tasks.data 0x3ffbcf00 0x164 RW
.coredump.tasks.data 0x3ffbcd50 0x1a8 RW
.coredump.tasks.data 0x3ffbd8f8 0x164 RW
.coredump.tasks.data 0x3ffd1060 0x1d8 RW
.coredump.tasks.data 0x3ffb9e94 0x164 RW
.coredump.tasks.data 0x3ffb9ce0 0x1ac RW
.coredump.tasks.data 0x3ffb7730 0x164 RW
.coredump.tasks.data 0x3ffb7580 0x1a8 RW
.coredump.tasks.data 0x3ffd272c 0x164 RW
.coredump.tasks.data 0x3ffd2540 0x1e4 RW
.coredump.tasks.data 0x3ffb7e50 0x164 RW
.coredump.tasks.data 0x3ffb7ca0 0x1a8 RW

===================== ESP32 CORE DUMP END =====================
===============================================================

Rx-365
Posts: 10
Joined: Wed Jan 17, 2018 12:08 am

Re: BLE Server and Client coexisting

Postby Rx-365 » Thu Jan 03, 2019 5:24 pm

After some testing I believe that the failure is due to a over utilization of the radio's resources. I have been running some tests here that have ESP32 Client devices continuously connect to the server device, read a characteristic, and then disconnect.

When I have 6 Services with ~20 characteristics, the server will hit this error and restart very shortly after two clients begin attempting to connect.

I reduced my service count to 1 with 2 characteristics and have had three clients connected and reading all morning. I have yet to see the error occur. I am going to see if I can get up to seven devices connecting to the server.

Who is online

Users browsing this forum: VinayDand and 461 guests