https://wiki.archlinux.org/api.php?action=feedcontributions&user=Markhellewell&feedformat=atomArchWiki - User contributions [en]2024-03-29T16:02:14ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=IPhone_tethering&diff=98272IPhone tethering2010-02-26T07:50:35Z<p>Markhellewell: /* netcfg */</p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
== Introduction ==<br />
With the release of iPhone OS 3.0 it is possible to use the device as a 3G data modem over either USB or Bluetooth on Windows and OS X systems, without the need for jailbreaking. There is no official support for tethering on Linux systems and by the time of writing no working USB driver has been developed. However, tethering over Bluetooth is still an option.<br />
<br />
== Tethering over Bluetooth ==<br />
Tethering over Bluetooth will drain the batteries relatively quickly, but simultaneous charging from an USB port works well.<br />
<br />
=== Hardware Requirements ===<br />
* iPhone running OS 3.0 with tethering enabled. See Settings > General > Network and turn on the tethering option.<br />
* Bluetooth Adapter or similar, preferably with EDR(Enhanced Data Rate) for acceptable speeds. Tested with a Belkin F8T016NE.<br />
<br />
=== Setup ===<br />
From the article entitled [[Bluetooth]]:<br />
<br />
To use Bluetooth, the [http://www.bluez.org bluez] package for the Linux Bluetooth protocol stack must be installed:<br />
# pacman -S bluez<br />
<br />
Once bluez is installed, both the dbus daemon and the bluetooth daemon must be running:<br />
# /etc/rc.d/dbus start<br />
<br />
# /etc/rc.d/bluetooth start<br />
<br />
The dbus daemon is used to read settings and for pin pairing, while the bluetooth daemon is required for the Bluetooth protocol. It is important that dbus is started '''before''' bluetooth. If dbus was not running when bluetooth was started, then try (after dbus is running):<br />
<br />
# /etc/rc.d/bluetooth restart<br />
<br />
To start bluetooth automatically on boot, add bluetooth to your daemons array in rc.conf:<br />
DAEMONS=(... bluetooth)<br />
<br />
No further configuration seems to be necessary on Arch systems. If problems arise, see the first sources link for possible config file edits.<br />
<br />
==== Gnome ====<br />
Install the [[Blueman]] GTK+ Bluetooth manager<br />
<br />
# pacman -S blueman<br />
<br />
A Bluetooth icon should appear in your notification area. Click it, and search for nearby devices, adding your iPhone (note, you may need to have the Bluetooth setting screen up on your iPhone for discovery to work).<br />
<br />
Once the iPhone has been added to the devices list, select it, open the Device menu, choose Network Access > Network Access Point. If everything goes well, blueman reports a success and the status bar on your iPhone should glow blue, indicating a successful tether.<br />
<br />
Blueman will have created a new network interface, typically bnep0. To connect to it, run the following as root.<br />
<br />
# dhcpcd bnep0<br />
<br />
Optionally, if you have [[NetworkManager]] installed and want it to automatically connect to the bnep0 interface, '''blacklist''' the interface in your rc.conf just as with the other interfaces you want to be automatically handled:<br />
INTERFACES=(!eth0 !wlan0 '''!bnep0''' ...)<br />
<br />
NetworkManager might still automatically connect to the new interface initially, but on subsequent boots the above action is necessary.<br />
<br />
==== KDE ====<br />
To be added...<br />
<br />
==== netcfg ====<br />
<br />
Alternatively, you can create a [[netcfg]] network profile to allow easy tethering from the command line, without requiring [[Blueman]] or Gnome. Assuming an already paired iPhone with address '00:00:DE:AD:BE:EF', simply create a profile in /etc/network.d called - for example - 'tether':<br />
<br />
CONNECTION="ethernet"<br />
DESCRIPTION="Ethernet via pand tethering to iPhone"<br />
INTERFACE="bnep0"<br />
IPHONE="00:00:DE:AD:BE:EF"<br />
PRE_UP="pand -E -S -c ${IPHONE} -e ${INTERFACE} -n 2>/dev/null"<br />
POST_DOWN="pand -k ${IPHONE}"<br />
IP="dhcp"<br />
<br />
Then, either as root or using sudo, execute:<br />
<br />
netcfg tether<br />
<br />
To bring the interface down and un-tether:<br />
<br />
netcfg down tether<br />
<br />
== Tethering over USB ==<br />
Currently there is no USB driver for Linux, and therefore USB tethering is not supported. However, virtualization software can be used to enable networking within a Windows guest, potentially sharing the connection with the host system.<br />
<br />
=== USB tethering from within Windows guest in Virtualbox ===<br />
One potential way to accomplish this is to use a Windows guest in [[VirtualBox]], and present the host Arch system with a network interface (Host Only?). The working iPhone network device in Windows might then be bridged to the host only interface device within Windows. The iPhone USB network driver is installed together with iTunes. However, this has yet to be tested successfully. More info to come.<br />
<br />
== Sources ==<br />
# [http://jkeating.livejournal.com/75270.html jkeating: Tethering iPhone 3.0 with Linux (Fedora 11) over bluetooth]</div>Markhellewellhttps://wiki.archlinux.org/index.php?title=IPhone_tethering&diff=98120IPhone tethering2010-02-24T08:49:03Z<p>Markhellewell: /* netcfg */ network profile</p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
== Introduction ==<br />
With the release of iPhone OS 3.0 it is possible to use the device as a 3G data modem over either USB or Bluetooth on Windows and OS X systems, without the need for jailbreaking. There is no official support for tethering on Linux systems and by the time of writing no working USB driver has been developed. However, tethering over Bluetooth is still an option.<br />
<br />
== Tethering over Bluetooth ==<br />
Tethering over Bluetooth will drain the batteries relatively quickly, but simultaneous charging from an USB port works well.<br />
<br />
=== Hardware Requirements ===<br />
* iPhone running OS 3.0 with tethering enabled. See Settings > General > Network and turn on the tethering option.<br />
* Bluetooth Adapter or similar, preferably with EDR(Enhanced Data Rate) for acceptable speeds. Tested with a Belkin F8T016NE.<br />
<br />
=== Setup ===<br />
From the article entitled [[Bluetooth]]:<br />
<br />
To use Bluetooth, the [http://www.bluez.org bluez] package for the Linux Bluetooth protocol stack must be installed:<br />
# pacman -S bluez<br />
<br />
Once bluez is installed, both the dbus daemon and the bluetooth daemon must be running:<br />
# /etc/rc.d/dbus start<br />
<br />
# /etc/rc.d/bluetooth start<br />
<br />
The dbus daemon is used to read settings and for pin pairing, while the bluetooth daemon is required for the Bluetooth protocol. It is important that dbus is started '''before''' bluetooth. If dbus was not running when bluetooth was started, then try (after dbus is running):<br />
<br />
# /etc/rc.d/bluetooth restart<br />
<br />
To start bluetooth automatically on boot, add bluetooth to your daemons array in rc.conf:<br />
DAEMONS=(... bluetooth)<br />
<br />
No further configuration seems to be necessary on Arch systems. If problems arise, see the first sources link for possible config file edits.<br />
<br />
==== Gnome ====<br />
Install the [[Blueman]] GTK+ Bluetooth manager<br />
<br />
# pacman -S blueman<br />
<br />
A Bluetooth icon should appear in your notification area. Click it, and search for nearby devices, adding your iPhone (note, you may need to have the Bluetooth setting screen up on your iPhone for discovery to work).<br />
<br />
Once the iPhone has been added to the devices list, select it, open the Device menu, choose Network Access > Network Access Point. If everything goes well, blueman reports a success and the status bar on your iPhone should glow blue, indicating a successful tether.<br />
<br />
Blueman will have created a new network interface, typically bnep0. To connect to it, run the following as root.<br />
<br />
# dhcpcd bnep0<br />
<br />
Optionally, if you have [[NetworkManager]] installed and want it to automatically connect to the bnep0 interface, '''blacklist''' the interface in your rc.conf just as with the other interfaces you want to be automatically handled:<br />
INTERFACES=(!eth0 !wlan0 '''!bnep0''' ...)<br />
<br />
NetworkManager might still automatically connect to the new interface initially, but on subsequent boots the above action is necessary.<br />
<br />
==== KDE ====<br />
To be added...<br />
<br />
==== netcfg ====<br />
<br />
Alternatively, you can create a [[netcfg]] network profile to allow easy tethering from the command line, without requiring [[Blueman]] or Gnome. Assuming an already paired iPhone, simply create a profile in /etc/network.d called - for example - 'tether':<br />
<br />
CONNECTION="ethernet"<br />
DESCRIPTION="Ethernet via pand tethering to iPhone"<br />
INTERFACE="bnep0"<br />
IPHONE="00:00:DE:AD:BE:EF"<br />
PRE_UP="pand -E -S -c ${IPHONE} -e ${INTERFACE} -n 2>/dev/null"<br />
POST_DOWN="pand -k ${IPHONE}"<br />
IP="dhcp"<br />
<br />
Then, either as root or using sudo, execute:<br />
<br />
netcfg tether<br />
<br />
To bring the interface down and un-tether:<br />
<br />
netcfg down tether<br />
<br />
== Tethering over USB ==<br />
Currently there is no USB driver for Linux, and therefore USB tethering is not supported. However, virtualization software can be used to enable networking within a Windows guest, potentially sharing the connection with the host system.<br />
<br />
=== USB tethering from within Windows guest in Virtualbox ===<br />
One potential way to accomplish this is to use a Windows guest in [[VirtualBox]], and present the host Arch system with a network interface (Host Only?). The working iPhone network device in Windows might then be bridged to the host only interface device within Windows. The iPhone USB network driver is installed together with iTunes. However, this has yet to be tested successfully. More info to come.<br />
<br />
== Sources ==<br />
# [http://jkeating.livejournal.com/75270.html jkeating: Tethering iPhone 3.0 with Linux (Fedora 11) over bluetooth]</div>Markhellewellhttps://wiki.archlinux.org/index.php?title=Bluetooth&diff=98116Bluetooth2010-02-24T08:45:32Z<p>Markhellewell: added section for pairing from CLI with iPhone</p>
<hr />
<div>[[Category:Communication and network (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Bluetooth}}<br />
{{Article summary start}}<br />
{{Article summary text|Covers the installation and use of bluetooth on Arch Linux.}}<br />
{{Article summary end}}<br />
<br />
<br />
== Installation ==<br />
To use Bluetooth, the [http://www.bluez.org bluez] package for the Linux Bluetooth protocol stack must be installed:<br />
# pacman -S bluez<br />
<br />
Once bluez is installed, both the dbus daemon and the bluetooth daemon must be running:<br />
# /etc/rc.d/dbus start<br />
# /etc/rc.d/bluetooth start<br />
<br />
The dbus daemon is used to read settings and for pin pairing, while the bluetooth daemon is required for the Bluetooth protocol. It is important that dbus is started '''before''' bluetooth. If dbus was not running when bluetooth was started, then try (after dbus is running):<br />
<br />
# /etc/rc.d/bluetooth restart<br />
<br />
To start bluetooth automatically on boot, add bluetooth to your daemons array in [[rc.conf]] (after dbus):<br />
DAEMONS=(... bluetooth)<br />
<br />
== Graphical Front-ends ==<br />
<br />
The following packages allow for a graphical interface to customize Bluetooth.<br />
<br />
=== Blueman ===<br />
<br />
[http://blueman-project.org Blueman] is a full featured Bluetooth manager written in GTK and, as such, is recommended for [[GNOME]] or [[Xfce]]. Install Blueman using the pacman tool:<br />
# pacman -S blueman<br />
<br />
Be sure that ''bluetooth'' daemon is running as described above and execute ''blueman-applet''. To make the applet run on login add ''blueman-applet'' either under ''System -> Preferences -> Startup Applications'' (GNOME) or ''Xfce Menu -> Settings -> Session and Startup'' (Xfce).<br />
<br />
=== gnome-bluetooth ===<br />
<br />
[http://live.gnome.org/GnomeBluetooth gnome-bluetooth] is a fork of the old ''bluez-gnome'' and is focused on integration with the GNOME desktop environment. First, install gnome-bluetooth:<br />
# pacman -S gnome-bluetooth<br />
<br />
Run ''bluetooth-applet'' for a nice Bluetooth applet. You should now be able to setup devices and send files by right-clicking the Bluetooth icon. To make the applet run on login, add it to ''System -> Preferences -> Startup Applications''.<br />
<br />
To add a Bluetooth entry to the SendTo menu in Thunar's file properties menu, see: http://thunar.xfce.org/pwiki/documentation/sendto_menu<br />
<br />
=== kbluetooth ===<br />
<br />
The bluetooth tool fro KDE4 is kbluetooth and it is into [extra] repository. To install it type:<br />
# pacman -S kbluetooth<br />
Make sure bluetooth daemon runs, then launch kbluetooth. You should get a bluetooth icon in system tray, from which you can configure kbluetooth, detect bluetooth devices, etc. by right-clicking the icon.<br />
<br />
=== Fluxbox, openbox, other wm ===<br />
Of course you can still use the preceding applications even if GNOME, Xfce or KDE are not your desktop manager. This list should help you figuring out which application does what:<br />
* bluetooth-applet -- tray icon with access to settings, pairing wizard, management of known devices<br />
* /usr/lib/gnome-user-share/gnome-user-share -- needs to be running if you're about to receive files via obexBT from a paired/bonded device (if you're receiving an error during transmission and/or there's no file received add<br />
<br />
<policy user="your_user_id"><br />
<allow own="org.bluez"/><br />
<allow send_destination="org.bluez"/><br />
<allow send_interface="org.bluez.Agent"/><br />
</policy><br />
<br />
into <tt>/etc/dbus-1/system.d/bluetooth.conf</tt>)<br />
* bluetooth-wizard -- for new devices to be paired<br />
* bluetooth-properties -- accessible also via bluetooth-applet icon<br />
* gnome-file-share-properties -- permissions on receiving files via bluetooth<br />
* bluez-sendto -- gui for sending files to a remote device<br />
<br />
<br />
== Manual Configuration ==<br />
<br />
To configure bluetooth (<tt>bluez</tt>) manually, you will need to edit the configuration files in <tt>/etc/bluetooth</tt>. These are:<br />
audio.conf<br />
input.conf<br />
main.conf<br />
network.conf<br />
rfcomm.conf<br />
<br />
The default configuration should work for most purposes. Most configuration options are well-documented in these files, so customization is a simple matter of reading the option descriptions. For general options, start with <tt>main.conf</tt>.<br />
<br />
<br />
== Pairing ==<br />
{{Note | This section might not be completely accurate. Thanks to Gattschardo for the pin solution''}}<br />
<br />
Many bluetooth devices require [http://en.wikipedia.org/wiki/Bluetooth#Pairing pairing].<br />
The exact procedure depends among other on the devices involved, and their input functionality.<br />
The procedure on a mobile may be as follows:<br />
* The computer sends a connect request to the mobile. <br />
* A pin, determined by the computer, is prompted for at the mobile<br />
* The same key must be re-entered at the computer.<br />
<br />
To scan for external devices, do<br />
$> hcitool scan<br />
<br />
To pair with a device without using the gnome-bluez package you will need to use a tool named ''bluez-simple-agent'' that comes with the bluez package. You need a few python related packages from the regular repositories to get this to run: dbus-python and pygobject. If you have everything ready you can start the script from the root user:<br />
<br />
$> bluez-simple-agent<br />
<br />
If it all works, you should get the message "Agent registered" on that console. You can now start pairing from your mobile device, and the script will ask you for the passcode on this console, you type it and confirm with enter - voila that's all. You can now also shut down the agent using ^C-c, you need it only for pairing, not every time you want to connect. If you can`t discover computer from your phone, go to [[Bluetooth#My_computer_isn.60t_visible|troubleshooting section]].<br />
<br />
For an example scroll down to the example section.<br />
<br />
<br />
== Using Obex for sending and receiving files ==<br />
Another option, rather than using KDE or Gnome Bluetooth packages, is Obexfs which allows you to mount your phone and treat it as part of your filesystem. Note that to use Obexfs, you need a device that provides an Obex FTP service.<br />
<br />
To install;<br />
# pacman -S obexfs<br />
<br />
and then your phone can then be mounted running as root <br />
# obexfs -b <devices mac address> /mountpoint<br />
<br />
For more mounting options see http://dev.zuckschwerdt.org/openobex/wiki/ObexFs<br />
<br />
<br />
== Examples ==<br />
<br />
=== Siemens S55 ===<br />
<br />
This is what I did to connect to my S55. (I have not figured out how to initiate the connection from the phone)<br />
* The steps under installation<br />
* <br />
$> hcitool scan<br />
Scanning ...<br />
XX:XX:XX:XX:XX:XX NAME<br />
$> B=XX:XX:XX:XX:XX:XX<br />
Start the simple-agent in a second terminal<br />
$> su -c bluez-simple-agent <br />
Password: <br />
Agent registered<br />
Back to the first console <br />
$> obexftp -b $B -l "Address book"<br />
# Phone ask for pin, I enter it and answer yes when asked if I want to save the device<br />
...<br />
<file name="5F07.adr" size="78712" modified="20030101T001858" user-perm="WD" group-perm="" /><br />
...<br />
$> obexftp -b 00:01:E3:6B:FF:D7 -g "Address book/5F07.adr"<br />
Browsing 00:01:E3:6B:FF:D7 ...<br />
Channel: 5<br />
Connecting...done<br />
Receiving "Address book/5F07.adr"... Sending "Address book"... done<br />
Disconnecting...done<br />
$> obexftp -b 00:01:E3:6B:FF:D7 -p a <br />
...<br />
Sending "a"... done<br />
Disconnecting...done<br />
<br />
=== Logitech Mouse MX Laser===<br />
<br />
Connect Bluetooth Logitech Mouse MX Laser without Dongle.<br />
$> hidd --connect XX:XX:XX:XX:XX:XX<br />
<br />
=== Motorola V900 ===<br />
<br />
After installing blueman and running blueman-applet, click "find me" under connections -> bluetooth in motorla device. In blueman-applet, scan devices, find the motorola, click "add" in blueman-applet. Click "bond" in blueman-applet, enter some pin, enter the same pin in motorola when it asks. In terminal:<br />
<br />
cd ~/<br />
mkdir bluetooth-temp<br />
obexfs -n xx:yy:zz:... ~/bluetooth-temp<br />
cd ~/bluetooth-temp<br />
<br />
and browse... Only audio, video, and pictures are available when you do this.<br />
<br />
=== Pairing with an iPhone using bluez-simple-agent ===<br />
<br />
Assuming a bluetooth device called hci0 and an iPhone that showed up in a hcitool scan as '00:00:DE:AD:BE:EF':<br />
<br />
# bluez-simple-agent hci0 00:00:DE:AD:BE:EF<br />
Passcode:<br />
<br />
== Troubleshooting ==<br />
<br />
=== passkey-agent ===<br />
$> passkey-agent --default 1234<br />
Can't register passkey agent<br />
The name org.bluez was not provided by any .service files<br />
You probably started <tt>/etc/rc.d/bluetooth</tt> before <tt>/etc/rc.d/dbus</tt><br />
$> hciconfig dev<br />
# (no listing)<br />
Try running <tt>hciconfig hc0 up</tt><br />
<br />
=== Blueman ===<br />
If blueman-applet fails to start, try removing the entire ''/var/lib/bluetooth'' directory and restarting the machine (or just the hal, dbus, and bluetooth services).<br />
# rm -rf /var/lib/bluetooth<br />
# reboot<br />
<br />
=== gnome-bluetooth ===<br />
If you see this when trying to enable receiving files in bluetooth-properties:<br />
Bluetooth OBEX start failed: Invalid path<br />
Bluetooth FTP start failed: Invalid path<br />
Then run:<br />
# pacman -S xdg-user-dirs<br />
$ xdg-user-dirs-update<br />
You can edit the paths using:<br />
$ vi ~/.config/user-dirs.dirs<br />
<br />
=== Bluetooth USB Dongle ===<br />
If you are using a USB dongle, you should check that your Bluetooth dongle is recognized. You can do that by inspecting <tt>/var/log/messages.log</tt> when plugging in the USB dongle. It should look something like the following (look out for hci):<br />
<br />
# tail -f /var/log/messages.log<br />
May 2 23:36:40 tatooine usb 4-1: new full speed USB device using uhci_hcd and address 9<br />
May 2 23:36:40 tatooine usb 4-1: configuration #1 chosen from 1 choice<br />
May 2 23:36:41 tatooine hcid[8109]: HCI dev 0 registered<br />
May 2 23:36:41 tatooine hcid[8109]: HCI dev 0 up<br />
May 2 23:36:41 tatooine hcid[8109]: Device hci0 has been added<br />
May 2 23:36:41 tatooine hcid[8109]: Starting security manager 0<br />
May 2 23:36:41 tatooine hcid[8109]: Device hci0 has been activated<br />
<br />
For a list of supported hardware please refer to the [[Bluetooth#Resources|resources]] section on this page.<br />
<br />
If you only get the first two lines, you may see that it found the device but you need to bring it up.<br />
Example:<br />
<br />
hciconfig -a hci0<br />
hci0: Type: USB<br />
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0<br />
DOWN <br />
RX bytes:0 acl:0 sco:0 events:0 errors:0<br />
TX bytes:0 acl:0 sco:0 commands:0 errors:<br />
sudo hciconfig hci0 up<br />
hciconfig -a hci0<br />
hci0: Type: USB<br />
BD Address: 00:02:72:C4:7C:06 ACL MTU: 377:10 SCO MTU: 64:8<br />
UP RUNNING <br />
RX bytes:348 acl:0 sco:0 events:11 errors:0<br />
TX bytes:38 acl:0 sco:0 commands:11 errors:0<br />
<br />
To verify that the device was detected you can use <tt>hcitool</tt> which is part of the <tt>bluez-utils</tt>. You can get a list of available devices and their identifiers and their MAC address by issuing:<br />
<br />
$ hcitool dev<br />
Devices:<br />
hci0 00:1B:DC:0F:DB:40<br />
<br />
More detailed informations about the device can be retrieved by using <tt>hciconfig</tt>.<br />
<br />
$ hciconfig -a hci0<br />
hci0: Type: USB<br />
BD Address: 00:1B:DC:0F:DB:40 ACL MTU: 310:10 SCO MTU: 64:8<br />
UP RUNNING PSCAN ISCAN <br />
RX bytes:1226 acl:0 sco:0 events:27 errors:0<br />
TX bytes:351 acl:0 sco:0 commands:26 errors:0<br />
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80<br />
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 <br />
Link policy: RSWITCH HOLD SNIFF PARK <br />
Link mode: SLAVE ACCEPT <br />
Name: 'BlueZ (0)'<br />
Class: 0x000100<br />
Service Classes: Unspecified<br />
Device Class: Computer, Uncategorized<br />
HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c<br />
Manufacturer: Cambridge Silicon Radio (10)<br />
<br />
=== hcitool scan: Device not found ===<br />
On some Dell laptops (e.g. Studio 15) you have to switch the Bluetooth mode from HID to HCI using<br />
# hid2hci<br />
<br />
=== My computer isn't visible ===<br />
Can't discover computer from your phone? Enable PSCAN and ISCAN:<br />
# enable PSCAN and ISCAN<br />
$ hciconfig hci0 piscan <br />
# check it worked<br />
$ hciconfig <br />
hci0: Type: USB<br />
BD Address: 00:12:34:56:78:9A ACL MTU: 192:8 SCO MTU: 64:8<br />
'''UP RUNNING PSCAN ISCAN'''<br />
RX bytes:20425 acl:115 sco:0 events:526 errors:0<br />
TX bytes:5543 acl:84 sco:0 commands:340 errors:0<br />
<br />
{{Note | Check DiscoverableTimeout and PairableTimeout in /etc/bluetooth/main.conf}}<br />
<br />
== Resources ==<br />
*[http://www.bluez.org Official Linux Bluetooth protocol stack]<br />
*[http://www.holtmann.org/linux/bluetooth/devices.html List of Linux supported Bluetooth Hardware] >> The List is not aviable anymore!<br />
*[http://en.opensuse.org/HCL/Bluetooth_Adapters openSUSE Bluetooth Hardware Compatibility List (HCL)]<br />
*[http://www.gentoo.org/doc/en/bluetooth-guide.xml Gentoo wiki is usually good]<br />
*[http://linuxgazette.net/109/oregan3.html Accessing a Bluetooth phone on Linux Gazette]<br />
*[http://www.adamish.com/blog/#a000361 Bluetooth computer visibility]</div>Markhellewellhttps://wiki.archlinux.org/index.php?title=IPhone_tethering&diff=98114IPhone tethering2010-02-24T08:38:30Z<p>Markhellewell: </p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
== Introduction ==<br />
With the release of iPhone OS 3.0 it is possible to use the device as a 3G data modem over either USB or Bluetooth on Windows and OS X systems, without the need for jailbreaking. There is no official support for tethering on Linux systems and by the time of writing no working USB driver has been developed. However, tethering over Bluetooth is still an option.<br />
<br />
== Tethering over Bluetooth ==<br />
Tethering over Bluetooth will drain the batteries relatively quickly, but simultaneous charging from an USB port works well.<br />
<br />
=== Hardware Requirements ===<br />
* iPhone running OS 3.0 with tethering enabled. See Settings > General > Network and turn on the tethering option.<br />
* Bluetooth Adapter or similar, preferably with EDR(Enhanced Data Rate) for acceptable speeds. Tested with a Belkin F8T016NE.<br />
<br />
=== Setup ===<br />
From the article entitled [[Bluetooth]]:<br />
<br />
To use Bluetooth, the [http://www.bluez.org bluez] package for the Linux Bluetooth protocol stack must be installed:<br />
# pacman -S bluez<br />
<br />
Once bluez is installed, both the dbus daemon and the bluetooth daemon must be running:<br />
# /etc/rc.d/dbus start<br />
<br />
# /etc/rc.d/bluetooth start<br />
<br />
The dbus daemon is used to read settings and for pin pairing, while the bluetooth daemon is required for the Bluetooth protocol. It is important that dbus is started '''before''' bluetooth. If dbus was not running when bluetooth was started, then try (after dbus is running):<br />
<br />
# /etc/rc.d/bluetooth restart<br />
<br />
To start bluetooth automatically on boot, add bluetooth to your daemons array in rc.conf:<br />
DAEMONS=(... bluetooth)<br />
<br />
No further configuration seems to be necessary on Arch systems. If problems arise, see the first sources link for possible config file edits.<br />
<br />
==== Gnome ====<br />
Install the [[Blueman]] GTK+ Bluetooth manager<br />
<br />
# pacman -S blueman<br />
<br />
A Bluetooth icon should appear in your notification area. Click it, and search for nearby devices, adding your iPhone (note, you may need to have the Bluetooth setting screen up on your iPhone for discovery to work).<br />
<br />
Once the iPhone has been added to the devices list, select it, open the Device menu, choose Network Access > Network Access Point. If everything goes well, blueman reports a success and the status bar on your iPhone should glow blue, indicating a successful tether.<br />
<br />
Blueman will have created a new network interface, typically bnep0. To connect to it, run the following as root.<br />
<br />
# dhcpcd bnep0<br />
<br />
Optionally, if you have [[NetworkManager]] installed and want it to automatically connect to the bnep0 interface, '''blacklist''' the interface in your rc.conf just as with the other interfaces you want to be automatically handled:<br />
INTERFACES=(!eth0 !wlan0 '''!bnep0''' ...)<br />
<br />
NetworkManager might still automatically connect to the new interface initially, but on subsequent boots the above action is necessary.<br />
<br />
==== KDE ====<br />
To be added...<br />
<br />
==== netcfg ====<br />
<br />
Alternatively, you can create a [[netcfg]] network profile to allow easy tethering from the command line. Assuming an already paired iPhone, simply create a profile in /etc/network.d called - for example - 'tether':<br />
<br />
CONNECTION="ethernet"<br />
DESCRIPTION="Ethernet via pand tethering to iPhone"<br />
INTERFACE="bnep0"<br />
IPHONE="00:00:DE:AD:BE:EF"<br />
PRE_UP="pand -E -S -c ${IPHONE} -e ${INTERFACE} -n 2>/dev/null"<br />
POST_DOWN="pand -k ${IPHONE}"<br />
IP="dhcp"<br />
<br />
Then, either as root or using sudo, execute:<br />
<br />
netcfg tether<br />
<br />
To bring the interface down and un-tether:<br />
<br />
netcfg down tether<br />
<br />
== Tethering over USB ==<br />
Currently there is no USB driver for Linux, and therefore USB tethering is not supported. However, virtualization software can be used to enable networking within a Windows guest, potentially sharing the connection with the host system.<br />
<br />
=== USB tethering from within Windows guest in Virtualbox ===<br />
One potential way to accomplish this is to use a Windows guest in [[VirtualBox]], and present the host Arch system with a network interface (Host Only?). The working iPhone network device in Windows might then be bridged to the host only interface device within Windows. The iPhone USB network driver is installed together with iTunes. However, this has yet to be tested successfully. More info to come.<br />
<br />
== Sources ==<br />
# [http://jkeating.livejournal.com/75270.html jkeating: Tethering iPhone 3.0 with Linux (Fedora 11) over bluetooth]</div>Markhellewell