Sphero connects to Mac

I recently bought Sphero 2.0 and played with it on the iPad without any problems.

Now I want to try to develop some applications with the Mac SDK, but I can’t connect my Sphero to Mac Mac 2012 or Macbook Pro 2013 Retina. I open the Bluetooth settings, I see that Sphero-YRG presses “Pair”, it shows “Connected” for two seconds and after that “Not connected”.

After this pairing process, I can still click on the “Not connected” Bluetooth Sphero device, after a few seconds it turns into “Connected” and again after two seconds “Not connected”. I doubted that he really gets into a connected state, because Sphero will not start light from this blue-white color, as when connected to my iPad.

This is derived 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]()
+3
source share
3 answers

What worked for me, some code is quickly executed using Sphero for a short interval while it shows “connected” in the Bluetooth settings.

  • Connect Sphero. It will automatically shut off, stupid.
  • ls /dev | grep Spheroshows the name of the port associated with the device. Use ttyone (in my case /dev/tty.Sphero-BOY-AMP-SPP).
  • Paste the port name into your code so that you can run it quickly.
  • Remove Sphero from the Bluetooth user interface.
  • Choose a pair with Sphero and immediately run your code. Now it remains connected, and the connection can be used stably.
+2
source

Mac SDK , , , SDK , Sphero 2.0. Mac SDK SDK, . , , , .

+1

You can try using the open-source artoo framework to connect and manage your sphero from your computer.

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

If you do not want to use ruby, you can use http://cylonjs.com with javascript.

0
source

All Articles