once I connect my device to the app and cloud before running the program it is going into safe mode how to remove the device from the safe mode?
This sounds like a Safe Mode Healer attempt to update the device OS to fit the version your firmware is targeting.
So let it sit there without interference for about 5 minutes and see whether the update can still finish (since you seem to have interrupted the process this might not work anymore tho’).
Is there any other way to rectify this?
You could try DFU update via USB.
- put the device in DFU Mode
particle flash --usb tinker -v
particle update -v
- check whether the update has been successful via
particle serial inspect(in Listening Mode)
- flash your own firmware again (targeted at the same version now installed on the device)
Thank you will try and get back to you