tswapnil
tswapnil

Reputation: 55

Connecting to Sphero sprk+ android

I am trying to connect my Android App to Sphero Sprk+ . The Sphero-SDK comes with samples to connect to sphero robot. I have tried that but could not connect to the sprk+. The reason I think is that SPRK+ requires proximity detection profile for Bluetooth LE (4.0 and onwards). Is there a hack or source code that connects to sprk+ ? I tried the Android's Bluetooth LE sample code for the heart rate monitoring profile , and I was able to detect and connect to the SPRK+ . But being a newbie , I still am looking to understand if the sprk+ is a GATT server or GATT client . Sphero lightning Lab connects to sprk+ when it is brought close to the mobile device. So, I understand the code should use proximity detection profile.

UPDATE : Already figured out the solution. If anyone is looking for a Sample - you can check out the code here - https://github.com/tswapnil/PC-controlled-Sphero/tree/master/app/src/main/java/com/example/swapnil/buttondrive

Upvotes: 0

Views: 485

Answers (1)

nswartz
nswartz

Reputation: 1

I was able to connect to a Sprk+ in an Android App using the beta branch of the orbotix/Sphero-Android-SDK repo. I belive the RobotLibrary.jar in that branch has the necessary updates to interface with a BLE device. This would allow you to avoid getting into the internals of how BLE works.

Upvotes: 0

Related Questions