Connect a smartphone to a PC using Bluetooth in Linux and access the Internet using a PC Network

Source: Internet
Author: User
Tags introductions
Many Netizens hope to connect to the PC network using the Bluetooth of a smart phone so as to achieve the Internet access through the mobile phone (note that the difference is different from the GPRS of the mobile phone used by the PC). The benefits of doing so are: high speed (much faster than GPRS), no money (using a PC Network ).. there are few introductions on this aspect on the network, and some of them are mainly about the method in the window. here, I have summarized the articles on the use of Linux (Ubuntugusty) for implementation on Foreign networks, which can be used by the author's w958c. main step package

Many Netizens hope to connect to the PC network using the Bluetooth of a smart phone so as to achieve the Internet access through the mobile phone (note that the difference is different from the GPRS of the mobile phone used by the PC). The benefits of doing so are:

High speed (much faster than GPRS), no money (using a PC Network ).. there are few introductions on this aspect on the network, and some of them are mainly about the method in the window. here,
I have summarized the articles on the use of Linux (Ubuntu gusty) for implementation on the internet outside China, which can be used by the author's w958c verification.
The main steps include.
1. Install the corresponding bluetooth Software Package, including bluetooth, bluez-utils, and bluez-gnome.
2. Install iptables and dhcp3-server (mainly to achieve automatic allocation of Mobile IP addresses ).
3. bluetooth configuration. Main content includes:
A. Modify the/etc/bluetooth/hcid. conf file,
Lm accept;
Change
Lm accept, master;
B. Modify the/etc/default/bluetooth File
PAND_ENABLED = 0
Is
PAND_ENABLED = 1
Modify
PAND_OPTIONS = ""
Is
PAND_OPTIONS = "-- listen -- role = NAP -- devup/etc/bluetooth/pan/dev-up"
C. Create the/etc/bluetooth/pan directory and create the dev-up file under the pan directory. The file content is as follows:
#! /Bin/sh
Ifup -- force
Echo 1>/proc/sys/net/ipv4/ip_forward
Sleep 2
/Etc/init. d/dhcp3-server restart
D. Add executable permissions to the dev-up file.
The above steps aim to enable the PAN network, so that once the mobile phone connects to the PC-side Bluetooth adapter and performs network operations,
The dev-up file will be executed. In the dev-up file, we will bring up bnep0 device (see ifup -- force ..
Be sure to add force. Otherwise, a problem may occur during the second connection.) Here is the bnepx passed down by blue-utils.

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.