NSLU2-Linux
view · edit · print · history

HowTo.NetworkSlugOverBluetooth History

Hide minor edits - Show changes to markup

February 16, 2006, at 11:54 AM by eFfeM --
Added lines 1-2:
January 30, 2006, at 11:27 AM by VoodooZ -- Added way to automate creation of bnep0 interface on connection
Added lines 125-142:

Automating the process: To automate the loading of the bnep0 interface simply add all the necessary configuration to the /etc/network/interfaces config file:

        iface bnep0 inet static
        address 192.168.1.77
        netmask 255.255.255.0
        gateway 192.168.1.1

Then create a folder called pan in /etc/bluetooth/. Create a script called dev-up with the following content:

        #!/bin/sh
        ifup bnep0

and make it executable:

        chmod u+x dev-up

Now, once the pand subsystem successfully connects to a NAP, it will execute the dev-up script thus creating the bnep0 interface.

January 29, 2005, at 12:54 PM by mathieu_xwave --
Changed lines 9-10 from:
  • Append the bluez-utils package to your BOOTSTRAP_EXTRA_DEPENDS so it gets compiled.
  • Append the bluez-utils package to your BOOTSTRAP_EXTRA_RDEPENDS so it gets installed to your ramdisk.
to:
There are two different bluez module: one with dbus support and one without it. The dbus support is not needed by the nslu2 because generally it is used to interact with the GUI. So you should't have to use dbus. But if you want dbus, just replace the "nodbus" below by dbus
  • Append the bluez-utils-nodbus package to your BOOTSTRAP_EXTRA_DEPENDS so it gets compiled.
  • Append the bluez-utils-nodbus package to your BOOTSTRAP_EXTRA_RDEPENDS so it gets installed to your ramdisk.
Added lines 33-45:

If you use Symlinks for building the firmware, be sure to add the followed symlinks to your symlinks directory (generally /home/slug/nslu2-package-symlinks/packages if you have followed the how to :-).

for adding symlinks use these commands:

cd /home/slug/nslu2-package-symlinks/packages
ln -s /home/slug/openembedded/packages/bluez-utils
ln -s /home/slug/openembedded/packages/bluez-libs

The NSLU2 hasn't pcmcia support so you must commente it out in the bluez-utils conf file: in the $OEROOT/packages/bluez-utils/bluez-utils-common_2.13.inc file, delete the pcmcia-cs in DEPENDS. In EXTRA_OECONF, delete also --enable-pcmcia. And finally delete this line : chmod 755 ${D}/etc/pcmcia/bluetooth

Now you should be able to build your kernel without problems

December 16, 2004, at 07:40 AM by jkpeters_37 --
Changed line 3 from:

