ble_spp_client and ble_spp_client and wifi coexistence

1622296203
Posts: 5
Joined: Mon Apr 01, 2019 8:46 am

ble_spp_client and ble_spp_client and wifi coexistence

Postby 1622296203 » Thu Jun 27, 2019 7:03 am

Hello, sir:

My company has developed a BLE gateway, now I would like use esp32 to replace the original MCU.The following are our project demand:
ble_spp_clinet and ble_spp_server and wifi coexistence in a esp32; use ble_spp_clinet to scan ble devices' adv and ble_spp_server is connected with smart phone to implement some configuration;sue wifi send the advs scaned to cloud server.

Are the above functional requirements achievable?

Best Wishes!

Harry

1622296203
Posts: 5
Joined: Mon Apr 01, 2019 8:46 am

Re: ble_spp_client and ble_spp_client and wifi coexistence

Postby 1622296203 » Fri Jun 28, 2019 7:19 am

Hi, Gays:

I've made some attempts: I put ble_app_client and ble_app_server together, esp32 works well(esp32 can scan BLE broadcasting and can be connected by smart phone).Then I added wifi's https_mbedtls function, when wirte HTTPS requeset, the esp32 dump, the detailed error message is as follows(Error location in red font):
  • rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0018,len:4
    load:0x3fff001c,len:6444
    load:0x40078000,len:11652
    load:0x40080400,len:6632
    entry 0x40080768
    [0;32mI (28) boot: ESP-IDF v4.0-dev-972-gbeaefd335 2nd stage bootloader[0m
    [0;32mI (28) boot: compile time 14:04:30[0m
    [0;32mI (29) boot: Enabling RNG early entropy source...[0m
    [0;32mI (34) boot: SPI Speed : 40MHz[0m
    [0;32mI (39) boot: SPI Mode : DIO[0m
    [0;32mI (43) boot: SPI Flash Size : 4MB[0m
    [0;32mI (47) boot: Partition Table:[0m
    [0;32mI (50) boot: ## Label Usage Type ST Offset Length[0m
    [0;32mI (58) boot: 0 nvs WiFi data 01 02 00009000 00006000[0m
    [0;32mI (65) boot: 1 phy_init RF data 01 01 0000f000 00001000[0m
    [0;32mI (72) boot: 2 factory factory app 00 00 00010000 00180000[0m
    [0;32mI (80) boot: End of partition table[0m
    [0;32mI (84) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2c390 (181136) map[0m
    [0;32mI (157) esp_image: segment 1: paddr=0x0003c3b8 vaddr=0x3ffbdb60 size=0x039cc ( 14796) load[0m
    [0;32mI (163) esp_image: segment 2: paddr=0x0003fd8c vaddr=0x40080000 size=0x00284 ( 644) load[0m
    [0;32mI (164) esp_image: segment 3: paddr=0x00040018 vaddr=0x400d0018 size=0xc640c (812044) map[0m
    [0;32mI (460) esp_image: segment 4: paddr=0x0010642c vaddr=0x40080284 size=0x0017c ( 380) load[0m
    [0;32mI (460) esp_image: segment 5: paddr=0x001065b0 vaddr=0x40080400 size=0x1697c ( 92540) load[0m
    [0;32mI (519) boot: Loaded app from partition at offset 0x10000[0m
    [0;32mI (519) boot: Disabling RNG early entropy source...[0m
    [0;32mI (520) cpu_start: Pro cpu up.[0m
    [0;32mI (523) cpu_start: Application information:[0m
    [0;32mI (528) cpu_start: Project name: spp_client_demo[0m
    [0;32mI (534) cpu_start: App version: 1[0m
    [0;32mI (538) cpu_start: Compile time: Jun 28 2019 14:04:34[0m
    [0;32mI (544) cpu_start: ELF file SHA256: c76a560d1585999a...[0m
    [0;32mI (550) cpu_start: ESP-IDF: v4.0-dev-972-gbeaefd335[0m
    [0;32mI (557) cpu_start: Starting app cpu, entry point is 0x400810e0[0m
    [0;32mI (0) cpu_start: App cpu up.[0m
    [0;32mI (567) heap_init: Initializing. RAM available for dynamic allocation:[0m
    [0;32mI (574) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM[0m
    [0;32mI (580) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM[0m
    [0;32mI (586) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM[0m
    [0;32mI (592) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM[0m
    [0;32mI (598) heap_init: At 3FFCE040 len 00011FC0 (71 KiB): DRAM[0m
    [0;32mI (604) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
    [0;32mI (611) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
    [0;32mI (617) heap_init: At 40096D7C len 00009284 (36 KiB): IRAM[0m
    [0;32mI (623) cpu_start: Pro cpu start user code[0m
    [0;32mI (642) spi_flash: detected chip: generic[0m
    [0;32mI (642) spi_flash: flash io: dio[0m
    [0;32mI (642) cpu_start: Starting scheduler on PRO CPU.[0m
    [0;32mI (0) cpu_start: Starting scheduler on APP CPU.[0m
    [0;32mI (725) BTDM_INIT: BT controller compile version [0edc7eb][0m
    [0;32mI (725) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
    [0;32mI (815) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0[0m
    [0;32mI (1045) ble: user_ble_init init bluetooth
    [0m
    [0;32mI (1165) ble: register client callback[0m
    [0;32mI (1165) ble: EVT 0, gattc if 3[0m
    [0;32mI (1165) ble: REG EVT, set scan params[0m
    [0;32mI (1175) ble: Enable Ble Scan:during time 0xFFFF minutes.[0m
    [0;32mI (1175) ble: EVT 0, gatts if 4
    [0m
    [0;32mI (1175) ble: event = 0
    [0m
    [0;32mI (1175) ble: gatts_profile_event_handler 503
    [0m
    [0;32mI (1185) ble: gatts_profile_event_handler 506
    [0m
    [0;32mI (1185) ble: gatts_profile_event_handler 509
    [0m
    [0;31mE (1195) BT_BTC: btc_gatts_uuid_format_convert wrong uuid length 18
    [0m
    [0;31mE (1205) BT_BTC: btc_to_bta_uuid UUID len is invalid 18
    [0m
    [0;31mE (1205) BT_BTC: bta_to_btc_uuid UUID len is invalid 18
    [0m
    [0;32mI (1215) ble: EVT 22, gatts if 4
    [0m
    [0;32mI (1215) ble: event = 16
    [0m
    [0;32mI (1225) ble: The number handle =b
    [0m
    [0;32mI (1225) ble: Scan start successed[0m
    [0;32mI (1235) ble: EVT 12, gatts if 4
    [0m
    [0;32mI (1235) ble: event = c
    [0m
    [0;32mI (1235) main: user ble init success[0m
    I (1255) wifi: wifi driver task: 3ffd675c, prio:23, stack:3584, core=0
    [0;32mI (1255) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
    [0;32mI (1255) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
    I (1285) wifi: wifi firmware version: ec61a20
    I (1285) wifi: config NVS flash: enabled
    I (1285) wifi: config nano formating: disabled
    I (1285) wifi: Init dynamic tx buffer num: 32
    I (1285) wifi: Init data frame dynamic rx buffer num: 32
    I (1295) wifi: Init management frame dynamic rx buffer num: 32
    I (1295) wifi: Init management short buffer num: 32
    I (1305) wifi: Init static rx buffer size: 1600
    I (1305) wifi: Init static rx buffer num: 10
    I (1315) wifi: Init dynamic rx buffer num: 32
    [0;32mI (1315) main: init wifi ssid =ChinaNet-2.4G-6152[0m
    [0;32mI (1325) main: init wifi password =hdbp4674[0m
    [0;32mI (1325) main: init http doamin =www.freqmesh.com[0m
    [0;32mI (1335) main: init http rip =443[0m
    [0;32mI (1335) main: init http url =/pico/gateway/uploadData[0m
    I (1365) wifi: mode : sta (30:ae:a4:dd:52:78)
    [0;32mI (1365) main: Seeding the random number generator[0m
    [0;32mI (1375) main: Loading the CA root certificate...[0m
    [0;32mI (1375) main: Setting hostname for TLS session...[0m
    [0;32mI (1375) main: Setting up the SSL/TLS structure...[0m
    [0;32mI (1385) main: enable session tickets[0m
    I (1485) wifi: new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
    I (2515) wifi: state: init -> auth (b0)
    I (2515) wifi: state: auth -> assoc (0)
    I (2525) wifi: state: assoc -> run (10)
    [0;32mI (2645) ble: Searched XT_PICO len =20[0m
    I (2645) wifi: connected with ChinaNet-2.4G-6152, channel 1, bssid = 30:99:35:a7:61:52
    I (2645) wifi: pm start, type: 1

    [0;32mI (2655) ble: 02 01 06 07 16 00 02 64 01 00 07 08 09 58 54 5f [0m
    [0;32mI (2655) ble: 50 49 43 4f [0m
    [0;32mI (3725) ble: Searched XT_PICO len =20[0m
    [0;32mI (3725) ble: 02 01 06 07 16 00 02 64 01 00 07 08 09 58 54 5f [0m
    [0;32mI (3725) ble: 50 49 43 4f [0m
    [0;32mI (4235) ble: Searched XT_PICO len =20[0m
    [0;32mI (4235) ble: 02 01 06 07 16 00 02 64 01 00 07 08 09 58 54 5f [0m
    [0;32mI (4235) ble: 50 49 43 4f [0m
    [0;32mI (6245) tcpip_adapter: sta ip: 192.168.5.45, mask: 255.255.255.0, gw: 192.168.5.1[0m
    [0;32mI (11305) ble: Searched XT_PICO len =20[0m
    [0;32mI (11315) ble: 02 01 06 07 16 00 02 64 01 00 07 08 09 58 54 5f [0m
    [0;32mI (11315) ble: 50 49 43 4f [0m
    [0;32mI (20205) ble: Searched XT_PICO len =20[0m
    [0;32mI (20205) ble: 02 01 05 07 16 00 02 64 02 00 08 08 09 58 54 5f [0m
    [0;32mI (20205) ble: 50 49 43 4f [0m
    [0;32mI (23225) ble: Searched XT_PICO len =20[0m
    [0;32mI (23225) ble: 02 01 05 07 16 00 02 64 02 00 08 08 09 58 54 5f [0m
    [0;32mI (23225) ble: 50 49 43 4f [0m
    [0;32mI (31365) main: trigger check cloud reset [0m
    [0;32mI (32245) main: Connected to AP[0m
    [0;32mI (32245) main: Connecting to www.freqmesh.com:443...[0m
    [0;32mI (32785) main: Connected.[0m
    [0;32mI (32785) main: Performing the SSL/TLS handshake...[0m
    [0;32mI (33765) ble: Searched XT_PICO len =20[0m
    [0;32mI (33765) ble: 02 01 06 07 16 00 02 64 01 00 08 08 09 58 54 5f [0m
    [0;32mI (33765) ble: 50 49 43 4f [0m
    Saving session for reuse...[0;32mI (35155) main: Verifying peer X.509 certificate...[0m
    [0;32mI (35155) main: Certificate verified.[0m
    [0;32mI (35155) main: Cipher suite is TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256[0m
    [0;32mI (35165) main: Writing HTTP request...[0m
    Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
    Core 1 register dump:

    PC : 0x4013572b PS : 0x00060830 A0 : 0x80107194 A1 : 0x3ffdd5b0
    A2 : 0x00000000 A3 : 0x00000000 A4 : 0xffffffff A5 : 0x3ffcc668
    A6 : 0x3ffcc66d A7 : 0x3ffba9cc A8 : 0x80135638 A9 : 0x3ffdd590
    A10 : 0x3ffe1ffc A11 : 0x3f416658 A12 : 0x3ffba9cc A13 : 0x3ffba9cc
    A14 : 0x3ffba9cc A15 : 0x00000004 SAR : 0x0000001f EXCCAUSE: 0x0000001c
    EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

    ELF file SHA256: c76a560d1585999a35f13c21d2ada71a3a0b51d2f53b58d6dc189dbaebc4521e

    Backtrace: 0x40135728:0x3ffdd5b0 0x40107191:0x3ffdd620 0x400904a5:0x3ffddc60

    Rebooting...
    ets Jun 8 2016 00:22:57

    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0018,len:4
    load:0x3fff001c,len:6444
    load:0x40078000,len:11652
    load:0x40080400,len:6632
    entry 0x40080768
    [0;32mI (29) boot: ESP-IDF v4.0-dev-972-gbeaefd335 2nd stage bootloader[0m
    [0;32mI (29) boot: compile time 14:04:30[0m
    [0;32mI (29) boot: Enabling RNG early entropy source...[0m
    [0;32mI (35) boot: SPI Speed : 40MHz[0m
    [0;32mI (39) boot: SPI Mode : DIO[0m
    [0;32mI (43) boot: SPI Flash Size : 4MB[0m
    [0;32mI (47) boot: Partition Table:[0m
    [0;32mI (51) boot: ## Label Usage Type ST Offset Length[0m
    [0;32mI (58) boot: 0 nvs WiFi data 01 02 00009000 00006000[0m
    [0;32mI (66) boot: 1 phy_init RF data 01 01 0000f000 00001000[0m
    [0;32mI (73) boot: 2 factory factory app 00 00 00010000 00180000[0m
    [0;32mI (81) boot: End of partition table[0m
    [0;32mI (85) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2c390 (181136) map[0m
    [0;32mI (158) esp_image: segment 1: paddr=0x0003c3b8 vaddr=0x3ffbdb60 size=0x039cc ( 14796) load[0m
    [0;32mI (164) esp_image: segment 2: paddr=0x0003fd8c vaddr=0x40080000 size=0x00284 ( 644) load[0m
    [0;32mI (165) esp_image: segment 3: paddr=0x00040018 vaddr=0x400d0018 size=0xc640c (812044) map[0m
    [0;32mI (461) esp_image: segment 4: paddr=0x0010642c vaddr=0x40080284 size=0x0017c ( 380) load[0m
    [0;32mI (461) esp_image: segment 5: paddr=0x001065b0 vaddr=0x40080400 size=0x1697c ( 92540) load[0m
Attachments
cutecom.log
(14.99 KiB) Downloaded 717 times

Weijian-Espressif
Posts: 29
Joined: Wed Aug 09, 2017 6:16 am

Re: ble_spp_client and ble_spp_client and wifi coexistence

Postby Weijian-Espressif » Fri Jun 28, 2019 8:26 am

HI, Please provide your *.elf file and test log

1622296203
Posts: 5
Joined: Mon Apr 01, 2019 8:46 am

Re: ble_spp_client and ble_spp_client and wifi coexistence

Postby 1622296203 » Fri Jun 28, 2019 11:09 am

it works, sorry to disturb!

BR

Harry

Who is online

Users browsing this forum: No registered users and 102 guests