[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] Ethernet-over-L2CAP patch

Here's a patch that adds an Ethernet-like layer running over L2CAP.
This implementation doesn't attempt compatibility with Digianswer's
proprietary Ethernet Profile nor with the SIG's forthcoming Personal
Area Networking Profiles; it's just a neat hack to explore a different
way to network computers using Bluetooth.

To try it out, apply the patch and build the stack like normal:

  $ tar xzf bluetooth_20001115.tar.gz
  $ cd bluetooth
  $ zcat /path/to/ether-patch.gz | patch -p1
  $ make

I developed the patch using the 2.2.14 kernel and haven't had a chance
to test on other kernels, so it's possible it may require a little tweaking on versions
other than 2.2.14.
When you bring up the patched stack, you'll notice that a new network
device, btnet0, is available to your system, whose mac address your
Bluetooth device's bd_addr.  Configure the new interface as you would
any other, e.g.

  # ifconfig btnet0 up

Use btd to initiate the Ethernet-over-L2CAP connection using the new
"ether_con" command like this:

  > ether_con 00:d0:b7:03:28:93

Packets can now be exchanged over the new interface.  As it stands,
each host may only maintain a single Ethernet-over-L2CAP connection - some
minor changes would allow you to maintain more.
Oh, since the device provides an ethernet-like data link layer, you should be able to use the bridging code to bring your Bluetooth device onto your wired lan.
Best regards,
Ben Walter
Bluesocket, Inc.