LairdCP / BL652-Applications

Laird Connectivity BL652 smartBASIC applications
ISC License
22 stars 20 forks source link

$autorun$.devkit.sample.app.sb not running as intended #1

Closed Leojet86 closed 7 years ago

Leojet86 commented 7 years ago

Hello,

this might not be the place to post this, but as there's no BL652 forum I'll post this here.

When following the quick start guide here: https://www.lairdtech.com/bl652-quick-start

The $autorun$.devkit.sample.app.sb does not have the behavior explained in the quick start.

In the moduleLink app, the device is discovered, and once you click on it it get stuck at service discovery. All it does is writting in the UwTerminalX:

======================== BLE Device connected =======================
 Connection: Interval=48750us LinkTimeout=20000000us SlaveLatency=0
=====================================================================

# CCCD() Vcc, 0
# CCCD() Temperature, 0
# CCCD() Packet ID, 0
# CCCD() Rssi, 0
# CCCD() Buttons, 0

====================== BLE Device disconnected ======================

The service discovery eventually time out and pop-up the Alert:

Service Discovery Failed; Device may be unsupported! If trying to use OTA download, restart the app.

When using Xamarin and debbuging the ModuleLink app, I see that the GPIOs service is not instancing since it's never discovered.

So I guess the service is never created/activated in the SmartBasic.

EDIT: So after some tests. I've tried another phone and it worked. Both phone are Galaxy s4 same model SGH-I337M. Also tried with a galaxy S6 and it worked. I wonder what cause this issue...

Leojet86 commented 7 years ago

Found the problem. It appears that when debbuging service discovery in visual studio, breaking the execution cause something to fail inside the bluetooth of the phone. The bluetooth continue to run but can not discover BLE services other than VSP. Restarting the bluetooth on the phone fixed the issue!

You can delete this issue thanks!