Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

IOIO Over Bluetooth for PC

ytai edited this page · 1 revision

IOIO Over Bluetooth for PC

Introduction

Starting at Bootloader V3.0 + App V3.10, IOIO can communicate with your PC over a Bluetooth connection. This is achieved simply by attaching a standard USB Bluetooth dongle to the board. PC support for IOIOLib has been introduced in IOIOLib V3.30. Both the original IOIO (V1) and IOIO-OTG boards can be used with a host PC over Bluetooth. All major operating systems (Windows, Linux, OSX) are supported.

Not every possible dongle has been tested, and some are known not to work. However, most simple once do work. Check this page for devices that have been reported to work.

If your IOIO is running old firmware that does not support Bluetooth, you can upgrade your firmware by following the instructions on this page. IOIO-OTG devices all come with Bluetooth-enabled firmware, so will not need an upgrade.

Credits

This feature uses code from the btstack Open-Source Project. This is an excellent library, especially suited for embedded devices, which enabled delivery of this feature in a timely manner. Special thanks go to Matthias Ringwald, the owner of btstack, for his wonderful code and time spent on supporting this integration!

Usage

Connection

  • On IOIO v1 boards, simply plug the dongle into the USB jack on the IOIO board.
  • On IOIO-OTG boards, use the provided USB male-micro-A-to-female-A adapter cable. If you are using a non-standard adapter, the adapter may not correctly identify itself has "host side", so you might need to move the host mode switch on the board to the "force host" (H) position.
  • Make sure the charge limiting potentiometer is all the way clockwise.

Pairing

In order for an application to be able to identify your IOIO boards within range, they first need to be "paired" with your Bluetooth-enabled PC. Pairing is a one-time process done per dongle. Once paired, your PC is going to remember the specific dongle and will not require pairing again.

  • Power your IOIO board and attach the Bluetooth dongle to it.
  • Open Bluetooth settings on the PC, and start a scan for adding a new device.
  • You should see a device called IOIO (xx:xx), where xx:xx are the last 4 digits of your IOIO's address. If you have more than one IOIO, each one will have a different address, making it possible to distinguish between them. The address comes from the dongle and not from the IOIO, so if you swap two dongles, the addresses will go with the dongles and not with the IOIOs.
  • You will be asked for a PIN code. Enter 4545.
  • Your IOIO is now paired, until you manually Unpair it.

Next Steps

Once paired, the IOIO will act as a serial device, just like it does in USB device mode. The rest of the process is identical to what is written on that page.

Caveats

  • The latency over Bluetooth is significantly higher than of wired connections (order of 10's of ms).
  • The bandwidth (data rate) of Bluetooth is significantly lower than of wired connections (order of 10's of KB/sec). In practice, this means that bandwidth consuming features (e.g. Analog Input) may not work 100% smoothly. There is a plan to enable programmatic reduction of the analog sample rate in order to mitigate this limitation. Also, some dongles have been observed to exhibit lower bandwidths than others.
  • Many cheap Bluetooth dongles have the same address. This means there is no way they can be used concurrently, with with a single host or with different hosts. The best workaround is to use dongles of different models.

Troubleshooting

If you are having trouble with Bluetooth, here are some things you can do with your current hardware to fix the problem:

  • Make sure the current-limiting potentiometer on the board is turned fully clockwise (no current limiting). Many dongles will misbehave when limiting their current.
  • Some dongles won't work with IOIO. For example if the dongle presents itself as a USB hub. See Supported Bluetooth Dongles.
Something went wrong with that request. Please try again.