After uploading a new BlueBasic program typically AUTORUN ON is used to start the program after power up. When disconnecting the device now, the device looses BLE advertising and you are forced to reset the device. Issuing a REBOOT command before disconnect fixes the issue partially, since it only reboot successfully with BLE advertising when you disconnect from the device quickly after issuing REBOOT.
It seems to be that REBOOT (which generates internally a SystemReset() soft reset) does not really clean all bluetooth related states (currently BlueBasic runs on BLE Stack 1.4.0). There is a hint in the BLE Stack 1.4.1 release notes:
http://processors.wiki.ti.com/index.php/CC254X_Release_Notes
Fixed HCI_EXT_ResetSystem soft reset to work as expected on CC254x
Testing if this helps would require to port the project to BLE Stack 1.4.1 which is a painful procedure.
After uploading a new BlueBasic program typically AUTORUN ON is used to start the program after power up. When disconnecting the device now, the device looses BLE advertising and you are forced to reset the device. Issuing a REBOOT command before disconnect fixes the issue partially, since it only reboot successfully with BLE advertising when you disconnect from the device quickly after issuing REBOOT.
It seems to be that REBOOT (which generates internally a SystemReset() soft reset) does not really clean all bluetooth related states (currently BlueBasic runs on BLE Stack 1.4.0). There is a hint in the BLE Stack 1.4.1 release notes: http://processors.wiki.ti.com/index.php/CC254X_Release_Notes
Testing if this helps would require to port the project to BLE Stack 1.4.1 which is a painful procedure.