From XastirWiki
Jump to: navigation, search

Configuring a Bluetooth serial port adapter for Xastir on Ubuntu 9.10

This howto will walk through configuring Xastir to talk to a TNC using a Bluetooth serial port adapter. This was written and tested under Ubuntu 9.10. Hardware utilized was an Aircable Serial 3X Blueooth serial adapter and a Kenwood D700. Other configurations should be somewhat similar in setup.

Check your Bluetooth config on you computer

First, make sure your Bluetooth is working on your computer. Check to see tha the drivers are installed, and make sure that the Bluetooth service is running:

  • service bluetooth status
* bluetooth is running

Scan for Bluetooth devices

You'll need to scan for Bluetooth devieces now to get the hardware ID of your Bluetooth<-->Serial adapter:

  • hcitool scan

With luck, it'll find it and you'll see something like this:

Scanning ...
	00:50:C2:7F:4D:10	AIRserial3X

Take note of the string of letters and numbers that looks like a MAC address; you'll need it several times during this setup.

Now issue this command, replacing with the hardware ID you identified previously:

  • sdptool records 00:50:C2:7F:4D:10

If everything is working, you should see something like this that identifies the Bluetooth profiles on your serial adapter:

Service Name: SPP
Service RecHandle: 0x10006
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1

Service Name: DialUp Port
Service RecHandle: 0x10007
Service Class ID List:
  "Dialup Networking" (0x1103)
  "Generic Networking" (0x1201)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1

Set up the rfcomm port

Edit the rfcomm configuration file:

  • sudo nano /etc/bluetooth/rfcomm.conf

Enter this text at the end of the file:

rfcomm0 {
        bind yes;
        device 00:50:C2:7F:4D:10;
        channel 1;
        comment "serial bluetooth tnc";

Be sure to use the correct device ID that you identified earlier. Use the channel number from the sdptool command above, which in my case is "1".

At this point I had to stop and start the Bluetooth service:

  • service bluetooth stop
  • service bluetooth start

Connect the rfcomm port

Now we're ready to try connecting:

  • sudo rfcomm connect 0

You should be prompted to enter your PIN for pairing your PC with the Bluetooth serial adapter. In my case the default was "1234", but that can (and should) be changed to something more secure.

After entering the PIN, you should see this:

Connected /dev/rfcomm0 to 00:50:C2:7F:4D:10 on channel 1
Press CTRL-C for hangup

Set up the interface in Xastir

Now we're ready to set up the TNC interface in Xastir. Everything is exactly the same as setting up a regular serial interface, except that insead of using /dev/ttyS0, we're going to use /dev/rfcomm0 as our device name.

Start your newly created interface and watch the Incoming Data window. You should see communication with your TNC. If not, check the troubleshooting section below.


If all of the commands seem to produce the correct output but Xastir doesn't connect to the TNC in the final step, you can try connecting to /dev/rfcomm0 using a terminal program such as minicom or gtkterm. If they can connect, Xastir should be able to as well.

Much of the information for writing this howto was gathered from this thread on the Ubuntu forums: It may provide some things you can try if you run into a problem.


I got tired of having my laptop tethered to my D700 in my car with a serial cable. Now I have a truely wireless setup and can move the laptop around freely in and around the car. I still carry a serial cable though just in case!