Hello All,
I am working on my hobby project. I have CC2540 Keyfob with SimpleBLEPeripheral example. Currently, I have written an Android Application that sends and receives information to/from my Keyfob. When I run the Android Application and Keyfob I successfully connect Keyfob to Android phone. Afterwards, I successfully discover services.
The purpose of my application is to send long array of data from Android application to CC2540 and then to I2C module. In the end I2C device sends back information to CC2540 and CC2540 send the information to Android device. I implement I2C with bit-banging.
The problem is here, I lost the BLE synchronization after CC2540 send information to I2C module since it takes aprx 200 msec. After couple of second from starting I2C data transfer CC2540 lost connection from Android phone and disconnected.
However, I am processing this function on Application Task. AFAIK, Application Task (SimpleBLEPeripheral) which is initilized in "void osalInitTasks( void ) in OSAL_SimpleBLEPeripheral.c" has lowest priority and it should not interfere with Bluetooth Stack.
Does anyone have some idea about how to implement a long task in OSAL?
I would appreciate if you share some thoughts and ideas.
Have a great day!
Deniz