[Asus  Eee Pad Transformer Prime] neatfires:
(tl;dr, experienced modders: skip to the steps section below)

I've spent several days trying to set up sharing of my mobile phone's Internet connection with my tf201. The phone (Nokia 6120 classic, running Symbian S60) has neither WIFI, nor bluetooth PAN (don't worry, the terminology is explained below), and there's no PDANet version available for it, which left me with two ways to tether with it: wired USB connection or bluetooth DUN. I show here how to configure both. You might want to do this if you're in a similar position as myself, but also if you want to replace wifi tethering with bluetooth DUN (bluetooth is said to be less power-hungry).

While I'd like the howto to be accessible to novices (such as myself), I can't cover basic/trivial parts and in general will assume a reader capable of googling and with a basic Linux familiarity.

This post does NOT relate to the issue of enabling bluetooth DUN on your Android phone or changing the server side of the connection in other ways. Please don't comment about that in this thread.

My primary source is this outstanding article in Russian, which solves the same problem for a different tablet: notioninkinfo.ru/telefon_kak_3g_edge_modem_dlya_adama/

The process turned out to be much simpler for Prime, since it has most of the necessary software in place.

Background

Sharing internet connection from your mobile phone to another device is called "tethering". Obviously, tethering has great importance when mobile devices are involved, thus a naive soul could hope that it works perfectly in Android. Surprisingly, the opposite is the truth: Android hates tethering with passion; so much that (stupidity being inapplicable) I have no choice but to suspect malice on Google's/ASUS's part. It's not that they lack the resources to implement it; or that the feature requires some kind of special know-how they don't have. No: all these features are present and work in vanilla Linux; the appropriate kernel drivers exist and work; in some cases, the features worked in earlier versions of Android, but have been disabled in later ones. Some bugtracker issues related to this have not received any attention, despite having tens to hundreds of comments from angry users. code.google.com/p/android/issues/detail?id=16717&q=dun&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

/rant

About tethering

There are multiple ways to do tethering that I know of (and probably then a few more). Most of them, unfortunately, are not enabled out of the box or even implemented in Prime at all.

1. Wifi hotspot: this works well *if* your phone supports it. "Hotspot" means that the device acts as a kind of router that is "meant" to accept connections from other devices and not just "happens" to have wifi. AFAIK, from the practical perspective, the only distinction is that the devices present themselves differently.

2. Adhoc wifi: this is the opposite of "hotspot wifi". Transformer Prime with Ice Cream Sandwich (ICS) does not currently support connecting to an adhoc wifi network directly. The feature was present and worked fine in some previous Android versions, but thanks to an offending kernel commit, no longer works in ICS. The only known workarounds are PDANet (see below) or making a custom ROM with a patched kernel. I don't recommend trying the latter at this time, as very few brave souls have already done it, and that was the last anyone heard of them I don't know if all the issues have been ironed out.

3. Bluetooth. There are two ways of connecting through Bluetooth (that I know of). In order to work, both require certain capabilities, or profiles, to be enabled on your phone. It is quite possible none of the two profiles are enabled or even implemented, in which case you're screwed.

3.1. PAN (Personal Area Network): treats the phone as an intelligent device. When connecting to the Internet, the client "asks" the server to establish the link and only forward data from and to the client. This is one of the best ways to do tethering, and fully supported by Prime's user interface out of the box.

3.2. DUN (Dial-Up Networking): treats the phone as a "dumb" device: the client takes over the phone's modem and uses it directly by sending it both commands and data through an emulated serial (RS232) link. This has several disadvantages, among them it requires the client to be aware of the line provider's dial-up config, such as service number, service name, user and password. Prime does not support it out of the box, despite (as we will see) having adequate hardware and software for it.

4. PDANet: this is an application (accessible from the market) that somehow circumvents Prime's and Android's restrictions on wifi and BT connectivity. You install it on both devices, configure it, and it should work. This method is only applicable to a few platforms that PDANet supports, including Android, but not Symbian.

5. USB: if your Prime has the dock, you've got a full-size USB port on it, which can act as a USB host. You can use this port to connect to your mobile phone (if your phone supports it). In some cases, connecting the phone will cause the Prime to discover the phone's modem, and once it is discovered, you can use it just like DUN.

Methods available out of the box: (1), (3.1). Methods this howto is concerned with: (3.2) and (5).

Prerequisites

1. Ice Cream Sandwich (ICS). It is possible the guide will work with earlier versions, but I didn't try it.

2. The tablet is rooted.

3. adb is installed.

There are plenty of other topics that explain how to get these.

Steps

(Note that I'm writing this from memory, so some inaccuracies are inevitable.)

1. connect the tablet to your PC with adb and execute:

adb shell

2. become superuser:

su

3. make /system writable:

mount -o rw,remount /system

4. download the attached ppp scripts

5. download a pre-compiled rfcomm binary here: omappedia.org/wiki/Android:_Working_with_pre-built_binaries

... or build it yourself. Or, if you're stupid enough to trust a random person on the internet, you can use the rfcomm binary included in the attachment.

6. gather the necessary info:

6.1. for USB:

6.1.1. connect your phone to the tablet by USB cable and try to make the tablet recognize it as a modem. This could vary from phone to phone. My 6120c Nokia needs to be connected in "Nokia PC Suite" mode.

6.1.2.

ls /dev/tty*

. If it worked, you should see new device(s) in the list. In my case, I got /dev/ttyACM0 and /dev/ttyACM1. I'm not sure why it creates two devices instead of one, but using /dev/ttyACM0 seems to work fine.

6.2. for DUN:

6.2.1. enable bluetooth both in the tablet and in the phone and pair them

6.2.2.

sdptool search DUN

The output should look like this:

Searching for DUN on [B]00:1E:A4:66:94:2E[/B] ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10019
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: [B]2[/B]

7. Using the above information, fill the placeholders in the scripts you downloaded. In particular, the following must be replaced with real settings:

7.1. the device on line 8 in 3g_usb. Replace "/dev/ttyACM0" with the device you got in step 6.1.2

7.2. MAC and channel in 3g_bt_up. Use the values you got in step 6.2.2.

7.3. username and password in 3g_usb and 3g_bt. If you can use mobile internet from your phone, these values are already stored in the phone, so you just need to find them in the settings. Failing that, search for the correct values for your operator on the net (they are often the same for all users of the operator) or inquire the operator.

7.4. host name in 3gchat. Again, this varies from operator to operator. Note that the host name need not end with "com" or another valid root domain, and can thus sound nonsensical, e.g. "internet.internet". In my case (Israeli operator called Rami Levi), it was "internet.rl".

7.5. There are more operator-specific settings you might need to change in 3gchat, e.g. the dial-up number. In case the current value (*99***1# in my script) doesn't work, you can most likely find those on the net. If it doesn't work, search the net with query like "pppd chat <MY OPERATOR>" (without the quotes).

8.

adb push 3gchat /etc/ppp/
adb push 3g_bt_pdown /system/bin/

8.1. for usb connectivity:

adb push 3g_usb /etc/ppp/peers/
adb push 3g_usb_pup /system/bin/

6.2. for DUN connectivity (mind the trailing slashes):

adb push 3g_bt /etc/ppp/peers/
adb push 3g_bt_pup /system/bin/
adb push rfcomm /system/xbin/

7.

adb shell
chmod 0755 /etc/ppp/3gchat /system/bin/3g_usb_pup /system/bin/3g_usb_pdown /system/bin/3g_bt_pup /system/bin/3g_bt_pdown /system/xbin/rfcomm

8. try running 3g_bt_pup and 3g_usb_pup in adb

9. if it works, find a way to run these scripts directly on the Prime. E.g., you might want to make a GUI launcher for every one of 3g_bt_pup, 3g_usb_pup, 3g_pdown. The author of the original article recommends an app called GScript. I personally never tried it, as I just use Terminal Emulator from the market.

10. (Don't forget to remount /system in ro mode.)

Known issues

1. DNS refuses to work when you connect through the scripts. A workaround that I found is to connect to a wifi, then disconnect, then connect using the scripts. DNS will continue working until the next reboot. (I didn't have enough time to play with it yet, so not sure this is consistent.)

2. I consistently get 2-3 times slower download speed through DUN than through USB. Perhaps this has something to do with my phone, OTOH could be a problem in the scripts.

Enjoy! Corrections, tweaks, fixes are welcome.