Bluetooth/Serial

From OLPC
Jump to: navigation, search

Using an XO laptop as a serial console via Bluetooth.

Ingredients

  • an XO-4 laptop as console, the host, with either 8787 wireless adapter or a Bluetooth USB adapter,
  • the XO laptop under test, the target,
  • a Sparkfun BlueSMiRF or Mate Bluetooth serial modem,
  • a 3.3V supply for the modem.

Recipe

Wire Target

  • connect ground, TX, and RX from the XO to the modem,
  • connect 3.3V supply to modem,

Configure Host

  • install the screen package,
sudo yum install -y screen
  • copy bluez-simple-agent and bluez-test-device from a system running Ubuntu or Debian (since Fedora doesn't package these scripts in the bluez package),
  • start the Bluetooth server,
sudo chkconfig bluetooth on
sudo service bluetooth start

Connect via Bluetooth

  • scan for and identify the modem,
hcitool scan
  • pair the host and the modem,
sudo bluez-simple-agent hci0 68:37:D3:00:06:66
sudo bluez-test-device trusted 68:37:D3:00:06:66
  • bind the connection to a terminal device,
sudo rfcomm bind 0 68:37:D3:00:06:66
  • start screen and begin typing
screen /dev/rfcomm0 115200

May also be necessary to deal with data corruption introduced by Modem Manager.