Note that all this was done on an alpha version Openslug connectinng to a RedHat 9 desktop using two Bluegear USB Bluetooth dongles (see the http://www.bluez.org/hardware.html BlueZ Hardware Support page for compatibility info).

to:

Note that all this was done on an alpha version Openslug connecting to a RedHat 9 desktop using two Bluegear USB Bluetooth dongles (see the http://www.bluez.org/hardware.html BlueZ Hardware Support page for compatibility info).

November 05, 2004, at 01:05 AM by tman --
Changed line 1 from:

This goes over what I had to do to setup my bluetooth USB dongle on my slug to get full IP connectivity.

to:

This goes over what I had to do to setup my Bluetooth USB dongle on my slug to get full IP connectivity.

Changed line 3 from:

Note that all this was done on an alpha version Openslug connectinng to a Redhat 9 desktop using two Bluegear USB Bluetooth dongles (see the http://www.bluez.org/hardware.html BlueZ Hardware Support page for compatibility info).

to:

Note that all this was done on an alpha version Openslug connectinng to a RedHat 9 desktop using two Bluegear USB Bluetooth dongles (see the http://www.bluez.org/hardware.html BlueZ Hardware Support page for compatibility info).

Changed lines 5-6 from:

The Bluetooth protocol stack under linux is implemented by the http://www.bluez.org BlueZ project. So the first thing to do is to add the bluez packages to your OE build:

to:

The Bluetooth protocol stack under Linux is implemented by the http://www.bluez.org BlueZ project. So the first thing to do is to add the BlueZ packages to your OE build:

Changed line 12 from:

Next you need to make sure the kernel enables the required bluetooth stuff.

to:

Next you need to make sure the kernel enables the required Bluetooth stuff.

Changed lines 26-28 from:
CONFIG_BT_RFCOMM (allow you to map a serial port over a bluetooth link)
CONFIG_USB_BLUETOOTH_TTY (Use bluetooth as a TTY)
CONFIG_SCO (to support voici over bluetooth as used in some cell phone head sets)
to:
CONFIG_BT_RFCOMM (allow you to map a serial port over a Bluetooth link)
CONFIG_USB_BLUETOOTH_TTY (Use Bluetooth as a TTY)
CONFIG_SCO (to support voice over Bluetooth as used in some cell phone headsets)
Changed line 30 from:

NOTE: Because my Bluetooth dongle is older and uses USB1?.1 I ran in trouble as I only had EHCI-HCD available, which only supports USB2? devices. For the slug, you need to have OHCI_HCD loaded also to recognise USB1?.1 devices. So make sure your kernel config has both CONFIG_USB_OHCI_HCD and CONFIG_USB_EHCI_HCD set!.

to:

NOTE: Because my Bluetooth dongle is older and uses USB 1.1 I ran in trouble as I only had EHCI-HCD available, which only supports USB 2.0 devices. For the slug, you need to have OHCI_HCD loaded also to recognise USB 1.1 devices. So make sure your kernel config has both CONFIG_USB_OHCI_HCD and CONFIG_USB_EHCI_HCD set!.

Changed line 34 from:

You should also see the following if the Bluez stack is loaded correctly:

to:

You should also see the following if the BlueZ stack is loaded correctly:

Changed lines 36-37 from:
Jul 28 20:13:30 romulan kernel: BlueZ? Core ver 2.0 Copyright (C) 2000,2001 Qualcomm Inc
Jul 28 20:13:30 romulan kernel: BlueZ? HCI USB driver ver 2.0 Copyright (C) 2000,2001 Qualcomm Inc
to:
Jul 28 20:13:30 romulan kernel: BlueZ Core ver 2.0 Copyright (C) 2000,2001 Qualcomm Inc
Jul 28 20:13:30 romulan kernel: BlueZ HCI USB driver ver 2.0 Copyright (C) 2000,2001 Qualcomm Inc
Changed line 39 from:

Some sources recommend adding the following to the modules.conf file (but I did't need to as I had my bluetooth stuff built-in the kernel):

to:

Some sources recommend adding the following to the modules.conf file (but I did't need to as I had my Bluetooth stuff built-in the kernel):

Changed line 51 from:

to make the bluetooth interface available to the bluetooth protocol stack.

to:

to make the Bluetooth interface available to the Bluetooth protocol stack.

Changed line 61 from:

The `BD Address' (short for BDAddr') is the unique hardware address of the bluetooth adapter.

to:

The `BDAddr` (short for `BD Address`) is the unique hardware address of the Bluetooth adapter.

Changed line 63 from:

You can scan for the presence of bluetooth nodes in your vicinity:

to:

You can scan for the presence of Bluetooth nodes in your vicinity:

Changed line 67 from:

To prove that the low-level link is up, try pinging the other bluetooth adapter (using the address hcitool inq returned):

to:

To prove that the low-level link is up, try pinging the other Bluetooth adapter (using the address hcitool inq returned):

Changed line 69 from:
l2ping [BDAddr?]
to:
l2ping [BDAddr]
Changed lines 71-72 from:

There is different ways to connect bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it. This is accomplished using the LAN service. (see Bluez's documentation for more info on the various network topology possibles)

to:

There is different ways to connect Bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it. This is accomplished using the LAN service. (see BlueZ's documentation for more info on the various network topology possibles)

Changed line 79 from:

This might seem unsafe but I wanted to simplify things to start as the slug doesn't seem to have the necessary helper for requesting the pin number from the user.

to:

This might seem unsafe but I wanted to simplify things to start as the slug doesn't seem to have the necessary helper for requesting the PIN number from the user.

Changed line 81 from:

Now make sure the various deamons are started properly (this should be done on startup using OE)

to:

Now make sure the various daemons are started properly (this should be done on startup using OE)

Changed line 86 from:

And on my redhat desktop:

to:

And on my RedHat desktop:

Changed lines 90-91 from:

Note: For my first test I used used my desktop linux machine as the gateway Keep in mind that you need to make sure your desktop linux machine used to test this network connection will need to similar stuff done.

to:

Note: For my first test I used used my desktop Linux machine as the gateway Keep in mind that you need to make sure your desktop Linux machine used to test this network connection will need to similar stuff done.

Changed line 108 from:

This should create a network interface called bnep0 on each machine and associate an address (192.168.1.x) so they can pass IP traffic through the bluetooth link.

to:

This should create a network interface called bnep0 on each machine and associate an address (192.168.1.x) so they can pass IP traffic through the Bluetooth link.

Changed line 112 from:

Keep in mind that there are various other ways to pass data via bluetooth devices.

to:

Keep in mind that there are various other ways to pass data via Bluetooth devices.

Changed line 114 from:

For example there is a way to associate a TTY device to a bluetooth device so you can have older application use bluetooth transparently. This is accomplished with the RFCOMM module and tools.

to:

For example there is a way to associate a TTY device to a Bluetooth device so you can have older application use Bluetooth transparently. This is accomplished with the RFCOMM module and tools.

Changed line 116 from:

There's also the OBEX tools for pushing/pulling files off devices like PDA/phones.

to:

There are also the OBEX tools for pushing/pulling files off devices like PDA/phones.

November 04, 2004, at 09:05 PM by VoodooZ --
Added line 122:
  • http://www.devx.com/assets/download/10183.pdf (The best one)
November 03, 2004, at 02:45 PM by VoodooZ --
Changed line 53 from:

You should get something like this:

to:

Run hciconfig by itself again should give something like this:

November 02, 2004, at 06:47 PM by VoodooZ --
Changed lines 118-124 from:

See the various Howtos on the http://www.bluez.org/documentation.html BlueZ's Documentation Page for more details...

to:

See the various Howtos on the http://www.bluez.org/documentation.html BlueZ's Documentation Page for more details...

Some other good links:

  • http://www.kevinboone.com/p800_linux.html
  • http://www.harbaum.org/till/palm/bluetooth/
  • http://wiki.xda-developers.com/wiki/bluetoothnetworking
November 02, 2004, at 06:45 PM by VoodooZ --
Changed line 3 from:

Note that all this was done on an alpha version Openslug.

to:

Note that all this was done on an alpha version Openslug connectinng to a Redhat 9 desktop using two Bluegear USB Bluetooth dongles (see the http://www.bluez.org/hardware.html BlueZ Hardware Support page for compatibility info).

Changed line 63 from:

You can scan for other bluetooth devices present by doing this this:

to:

You can scan for the presence of bluetooth nodes in your vicinity:

Changed lines 71-72 from:

There is different ways to connect bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it.

to:

There is different ways to connect bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it. This is accomplished using the LAN service. (see Bluez's documentation for more info on the various network topology possibles)

Changed line 81 from:

Now startup the various deamons:

to:

Now make sure the various deamons are started properly (this should be done on startup using OE)

Added lines 93-118:

Now for the actual IP networking connection:

on master side (the desktop which has the internet access):

modprobe bnep (if it's a kernel module)
pand --listen --master --role=NAP
ifconfig bnep0 192.168.1.1 netmask 255.255.255.0

on slave (the slug):

modprobe bnep
pand -c <bt_addr_of_master>
ifconfig bnep0 192.168.1.2 netmask 255.255.255.0
route add default gw 192.168.1.1

This should create a network interface called bnep0 on each machine and associate an address (192.168.1.x) so they can pass IP traffic through the bluetooth link.

And Voila! A full TCP/IP link!

Keep in mind that there are various other ways to pass data via bluetooth devices.

For example there is a way to associate a TTY device to a bluetooth device so you can have older application use bluetooth transparently. This is accomplished with the RFCOMM module and tools.

There's also the OBEX tools for pushing/pulling files off devices like PDA/phones.

See the various Howtos on the http://www.bluez.org/documentation.html BlueZ's Documentation Page for more details...

November 02, 2004, at 06:19 PM by VoodooZ --
Changed line 32 from:

Once you have all this built to the point you can boot, The first thing to check is if the kernel is recognizing your dongle so check your syslog.

to:

Once you have all this built to the point you can boot, check your syslog to see if the kernel recognizes your USB dongle on insertion.

Changed lines 34-39 from:

Some sources recommend adding the following to the modules.conf file but I did't need to as I had my bluetooth stuff built-in the kernel:

to:

You should also see the following if the Bluez stack is loaded correctly:

Jul 28 20:13:30 romulan kernel: BlueZ? Core ver 2.0 Copyright (C) 2000,2001 Qualcomm Inc
Jul 28 20:13:30 romulan kernel: BlueZ? HCI USB driver ver 2.0 Copyright (C) 2000,2001 Qualcomm Inc

Some sources recommend adding the following to the modules.conf file (but I did't need to as I had my bluetooth stuff built-in the kernel):

Changed line 47 from:

There is different ways to connect bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it.

to:

You should now be able to do:

Changed lines 49-54 from:

Configure the /etc/bluetooth/hcid.conf file:

auth disable;
encrypt disable;

This might seem unsafe but I wanted to simplify things to start.

to:
hciconfig hci0 up
Changed lines 51-53 from:

Enable your bluetooth device:

hciconfig hci0 up
to:

to make the bluetooth interface available to the bluetooth protocol stack.

Added line 61:

The `BD Address' (short for BDAddr') is the unique hardware address of the bluetooth adapter.

Added line 63:

You can scan for other bluetooth devices present by doing this this:

Added line 65:
hcitool inq
Added lines 67-79:

To prove that the low-level link is up, try pinging the other bluetooth adapter (using the address hcitool inq returned):

l2ping [BDAddr?]

There is different ways to connect bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it.

Configure the /etc/bluetooth/hcid.conf file:

auth disable;
encrypt disable;

This might seem unsafe but I wanted to simplify things to start as the slug doesn't seem to have the necessary helper for requesting the pin number from the user.

Added lines 86-88:

And on my redhat desktop:

service bluetooth start
Changed line 90 from:

For my first test I used used my desktop linux machine as the gateway

to:

Note: For my first test I used used my desktop linux machine as the gateway

Deleted line 92:

...... under construction .....

November 02, 2004, at 05:00 PM by VoodooZ --
Changed lines 17-27 from:

CONFIG_BT=y CONFIG_BT_HCIUSB=y CONFIG_BT_L2CAP=y CONFIG_BT_SCI=y CONFIG_BT_BNEP=y CONFIG_BT_HCIUSB_SCI=y

Some optional ones are: CONFIG_BT_RFCOMM (allow you to map a serial port over a bluetooth link) CONFIG_USB_BLUETOOTH_TTY (Use bluetooth as a TTY) CONFIG_SCO (to support voici over bluetooth as used in some cell phone head sets)

to:
CONFIG_BT=y
CONFIG_BT_HCIUSB=y
CONFIG_BT_L2CAP=y
CONFIG_BT_SCI=y
CONFIG_BT_BNEP=y
CONFIG_BT_HCIUSB_SCI=y

Some optional ones are:

CONFIG_BT_RFCOMM (allow you to map a serial port over a bluetooth link)
CONFIG_USB_BLUETOOTH_TTY (Use bluetooth as a TTY)
CONFIG_SCO (to support voici over bluetooth as used in some cell phone head sets)
Changed lines 32-71 from:

Once you have all this built to the point you can boot, The first thing to check is if the kernel is recognizing your dongle. .....

to:

Once you have all this built to the point you can boot, The first thing to check is if the kernel is recognizing your dongle so check your syslog.

Some sources recommend adding the following to the modules.conf file but I did't need to as I had my bluetooth stuff built-in the kernel:

alias net-pf-31 bluez
alias bt-proto-0 l2cap
alias bt-proto-2 sco
alias bt-proto-3 rfcomm
alias bt-proto-4 bnep

There is different ways to connect bluetooth modules as the protocol is very flexible but my goal was to just get IP connectivity between my slug and my main desktop so I could SSH to it.

Configure the /etc/bluetooth/hcid.conf file:

auth disable;
encrypt disable;

This might seem unsafe but I wanted to simplify things to start.

Enable your bluetooth device:

hciconfig hci0 up

You should get something like this:

hci0: Type: USB
BD Address: 00:03:0D:00:07:8A ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:8567 acl:125 sco:0 events:409 errors:0
TX bytes:4518 acl:128 sco:0 commands:130 errors:0

Now startup the various deamons:

hcid
sdpd
Added lines 75-76:

...... under construction .....

November 02, 2004, at 04:42 PM by VoodooZ --
Changed lines 1-34 from:

Describe NetworkSlugOverBluetooth here.

to:

This goes over what I had to do to setup my bluetooth USB dongle on my slug to get full IP connectivity.

Note that all this was done on an alpha version Openslug.

The Bluetooth protocol stack under linux is implemented by the http://www.bluez.org BlueZ project. So the first thing to do is to add the bluez packages to your OE build:

In your distro configuration file ($OEROOT/packages/conf/distro/openslug.conf in my case)

  • Append the bluez-utils package to your BOOTSTRAP_EXTRA_DEPENDS so it gets compiled.
  • Append the bluez-utils package to your BOOTSTRAP_EXTRA_RDEPENDS so it gets installed to your ramdisk.

Next you need to make sure the kernel enables the required bluetooth stuff. Although you can simply build them as loadable kernel modules I didn't bother at first and made them static in the kernel:

Make the following changes to your kernel's defconfig (In my case in $OEROOT/packages/linux/nslu2-openslug-2.6.7/defconfig):

CONFIG_BT=y CONFIG_BT_HCIUSB=y CONFIG_BT_L2CAP=y CONFIG_BT_SCI=y CONFIG_BT_BNEP=y CONFIG_BT_HCIUSB_SCI=y

Some optional ones are: CONFIG_BT_RFCOMM (allow you to map a serial port over a bluetooth link) CONFIG_USB_BLUETOOTH_TTY (Use bluetooth as a TTY) CONFIG_SCO (to support voici over bluetooth as used in some cell phone head sets)

NOTE: Because my Bluetooth dongle is older and uses USB1?.1 I ran in trouble as I only had EHCI-HCD available, which only supports USB2? devices. For the slug, you need to have OHCI_HCD loaded also to recognise USB1?.1 devices. So make sure your kernel config has both CONFIG_USB_OHCI_HCD and CONFIG_USB_EHCI_HCD set!.

Once you have all this built to the point you can boot, The first thing to check is if the kernel is recognizing your dongle. .....

For my first test I used used my desktop linux machine as the gateway Keep in mind that you need to make sure your desktop linux machine used to test this network connection will need to similar stuff done.

view · edit · print · history · Last edited by eFfeM.
Based on work by VoodooZ, mathieu_xwave, jkpeters_37, and tman.
Originally by VoodooZ.
Page last modified on February 16, 2006, at 11:54 AM