SDK for Android?

Is there any SDK or library available for making Android Apk connected with Sphero R2D2 ?

1 Like

My idea is: create android apk which listen for upcoming messages, facebook alerts, whatsup, gmail and make R2D2 react for such events. I can write it in Android, but I have to connect with R2D2 and send him some commands (the same like javascripting provides?)

1 Like

Hey @JANGER!

That is such a fun idea!! I’m trying to think of how you can still accomplish this, given that we don’t (:confused:) have any mobile SDKs (and won’t be producing them, at least in the near future, since we already have several mobile apps people can use)… I don’t know that it is something that we could support right now, since it would require giving the Edu app access to the phone’s notification settings.

I would absolutely love to hear more about your ideas, though, and hope that you’re able to find people within the Community to brainstorm and create with on ideas like this!!

Kelsey

2 Likes

As I have written in another post:

Your App Edu is fine for learning, both in Windows and Android version.
But beside fun of learning we want to find some useful opportunities for such toy robots.

That’s why you should back to provide SDK, and provide for various platform, as soon ass possible.
It allows us to find not-toy purposes of using that robots.

I see, a years ago when Sphero started there was available SDK.
But it closed and now it is not working with currently distributed robot versions.

I will glad if I would try to program Sphero robots both from Window and Android environment directly.
ASAP.

Sphero Edu is fine, but limited. We need platforms SDK.
Just free us access to connection with robots, and we can use similar javascripting like Edu uses.

1 Like

@JANGER, I did get to see and respond to this sentiment on the other post, as well, but you bring up even more awesome points here :slight_smile:

I am so impressed with your creativity and agree that it would be awesome for Sphero to be able to continue to expand into more of the hacker/maker-space going forward. We did have an SDK a few years ago, but it didn’t get the love it deserved, as most of the people who were excited about and engaging with our products were in the Education world and weren’t looking to dive that deep into the bots just yet (but have you seen some of the things they are doing?! SO cool!). Our team focused on making the best products we could for the excited and engaged users we had, rather than on a relatively unused product (the SDK). Until now…

As a funny aside… When I was interviewing with Sphero earlier this year, I tried to dig into the old SDK. Boy, was that a challenge! I was able to get my SPRK+ doing a few fun things, but was SO EXCITED that updates were going to be made to make the process a lot more pleasant. That little taste of what could be fuels me every day, now, and makes me so excited to talk to people like you who share my desire to keep thinking outside of the box and pushing the limits!

Back to what I was saying…
Since our user base has been growing (both in numbers and in abilities (which is a pretty cool thing for us to see!)), the need to grow with our users (especially to grow with their (your!) abilities) arose and we started reviving the SDK(s!) and developed RVR to go along with them :slight_smile: With that being said, we are now waiting with baited breath to see whether we were right to do so, and whether our users do actually start engaging with our “next level” of products. While the new SDKs are currently only compatible with our new robot, if we see that this level of tech is something a good chunk of our users are engaging with, we’ll get to continue to expand and include even more of the Sphero family of bots; thank you so so much for being one of the users who is making this all possible.

Thank you, again, truly.

Kelsey

3 Likes

IMHO the RVR changes the perspective greatly from educators to hackers. Like myself a lot of hackers / makers want this type of platform to work with. I was working on building one but when I it on crowd funding immediately wanted one and abandoned by other efforts. It hits a sweet spot in sensor capabilities with the encoders, IMU, gyro, and accelerometer. The sensor fusion of those is critical for robotics.

Let me revise my educators comment - this could be a high school / college level educational tool.

The one drawback are the LEDs. They are nice but obviously they are to keep younger students entertained.

Finally, I’m wondering if the color sensor could be used for line following contests. Have to check that out once I get more work done. Possibly not. It can report if you’ve moved from the black line to the white background but not the direction of leaving. If that hardware capability is present it would be good to expose it.

Another finally is running RVRs on the Donkey car tracks or smaller version of them. A SBC with a camera mounted would be interesting. Again, when time permits I’ve an Intel 3d camera that works with my Up board.

4 Likes

Here is what I want to do with my RVR - mount a mobile phone (in my case an iPhone) on the top and use the camera and the immense computing power of these devices to run object-detection and path-planning on them and then emit commands to the RVR via BLE to follow the trajectory.
Now I have the question - where can I find the specification of the BLE UUIDs and Characteristics needed?

2 Likes

Hey @marc!

The information you need should be on your box on the white barcode label :relaxed: You can also see this information with any BLE scanner app, many of which are available for free on iOS, Android, etc. RVRs advertise as RV-xxxx (where the "x"s are the last four digits of your MAC).

Additionally, DID 0x11 CID 0x06 in the API retrieves the MAC address (UID) for the two RVR processors :slight_smile:

Hope this helps!

Kelsey

1 Like

Hi Kelsey,

thanks for your help.

What about the UUID for the Services and Characteristics? I found these at some other place (the Apple Sphero Playground)

extension CBUUID {
    // Sphero services
    @nonobjc static let bleService = CBUUID(string: "22bb746f-2bb0-7554-2d6f-726568705327")
    @nonobjc static let robotControlService = CBUUID(string: "22bb746f-2ba0-7554-2d6f-726568705327")

    // BLE service characteristics
    @nonobjc static let wakeCharacteristic = CBUUID(string: "22bb746f-2bbf-7554-2d6f-726568705327")
    @nonobjc static let txPowerCharacteristic = CBUUID(string: "22bb746f-2bb2-7554-2d6f-726568705327")
    @nonobjc static let antiDoSCharacteristic = CBUUID(string: "22bb746f-2bbd-7554-2d6f-726568705327")

    // Robot control service characteristics
    @nonobjc static let commandsCharacteristic = CBUUID(string: "22bb746f-2ba1-7554-2d6f-726568705327")
    @nonobjc static let responseCharacteristic = CBUUID(string: "22bb746f-2ba6-7554-2d6f-726568705327")
}```
Do they also work for RVR?
I can't find these on the RVR doc pages - but maybe I am looking at the wrong places...

Cheers
Marc
1 Like

I found the UUID needed to send the packets to is 00010002-574f-4f20-5370-6865726f2121

If you want to dig into how this works on Android, my code is here.

2 Likes