Skip to Content
Wireless Hacks
book

Wireless Hacks

by Rob Flickenger
September 2003
Intermediate to advanced
304 pages
8h 39m
English
O'Reilly Media, Inc.
Content preview from Wireless Hacks

Bluetooth to GPRS in Linux

Use your Bluetooth phone as a modem when Wi-Fi isn’t available.

No doubt the novelty of being able to scan for nearby Bluetooth devices from your Linux machine will wear off all too soon, and you’ll be wanting to actually do things with your shiny new Bluetooth connection. Being able to use your cell phone as a modem from all those places you can’t pull in a Wi-Fi signal would be pretty cool, wouldn’t it?

Bluetooth supports a number of “profiles,” which define the way that Bluetooth devices can communicate with each other. In this case, we want to make use of the Dial-up Networking (DUN) profile, which relies on a protocol called RFCOMM to emulate a serial link between two devices. You can use RFCOMM to connect your Linux box to your phone, and then run pppd over the link to get access to the Internet. This works using GPRS, or even an ordinary Internet dial-up.

Assuming you’ve got Bluetooth working [Hack #16], you should be able to bring your phone within range of your computer and scan for it using hcitool. We’ll presume that you’ve done this, and that hcitool reports a BD address for your phone of 00:11:22:33:44:55.

You can also use sdptool to verify that there’s a device in range that supports the DUN profile:

$ sdptool search DUN Inquiring ... Searching for DUN on 00:11:22:33:44:55 ... Service Name: Dial-up Networking Service RecHandle: 0x10001 Service Class ID List: "Dialup Networking" (0x1103) "Generic Networking" (0x1201) Protocol Descriptor ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Maximum Wireless Security

Maximum Wireless Security

Cyrus Peikari, Seth Fogie
Real Time Over Wireless

Real Time Over Wireless

Jerome Henry / Rob Barton

Publisher Resources

ISBN: 0596005598Catalog PageErrata