3

I recently bought Sphero 2.0 and playing with it on iPad with no problems.

Now I want try to develop some apps with Mac SDK however I am not able to connect my Sphero with my Mac Mini 2012 nor Macbook Pro 2013 Retina. I open Bluetooth settings, I see Sphero-YRG click to "Pair", it shows for two seconds "Connected" and after that "Not connected".

After this pairing process I can still click on "Not connected" Sphero bluetooth device, after few seconds it turned into "Connected" and again after two seconds its "Not connected". I doubted that it really gets to connected state because Sphero won't start light with that blue-white as it does when it connects to my iPad.

This is output from /var/log/system.log :

Feb  3 21:19:11 Pavel-Mac-mini.local blued[83]: Save link key for device: 68-86-e7-00-25-b8
Feb  3 21:19:12 Pavel-Mac-mini.local BluetoothUIServer[3420]: setAudioDevice:kAudioDeviceUnknown
Feb  3 21:19:12 Pavel-Mac-mini.local BluetoothUIServer[3420]: Failed to set the device Sphero-YRG
Feb  3 21:19:13 Pavel-Mac-mini kernel[0]: [0xffffff8058432e00][free]()
grg
  • 5,023
  • 3
  • 34
  • 50
user3267472
  • 31
  • 1
  • 2

3 Answers3

3

What worked for me is quickly running some code using the Sphero during the short interval while it shows "connected" in the Bluetooth settings.

  1. Connect Sphero. It will automatically disconnect, stupid.
  2. ls /dev | grep Sphero shows the name of the port which was associated with the device. Use the tty one (in my case, /dev/tty.Sphero-BOY-AMP-SPP).
  3. Paste the port name into your code, so you can run it quickly.
  4. Remove Sphero from the Bluetooth settings UI.
  5. Choose to pair with the Sphero again, and immediately run your code using it. Now it stays connected and the connection is usable and stable.
jab
  • 4,053
  • 3
  • 33
  • 40
1

The Mac SDK looks like its last update was about a year ago, which would mean that the SDK has not been updated to be able to see or connect to the Sphero 2.0 ball correctly. That being said, the Mac SDK is actually an unofficial SDK, and therefore is not directly supported by us. I will make sure that this gets forwarded to the correct people, and will get you some more information when I know more.

Hunter Lang
  • 101
  • 4
  • I tried sample Xcode projects which are in zip file with Mac SDK and they work fine. For me is problem solved. I was refering to problem with connecting sphero to Mac Os X with bluetooth prefernces in OS, SDK works fine. So problem is somewhere in OS rather then in SDK. – user3267472 Feb 09 '14 at 01:26
  • 1
    Ah. I have seen this in other operating systems as well. Sometimes, the ball will not show as "connected" until a service is actually using it. That may be the case here. – Hunter Lang Feb 11 '14 at 07:05
0

You could try using artoo open source framework to connect and control your sphero from your computer.

Here you can find a tutorial on how to do it: https://github.com/hybridgroup/artoo/wiki/1.3.2.-Sphero

If you don't want to use ruby, you could use http://cylonjs.com with javascript too.

solojavier
  • 25
  • 3