How to build a wireless network with Bluetooth in Linux (1)

Source: Internet
Author: User

Since it is a technical activity, you will keep up with me so that you can immediately know howLinuxUseBluetoothCreate a wireless network.

The ip address wireless network under the Bluetooth is called pan. The Bluetooth device highlights the link between the individual and the electronic device, and the use of personal is also good. Like the general network that we use, there are also clients, router, and hub on the pan. However, all these roles are played by bluetooth devices, and all three linux boxes with Bluetooth adapter can be set as appropriate.

Before talking about this wireless network, let's talk about how to support linux.

First, find the official website bluez of linux. Sourceforge. Net

Then on this page

Http://bluez.sourceforge.net/download/download.html

Download

Bluez-libs bluez-utils bluez-sdp bluez-pan

These packages. We can't use the last few things we saved. If you have XXX hardware, consider it (check it out on your own in bluez)

Then in http://www.holtmann.org/linux/kernel/

Download the corresponding kernel patch in this place. Mine is from 2.4.20.

Then, patch and compile your kernel, and select M for the modules that are added to the Bluetooth part. If you are not sure which one is useful or useless.

Install the downloaded package one by one after completing the kernel, in the order of my list. Simple

./Configure & make install.

Now we can R & R

First load the kernel module:

Modprobe bluez (supported by bluetooth)

Modprobe hci_usb (for usb Bluetooth devices .)

Specific modules to add can look at the http://www.holtmann.org/linux/bluetooth/devices.html

Find the supported modules required by your device.

Modprobe l2cap

Modprobe bnep (pan network device)

Then two daemon processes are called.

Hcid

Sdpd

In this case, you can use the tool provided by bluez-util to check your device.

Hciconfig

If your Bluetooth device is installed and identified, you will see a device like hci0. If you see a colorful mac address, it indicates that the device has been started. If it is 00: 00: 00: 00 :....

Hciconfig hci0 up

Start it, just like ifconfig. Haha

Now we can start the PAN daemon. Before we start, let's talk about a few terms.

1. PANU (the client in the pan is the PAN user. Haha)

2. According to my understanding, GN is the hub in pan.

See the figure below for details:

 
 
  1. +------+ +------+ +------+  
  2.  
  3. | PANU | | PANU | | PANU |  
  4.  
  5. +------+ +------+ +------+  
  6.  
  7. \ | /  
  8.  
  9. \ | /  
  10.  
  11. \ | /  
  12.  
  13. \ | /  
  14.  
  15. \ | /  
  16.  
  17. \ | /  
  18.  
  19. \ | /  
  20.  
  21. +---------+  
  22.  
  23. | GN |  
  24.  
  25. +---------+  
  26.  
  27. / | \  
  28.  
  29. / | \  
  30.  
  31. / | \  
  32.  
  33. / | \  
  34.  
  35. / | \  
  36.  
  37. / | \  
  38.  
  39. +------+ +------+ +------+  
  40.  
  41. | PANU | | PANU | | PANU |  
  42.  
  43. +------+ +------+ +------+  


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.