Hi friends..! I am trying to print data on UART but only just after when TIMEOUT (180 sec) occurs in the project BLE.zip. Is there something BLE stack event has to be used? if yes than how? Thanks in advance for every Helper..! :).
Hi friends..! I am trying to print data on UART but only just after when TIMEOUT (180 sec) occurs in the project BLE.zip. Is there something BLE stack event has to be used? if yes than how? Thanks in advance for every Helper..! :).
Hello Rajat
To print a message on timeout you could either add a new handler in ble_evt_dispatch, or add a new case to an existing handler, such as on_ble_evt. In the switch you could add a case for BLE_GAP_EVT_TIMEOUT in which you print a message. Do note however that if you just add a log message the chip might go into system OFF mode before the message is printed, if you have configured the device to do so, so you would need to wait until the message has been transmitted.
The fatal error you receive will occur when you try to activate advertisting when it is already doing so. I recommend you create an advertising flag that you poll to see if the device is advertising before you try to enable it.
If the chip has gone into system OFF mode, you will need to wake it. You can look at the power section of the product specification of the chip you are using for more information.
Best regards
Jørn Frøysa
You cannot execute the main loop while in sleep. While in sleep the CPU core will power down and stop executing instructions. You can however set up so that a signal from the MPU awakens the chip. So for instance if the MPU registers movement it generates a signal connected to the chips GPIO which awakens the chip. This is described in the POWER section of the product specification.
You cannot execute the main loop while in sleep. While in sleep the CPU core will power down and stop executing instructions. You can however set up so that a signal from the MPU awakens the chip. So for instance if the MPU registers movement it generates a signal connected to the chips GPIO which awakens the chip. This is described in the POWER section of the product specification.