MQTT task stops with simultaneous BLE scanning after some time.

Ansics
Posts: 8
Joined: Mon May 22, 2017 11:27 am

MQTT task stops with simultaneous BLE scanning after some time.

Postby Ansics » Thu Jun 08, 2017 8:08 am

I am running following two tasks on ESP32 one task scan the BLE and other task send data over MQTT.

Code: Select all

xTaskCreatePinnedToCore(&bt_task, "btTask", 2048, NULL, 1, &xHandle1, 0);
xTaskCreate(&mqtt_task, "mqtt_task", 8192,NULL,5,&xHandle2);
The problem is MQTT task stop execution at any random time.
I have tried many different approaches but could not solve the problem.
Does anyone face this problem or have any idea about solution.
Thanks,

vinodstanur
Posts: 27
Joined: Thu Jun 08, 2017 12:59 pm

Re: MQTT task stops with simultaneous BLE scanning after some time.

Postby vinodstanur » Thu Jun 08, 2017 6:48 pm

Hi,
I am also playing with a similar setup, not yet tried mqqt, but what I observed is, if I am scanning BLE with full bandwidth (both windows and interval are equal), then the wifi is not able to do any operation. It is not connecting also.
I tried windows a bit less( 0x100, 0x90) and then the wifi connects, but not that fast.
Without ble scan, wifi connects faster, so it seems like a bandwidth sharing.

I am expecting similar issues in my case aswell, so I am planning to keep a monitoring task which should monitor the activities, network pings for ensuring network is working, if BLE is not giving any scan result for few minutes then something might have happened to it, so I may need to reset the ble part of the code.

Seems like the ble part is not that matured.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 62 guests