Blackberry DUN Bluetooth Tethering Guide
WARNING!! FOR EXPERTS ONLY! YOU'VE BEEN WARNED! THIS IS NOT A SIMPLE CLICK AND DONE. IT MAY FRUSTRATE YOU!
This may or may not work for you, don't be surprised if it doesn't. Also Tethering may or may not be supported by your carrier. Data Plan recommended! @@
Your Mobile carrier may charge tethering fees, Continue at your own risk!
I suggest you read the whole thing before you action, and also please bare with my english, as it is my 3rd language.
Tether via Terminal: (Thanks lophyte for this great guide)
http://forum.cyanogenmod.com/topic/...-gtab-to-your-blackberry-phone-via-bluetooth/
I did not develop any apps or any scripts of any kind.
This was all done with some extensive research and alot of Trial and Error.
But with the little information I found out there, I was able to find some pretty interesting things.
I found this app called Q5 DUN, which was designed for an Old Internet Tablet called the SmartQ5 and ran Android 1.5.....
Therefore support is very limited, and there was only 2 updates back in 2009.
Also, I will be quoting guides out there, but I will properly credit the author for their efforts & findings. (Mostly lophyte )
Also would like to Thank RimDroid helping me with the research.
Click to expand...
Click to collapse
What you need:
-ALOT OF PATIENCE!
- Rooted Android Tablet ( I'm using a HP TouchPad )
- Android 2.3.7 (Reported by nihjar that it works on ICS!!)
- Blackberry Mobile Device with DUN Profile. ( I'm using BB Bold 9700 with OS 6 installed ) *Other Mobile's may work, need further testing*
- Terminal app
- Root Explorer app
- Super User app
- Q5 Bluetooth Dial Up Network app by wsoft2002
- Berry4All Scripts
- Chat Binary compiled by lophyte (Originally compiled for GTab, but works on my HP Touchpad) or you can compile one, link in lophyte's guide. **NOTE**(Reported by nihjar that it works on ICS!!)
Currently there are two ways to tether BT:
Option 1: Using the Q5 Bluetooth Dial Up Network app and modifying the Build.prop <-- Easiest Method, but buggy! But once configured, works perfectly!
Option 2: Running terminal commands <-- Connecting Manually thru Linux commands.
We will be installing both options in this guide.
Click to expand...
Click to collapse
- Make sure DUN is enabled on your BB ( Search google for guides on this )
Step 1: Download and Install on Android
-Install Root Explorer (if you don't have it already)
-Install Terminal (if you don't have it already)
-Install Q5 DUN http://android.gval.biz/
Step 2: Download the following on your PC
Berry4All Scripts Here
Chat Binary compiled by lophyte to Tether with Gtab Link to his Guide Here
File
lophyte said:
Download the berry4all package and find the config for your provider.
Berry4all is a Linux bluetooth tethering package that contains various pppd configurations for mobile providers. If your provider is not available in this package, you'll need to Google around for a proper pppd config and chatscript to allow you to tether to your blackberry or other mobile phone.
Click to expand...
Click to collapse
-Create a new folder which you will be placing the following files to better manage them.
-Copy the Chat binary file into the new folder.
-Extract bbtether and find the 2 files in /conf/ that corresponds to your mobile network, and copy those 2 files into the new folder. In this guide I will be using Rogers as an example. In this case, rogers & rogers-chat
lophyte said:
Modify the configurations
I haven't looked at the configs for the other providers, but the Rogers config needed a little bit of modification. The following line in my ppp peer config file needed to be changed:
Click to expand...
Click to collapse
Step 3:Modify the configurations
-Open rogers in a text editor ( I recommend Notepad ++)
-Find the line
connect "/usr/sbin/chat -f conf/rogers-chat
Click to expand...
Click to collapse
& change this line to:
connect "/system/bin/chat -f /etc/ppp/chatscripts/rogers-chat"
Click to expand...
Click to collapse
*NOTE* Edit the rogers-chat to which ever mobile provider you are using
-Find the line with 'novj' and place a # in front of it. Or Delete it, which ever is fine.
Your File should look like this:
# Tested by Max Taranukha
115200
noipdefault
defaultroute
#nomultilink
ipcp-restart 7
ipcp-accept-local
ipcp-accept-remote
lcp-echo-interval 0
lcp-echo-failure 999
nopcomp
noaccomp
pap-timeout 20
pap-restart 20
lcp-restart 10
#noauth
crtscts
usepeerdns
nomagic
noccp
#novj
user wapuser
password wap
name wapuser
#debug debug debug
# does not exist in all pppd versions (osx)
#replacedefaultroute
connect "/system/bin/chat -f /etc/ppp/chatscripts/rogers-chat"
Click to expand...
Click to collapse
**NOTE** Change UserName & Password that matches your APN settings.**
-Save and Exit.
Step 4:Now its time to copy these files to our Routed Android Devices.
-You will need to use Root Explorer to copy these files to your device, or Adb Push. ( Lookup the forums for on how to )
-Copy chat binary into /system/bin/ overwrite if prompt.
-Copy your mobile config files into these folders respectively.
a) rogers-chat -> /etc/ppp/peers (create this folders if it doesn't exist)
b) rogers -> /etc/ppp/chatscripts (create this folder if it doesn't exist}
-Reboot Device
-Once rebooted, you will need to pair your mobile device to your android device. Delete the profiles if it already exist, & pair again. (BT is buggy)
-Keep Bluetooth On.
Now here comes the most frustrating part... connecting!
Step 5:Configuring Q5 DUN
The best and easiest way to find you DUN MAC and Channel is using Q5 IMO,
but you can also use Linux commands. ( Terminal Tether guide above )
-Make sure you turn on BT, as this app does not toggle the BT on.
-Use this guide by wsoft2002 to configure Q5http://android.gval.biz/Q5_Bluetooth_DUN_installations.php
-In the Dial-Up Script, this is where the rogers-chat come into play.
-Open rogers-chat (your provider) file in Text Editor via Root Explorer.
-Select all Text and Copy in the the Dial-Up Script.
Your Dial-Up should look like this:
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
SAY 'Starting GPRS connect script\n'
'' 'BBT_OS'
'' 'ATZ'
SAY 'Setting APN\n'
OK 'AT+CGDCONT=1,"IP","internet.com"'
ABORT 'NO CARRIER'
SAY 'Dialing...\n'
OK 'ATD*99#'
CONNECT
# Without ~p it does NOT continue passed Connect !!
~p
Click to expand...
Click to collapse
*Note the "internet.com", this is where you put your mobile APN. ( Google search if your mobile is not in the bbtether folder ) or settings on your phone.
**Note that the 'ATD*99#' will differ depending on the carrier. You can try 'ATD*99***1#' if that doesn't work, (try to google 'your carrier' ATD)
***Thanks to Nijhar he found out that on Telus Network, ~p causes connection issues in Q5, so this may vary for you. (Trial and Error!)
****NEW**** Found * Another way to find you isp APN settings, using Blackberry Desktop Software, and plugging in the mobile device, you can browse all authorized BB carriers.
-Save Configuration & Hit connect to Test it out.
Allow the connection and checkmark 'Do not show again'
If you get 'PPP Connection is UP!' GREAT! Skip to Step 7.
-If you get 'PPP Failed to connect' then obviously it didn't work.
Now there are a few factors that causes PPP failed to connect.
a) Q5 not setup properly, I suggest you double check your settings.
b) Pairing problems, or Trust permissions. Re-Pairing might fix it.
c) Remove or Add ~p from the chat script.
d) Reboot both devices and try again.
e) Tether is not supported by your carrier.
f) Make sure Dial-Up Networking Service is enabled on your phone. in Bluetooth connections>paired devices>Touchpad (May vary depending on BB OS)
Step 6:Testing BT connection in Terminal
Q5 might not work for you, so Terminal will be your next Option.
-Open Terminal and type 'su' for super user rights.
-type the following '# rfcomm bind /dev/rfcomm0 <bluetooth MAC> <channel>'
-then type 'pppd /dev/rfcomm0 call rogers' <- change 'rogers' to your carrier.
-Look at your Blackberry 'Modem Mode Enabled' should appear if it connects.
-If it does not connect, please revise the guide and make sure you have done everything exactly up till now.
-'# killall pppd ' to end the connection
Step 7:Configuring DNS to Google's DNS or of your choise
-In Terminal
-Type 'su'
-Then 'setprop net.dns1 8.8.8.8'
-Next 'setprop net.dns2 8.8.4.4'
*You can put as much as dns4 if you like, but Google's DNS should work fine**
Step 8:Testing Internet Connection
-Browsing
-Youtube
-Facebook
-Apps & Games (Trial & Error)
Step 9:Modifying the build.prop to eliminate setprop net.dns on reboot.
-Add net.dns1=8.8.8.8 & net.dns2=8.8.4.4
Working:
-Browsing the Web
-Streaming Video/Music
-Downloading Files using Opera Browser(Perfect), or xwind downloader app(Not perfect, but will work with any browser). Or use share link to Opera browser to DL using 'Choose Browser app found on the Market' -NEW-
-GO Launcher EX works great! Weather widget, facebook, e-mail etc all works! <~ If you want a fully functional homescreens,widgets etc
-Rogers,Telus & Bell Networks
Not Working:
-Android Market (Browse-able, but can't download anything)
-Google Currents
-Kindle App ( can log-in, but can't browse new books )
-Weather Apps ( News & Weather Works tho )
-Games
-Essentially any apps that cannot detect BT as Internet Source. Unlike most apps keeps trying to connect regardless of the 'available network'.
Support:
And if all fails, you may post below, and tell me your problems.
-Please provide the following info:
a) Mobile model & OS version
b) Tablet model & OS version
c) Carrier
d) Brief Description of the problem.
Please do not complain if it does not work for your device. We're simply trying to help the Android community by giving them support on unsupported devices.
UPDATED 22/12/2011:
Brut.all said:
And you will have problems with Android Market and some other apps. Internet is configured at linux level, Android OS don't know about it, so if application asks: "Do we have internet connection?", Android replies: "No". Android Market will wait for connection even if there is one.
Click to expand...
Click to collapse
I guess there's no workaround? Can someone with some DUN or PAN knowledge, shed some light on us?
WIP:
-Add Other Carriers ( Fido, etc?) (Feedback needed from the community)
Credit goes to:
lophyte for this Terminal Tethering guide & Chat Binary.
http://forum.cyanogenmod.com/topic/37078-how-to-tether-your-gtab-to-your-blackberry-phone-via-bluetooth/
berry4all for the chat scripts. http://www.berry4all.com/
wsoft2002 for his Q5 DUN program. http://android.gval.biz/
Max Taranukha who's name is on the script.
Brut.all for his finding on why Market doesn't work.
RimDroid for helping with the research, and helping me understanding a little bit more about Linux Dial-Up Networking.
nijhar for testing and helping this project out.
Thank you all for the support.
Click to expand...
Click to collapse
I hope our community keeps growing and more new devices are supported as days passes by.
Merry X-Mas everybody!
Vampirexhunter
Please post a reply if this worked or failed for you.
Most appreciated.
Simply amazing!! Thank you very much. Was waiting for the ROM update on my BB that would include wireless hotspot. That hasn't happened
Running a Torch 9860 with my rooted Touchpad. Just followed your instructions. Except I did not modify the build.prop file yet. I can't believe how fast this is!
benven said:
Simply amazing!! Thank you very much. Was waiting for the ROM update on my BB that would include wireless hotspot. That hasn't happened
Running a Torch 9860 with my rooted Touchpad. Just followed your instructions. Except I did not modify the build.prop file yet. I can't believe how fast this is!
Click to expand...
Click to collapse
Awesome! Does downloading work for you? and are you using Q5 or Terminal way?
I am using Q5. I only tried the Market. And as you stated, can get there but cannot download apps. As soon as I shut down Q5 and started up wifi, the apps downloaded. I am going to try Google Maps and Navigation to see if they work.
One question...does it matter where you put the net.dns1=8.8.8.8 & net.dns2=8.8.4.4 line in build.prop?
Thanks again and Merry Christmas!
benven said:
I am using Q5. I only tried the Market. And as you stated, can get there but cannot download apps. As soon as I shut down Q5 and started up wifi, the apps downloaded. I am going to try Google Maps and Navigation to see if they work.
One question...does it matter where you put the net.dns1=8.8.8.8 & net.dns2=8.8.4.4 line in build.prop?
Thanks again and Merry Christmas!
Click to expand...
Click to collapse
anywhere works.
New Discovery:
Q5 DUN does not require the ppp files (rogers + rogers-chat)
It only requires the chat binary file /system/bin
So if you are not using the terminal way, you can safely delete those files without affecting Q5.
New Discovery 2:
Stock browser,Firefox Beta & Dolphin HD - all three can't download... lol
But...Using Opera Browser, I was able to download files!! Yay! I'm assuming this app does not rely on 'Connectivity Manager'. I'm so happy, as this is the only browser that worked out of 4!
New Findings! Check it Out!
Simply amazing!! 关注中!
Nice Guide Vamp.
Couldn't have done it better myself!
Tried the Amazon Silk Browser
This Browser rocks in terms of browsing speeds!!
Can't download with this browser.. bummer..
New Finding!
I found a Download manager that works with BT.
Xwind Downloader by JasonWong.
By using this DL manager, I can use any browser I want to browse, and use this manager to download!
Hello, I have a question. When you pair you BB to HP Touchpad, does your Bluetooth say paired but not connected? Is that ok, or do I need to fix it somehow for the Tethering to work? So far I'm not able to tether, so I was wondering if that was the problem.
Some info:
Hp Touchpad running cyanogenmod 7
Blackberry Torch 9800 with Rogers and data plan.
Thank you.
kryal said:
Hello, I have a question. When you pair you BB to HP Touchpad, does your Bluetooth say paired but not connected? Is that ok, or do I need to fix it somehow for the Tethering to work? So far I'm not able to tether, so I was wondering if that was the problem.
Some info:
Hp Touchpad running cyanogenmod 7
Blackberry Torch 9800 with Rogers and data plan.
Thank you.
Click to expand...
Click to collapse
Hi Kryal,
It's suppose to say paired but not connected, that's normal.
All I can say is follow my instructions very carefully.
Which method are you using? Terminal or Q5?
Also make sure Dial-Up Networking Service is enabled on your phone. in Bluetooth connections>paired devices>Touchpad
vampirexhunter said:
Hi Kryal,
It's suppose to say paired but not connected, that's normal.
All I can say is follow my instructions very carefully.
Which method are you using? Terminal or Q5?
Also make sure Dial-Up Networking Service is enabled on your phone. in Bluetooth connections>paired devices>Touchpad
Click to expand...
Click to collapse
Never mind I fixed it by following the guide closely YOU ARE THE BEST. Donated, you deserve it.
kryal said:
Never mind I fixed it by following the guide closely YOU ARE THE BEST. where do I donate to you guys?
Click to expand...
Click to collapse
Awesome! Glad it worked out for you.. Donate? lol Thanks, but no need.. Free! I did not developed any software, and it was mostly used information out on the net that I slapped together
Even Netflix works on this!!! The video is a bit choppy but I'm very surprised anyways.
kryal said:
Even Netflix works on this!!! The video is a bit choppy but I'm very surprised anyways.
Click to expand...
Click to collapse
Yea, I've been trying to speed up the connection, but very unsuccesful.. it seems to cap at ~1mbps.. and on usb i can get about 2.5mbps (Tether to PC)
Also Rogers network is slow.
cm7 3.5
Hi there, I need some help please, is my chatscripts or peers wrong??
Operator: Singtel
Country: Singapore
APN: internet
user:65ideas
password: <no password>
Blackberry bold 9650 OS 6(latest)
cm7 alpha 3.5
Code:
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
ABORT "NO DIALTONE"
ABORT VOICE
ABORT RINGING
SAY 'Starting GPRS connect script\n'
'' 'BBT_OS'
OK 'ATZ'
OK 'AT+CGDCONT=1,"IP","internet"'
ABORT 'NO CARRIER'
SAY 'Dialing...'
OK 'ATD*99#'
CONNECT
Code:
# Tested by Max Taranukha
115200
noipdefault
defaultroute
#nomultilink
ipcp-restart 7
ipcp-accept-local
ipcp-accept-remote
lcp-echo-interval 0
lcp-echo-failure 999
nopcomp
noaccomp
pap-timeout 20
pap-restart 20
lcp-restart 10
#noauth
crtscts
usepeerdns
nomagic
noccp
#novj
user "65ideas"
password ""
name Internet
#debug debug debug
# does not exist in all pppd versions (osx)
#replacedefaultroute
connect "/system/bin/chat -f /etc/ppp/chatscripts/singtel-chat"
tried with ~p or without ~p
Tried
user 65ideas
password ""
user 65ideas
password
jinnyroxs said:
Hi there, I need some help please, is my chatscripts or peers wrong??
Operator: Singtel
Country: Singapore
APN: internet
user:65ideas
password: <no password>
Blackberry bold 9650 OS 6(latest)
cm7 alpha 3.5
Code:
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
ABORT "NO DIALTONE"
ABORT VOICE
ABORT RINGING
SAY 'Starting GPRS connect script\n'
'' 'BBT_OS'
OK 'ATZ'
OK 'AT+CGDCONT=1,"IP","internet"'
ABORT 'NO CARRIER'
SAY 'Dialing...'
OK 'ATD*99#'
CONNECT
Code:
# Tested by Max Taranukha
115200
noipdefault
defaultroute
#nomultilink
ipcp-restart 7
ipcp-accept-local
ipcp-accept-remote
lcp-echo-interval 0
lcp-echo-failure 999
nopcomp
noaccomp
pap-timeout 20
pap-restart 20
lcp-restart 10
#noauth
crtscts
usepeerdns
nomagic
noccp
#novj
user "65ideas"
password ""
name Internet
#debug debug debug
# does not exist in all pppd versions (osx)
#replacedefaultroute
connect "/system/bin/chat -f /etc/ppp/chatscripts/singtel-chat"
tried with ~p or without ~p
Tried
user 65ideas
password ""
user 65ideas
password
Click to expand...
Click to collapse
This setting might differ from carrier: 'ATD*99#'
This is the modem command to connect for Rogers.. you will have to find out which one works for you.
Try this one: 'ATD*99***1#'
If that doesn't work, you will need to test on your own, as I am only able to test Canadian carriers.
You can find other ATD commands online, if this one doesn't work.
Related
Hi!
For the ones interested in openvpn or vpnc I attach the tun.ko module.
Have fun.
Here is the tun driver package. Think you should have a rooted device to make use of it.
To install:
1. copy it to your <sdk>/tools folder
2. adb push hero-tun-module-signed.zip /sdcard/update.zip
3. Type 'adb shell reboot bootloader' to enter the bootloader.(or turn it off and then, holding back button, turn it on)
4. Type 'fastboot boot cm-hero-recovery.img' - the device will now boot into the recovery image.
5. Select the option to 'apply update.zip from SD card'. Let it complete.
6. select reboot
Hi!
Good idea and thanks for packaging it. I just made a quick shot ;-)
Will add this to 1.2.
P
get-a-robot-vpnc does not work using the tun driver included in
2.0-update-hero-modacocustomrom-enhanced-signed.zip
The message appears after entering the pasword for sign on.
The application VPN Connections (process org.codeandroid.vpnc_frontend) has stopped unexpectedly.
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: can't insert '/system/lib/modules/tun.ko': invalid module format
whether tun.ko is fron the 2.0 zero,
or installed via update.zip from hero-tun-module-signed.zip - above.
dmesg says
tun: version magic '2.6.27-a5504199 preempt mod_unload ARMv6 ' should be '2.6.27-8dd6deee preempt mod_unload ARMv6 '
the /etc/net folder does not exist, neither does /etc/tun
tun for 2.6.27-8dd6deee
See attachment for tun driver kernel version: 2.6.27-8dd6deee
(MoDaCo 2.0)
Thanks gogh57,
insmod ran OK.
installed to /dev/tun
vpn is now Trying to connect...
I'll have to check the VPN parameters.
Will let you know.
Brilliant work, many thanks.
I've check and verified my vpn parameters, but get a failed to connect. I'll keep reading and trying and will let you all know.
For info, all I have done - just in case I have missed a fundamental step...
1. Installed VPN connections from the market
2. Configured a network to connect to
3. copied tun.ko to SD card
4. ran adb shell to get on phone then insmod tun.ko - no errors, and shows with lsmod
5. tried to connect.
Getting closer....!
Bryan
How to install it on my Hero?
Hi all,
I have the same problem. Currently using Modaco's 1.5.1 and I do not want to move to 2.0 as it seems that it does not offer any advantage and I am happy until now with 1.5.1.
I am trying to install tun.ko which exists in system/lib/modules (installed with Modaco's ROM). When installing the tun.ko, I get "Exec format error" with dmesg:
# dmesg | grep tun
<3>[152396.817749] tun: version magic '2.6.27-a5504199 preempt mod_unload ARMv6
' should be '2.6.27-44690c1a preempt mod_unload ARMv6 '
How can I find the 2.6.27-44690c1a version ?
Or else I will wait for Bryan's tests and if successful, I will move to 2.0
Thanks for any help
Yiannis
<EDIT> - Moved to Modaco 2.1, Insmod runs OK, VPN-Connect does not connect. I'll dig more and let u know
Newby question, but what can you do with it?
YiannisM said:
Hi all,
I have the same problem. Currently using Modaco's 1.5.1 and I do not want to move to 2.0 as it seems that it does not offer any advantage and I am happy until now with 1.5.1.
I am trying to install tun.ko which exists in system/lib/modules (installed with Modaco's ROM). When installing the tun.ko, I get "Exec format error" with dmesg:
# dmesg | grep tun
<3>[152396.817749] tun: version magic '2.6.27-a5504199 preempt mod_unload ARMv6
' should be '2.6.27-44690c1a preempt mod_unload ARMv6 '
How can I find the 2.6.27-44690c1a version ?
Or else I will wait for Bryan's tests and if successful, I will move to 2.0
Thanks for any help
Yiannis
<EDIT> - Moved to Modaco 2.1, Insmod runs OK, VPN-Connect does not connect. I'll dig more and let u know
Click to expand...
Click to collapse
I'm getting nowhere with this. I'll have to look on the phone to see if it logs anywhere to help diagnose
Let use know YiannisM if you get anywhere?!
Bryan
On my HTC Hero
Using Modaco 2.2
tun.zip included in above
VPN Connections installed
and modified scripts described here:
http://techha.us/2009/06/android-vpn-vpnc/
VPN works now,
stared via an adapted 'go' script. (but not using VPN Connections UI)
I use ConnectBot for terminal.
I'll post exact details tonight.
pvlagsma said:
I'll post exact details tonight.
Click to expand...
Click to collapse
Look forward to it, I had a quick go following the link you gave, but it *****ed (unsurprisingly) at the location of the tun device.
Well done for cracking it
So close now!
J-Zeus said:
Newby question, but what can you do with it?
Click to expand...
Click to collapse
From Wiki....
A virtual private network (VPN) is a computer network in which some of the links between nodes are carried by open connections or virtual circuits in some larger networks (such as the Internet), as opposed to running across a single private network. The Link Layer protocols of the virtual network are said to be tunneled through the transport network. One common application is to secure communications through the public Internet, but a VPN does not need to have explicit security features such as authentication or content encryption. For example, VPNs can also be used to separate the traffic of different user communities over an underlying network with strong security features, or to provide access to a network via customized or private routing mechanisms.
Simply put, for most people I imagine, it allows us to connect to work.
Bryan
pvlagsma said:
On my HTC Hero
Using Modaco 2.2
tun.zip included in above
VPN Connections installed
and modified scripts described here:
http://techha.us/2009/06/android-vpn-vpnc/
VPN works now,
stared via an adapted 'go' script. (but not using VPN Connections UI)
I use ConnectBot for terminal.
I'll post exact details tonight.
Click to expand...
Click to collapse
Also looking forward to this.
Installing VPN on the HTC Hero.
References:
----------
A: This thread - http://forum.xda-developers.com/showthread.php?p=4503502
B: vpnc details - http://techha.us/2009/06/android-vpn-vpnc/
C: ROM 2.2 - http://android.modaco.com/content/h...m-is-here-2-versions-based-on-the-new-update/
D: VPN_Connections: - http://code.google.com/p/get-a-robot-vpnc/downloads/list
E: ConnectBot - android market - the terminal app I use on my Hero. You can do all this from an 'adb shell' on your PC.
1. Flash the 2.2 ROM (others probably work, but the correct tun.ko for the linux build is included in the ROM) from Ref C.
2. Download the latest version (VPN_Connections_v09.apk at time of writing) from get-a-robot-vpnc (Ref D), and install on your Hero.
This provides the vpn modules that are needed.
However I could not get this UI to work on the Hero. It kept hanging, sometimes asking for the password, sometimes not.
Note: the android market version is still 0.6
3. Install the tun.ko module with a script, or manually. This needs to be done each time you boot the Hero.
The script is:
'prep' script ( the following 3 lines: )
-----------
insmod /system/lib/modules/tun.ko
mkdir /dev/net
ln -s /dev/tun /dev/net/tun
Install tun by typing:
sh /sdcard/prep
or typing the 3 commands. (you need to be root, to do this)
(I placed my script on the microSD card, /sdcard/prep)
You can call this script anything you like.
4. Make an 'vpn.conf' file .
IPSec gateway vpn.aa.bb.com
IPSec ID youroffice
IPSec secret yourofficepassword
Xauth username youruid
Place it on /sdcard/vpn.conf
See Ref B for details.
You can call this configuration file anything you like.
5. Make a 'go' script, like this (one long line)
/data/data/org.codeandroid.vpnc_frontend/files/vpnc /sdcard/vpn.conf --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --pid-file /sdcard/vpnc-pid --no-detach --debug 1
Put it in a file /sdcard/go .
N.B. The 'go' script refers to the 'vpn.conf' file which you created earlier.
See Ref B for details.
You can call this script anything you like.
(Note: VPN Connections (Ref D) installs its files to /data/data/org.codeandroid.vpnc_frontend )
6. Start VPN by typing:
sh /sdcard/go
hopefully you will see
# sh /sdcard/go
sh /sdcard/go
Enter password for [email protected]: <this is where you type in your password>
vpnc version ERSION
IKE SA selected psk+xauth-3des-sha1
NAT status: no NAT-T VID seen
got address 33.333.333.333
RTNETLINK answers: File exists
backing up dns and resolve.conf
cp: cannot stat '/etc/resolv.conf': No such file or directory
vpnc-script ran to completion
IPSEC SA selected 3des-sha1
VPNC started in foreground...
&. Start an ssh connection, or a browser to an internal website, or whatever
Brilliant, many thanks!!
couldn't find a /etc/resolv.conf have put a couple of address' into /etc/hosts so I can browse my intranet.
How are you doing DNS??
Bryan
Is it possible to configure for IPSec over tcp?
Just an update from me, the VPN Connect frontend does not work, I have used pvlagsm's instructions and worked for me.
Thanks
After experimenting for a while, I've managed to successfully use USB 3G dongle, and to connect my Archos 101IT, running uruk-droid 0.4.1, to the Internet over 3G data network. Test was made with two different 3G USB dongles - Huawei E1552 and ZTE MF190.
First of all a big thanks to $aur0n for uruk-droid, because without uruk-droid kernel with adequate configuration, this 3G support would not be possible.
Second, a big thanks to all guys behind usb_modeswitch project (http://www.draisberghof.de/usb_modeswitch/), for providing us with Linux support needed to switch our 3G USB dongles from default cd-rom/mass-storage mode to usb-serial mode needed for 3G operation.
Process of initial setup of 3G USB dongle to a 3G provider under Linux (and Android/Archos) is fairly complex, and requires a little Linux knowledge, but once it is configured right, usage is simple.
Unfortunately I don't see a way to make it simpler, because lot of parameters in various files are greatly dependant on model of 3G USB dongle you are using, and on settings of your 3G data provider.
DISCLAMER:
This is a proof-of-concept modification. Don't expect that everything will work from a first try.
Please note that I don't take responsibility for anything that might happen with your Archos device and/or your data on it.
I didn't had any problems with my A101IT using this mod with Huawei E1552 3G dongle and ZTE MF190 3G dongle, but that doesn't mean that someone else won't have them.
Also, if you make your 3G USB dongle work as modem using steps described here, I don't take any responsibility for possible large bills form you 3G data service provider.
Be sure that you have good and cheap 3G data plan with your 3G data service provider, if you are planning to use 3G data network for Internet connection on a daily basis.
Also, try to avoid using 3G data service while in roaming, because it is very expensive.
Technical explanation:
Basically USB tethering system on Archos is designed to work over PPP connection, provided by /system/bin/pppd via "Serial-over-USB link", provided by cdc-acm.ko kernel module, when supported cdc-acm class device is connected to USB host port of Archos.
Here is a brief description of USB tethering on Archos 101, modified to work with 3G USB dongles, since you probably going to need to edit some of this files in order to adjust them for your 3G USB dongle and your 3G provider:
1. Kernel support for 3G USB dongles.
This is provided by uruk-droid kernel.
One part you'll use from this support is usbserial.ko kernel module that will be loaded by /system/xbin/3Gmodem_init.sh with adequate parameters, when you start tethering.
2. usb_modeswitch program and support files
usb_modeswitch is responsible for switching of 3G USB dongles from default cd-rom/mass-storage mode to usb-serial mode ready for 3G operation.
You'll use it via /system/xbin/3Gmodem_init.sh, when you start tethering.
3. Archos USB tethering support which is partially in Android framework, and partially in Linux scripts called by framework.
This part of tethering support is most complex one, and in order for Android framework to be aware of data connection, we must disguise 3G data connection as a USB tethering:
Android framework calls modified /system/bin/tether_start_usb.sh, which calls /usr/bin/pppd binary, responsible for data connection to your 3G data provider.
Android framework calls modified /system/bin/tether_stop.sh, for stopping data connection to your 3G data provider.
pppd uses couple of configuration files (and additional binary /usr/xbin/chat):
from '/system/etc/ppp/peers' directory, pppd uses configuration file 'tether' (with definition of pppd options for peer it connects to - this may need editing for your 3G provider)
from '/data/' directory, pppd (via /system/xbin/chat) uses 'tether_start' file as definition of <SEND> <EXPECT> pairs of commands sent to configure modem and responses received from modem, when it connects to a peer (this may need editing for your 3G provider).
from '/system/etc/chatscripts/' directory, pppd (via /system/xbin/chat) uses 'tether_stop' file as definition of <SEND> <EXPECT> pairs with commands sent to modem and responses received from modem, when it disconnects from a peer.
This modification relies on modified '/system/bin/tether_start_usb.sh' and '/system/bin/tether_stop.sh', to be able to correctly initialize RNDIS connection or 3G modem, load adequate kernel modules and start connection, while trying to keep compatibility with original "Archos designed" way of USB tethering.
Configured adequatly ('enable' parameter to 'off' in '/etc/uruk.conf/3Gsupport' file), this modified '/system/bin/terher_start_usb.sh' WILL behave as original one. - not needed anymore - scripts auto-detect connection type and behave adequatly.
For a list of changes in recent versions please se post #2 of this thread.
Tutorial how to use RNDIS USB Tethering:
No configuration needed - if your phone is indeed of USB-RNDIS type - everything will be auto-detected.
Just plug your Archos to a RNDIS capable phone in tethering mode via USB cable, wait for at least 5 seconds (or more - depending on phone), and start tethering on Archos.
Expample of RNDIS tethering device is HTC Desire phone with built-in USB Tethering support enabled. Android based phones from "same generation as HTC Desire" are quite probably of same USB-RDNIS type.
NOTE: due to a technical reasons (bad driver), RNDIS tethering support works only if usb host mode driver (musb_hdrc.ko) is loaded in PIO (as opposed to default DMA) mode. When tethering is started, USB host mode driver is reloaded in PIO mode, so this might be indicated on the phone like USB disconnection and re-connection. This is "normal" behaviour, and for now there is nothing I can do about it. When tethering is stopped USB host mode driver is re-loaded again to DMA mode.
Tutorial how to initially configure 3G USB dongle for USB tethering:
NOTE: Everything written here, should be done in Terminal Emulator or ConnectBot (connected as local) under root shell (after 'su' command)!
Install Terminal Emulator, or ConnectBot from Market.
This step is no longer needed if you are running Uruk-Droid 0.7 or later since 3G modem/RNDIS support is integrated in it
Get 3Gsupport-0.4.zip from attachment in this post. Extract 3Gsupport-0.4.tar.gz file from .zip file and copy it to your Archos to /sdcard. Archive contains everything needed (usb_modeswitch binary and support files, replacement tether_start_usb.sh, replacement tether_stop.sh, 3Gmodem_init.sh script, 3Gmodem_detect.sh).
NOTE: Since /system/bin/tether_start_usb.sh and /system/bin/tether_stop.sh from 3Gsupport-0.4.tar.gz will replace original ones, please backup originals.
The 3Gsupport-0.4.tar.gz file contains absolute paths for all files, and should be extracted to a root ('/' path in RootExplorer).
To backup original tether_start_usb.sh and tether_stop.sh:
Code:
# su
# cp /system/bin/tether_start_usb.sh /system/bin/tether_start_usb.sh.ORIGINAL
# cp /system/bin/tether_stop.sh /system/bin/tether_stop.sh.ORIGINAL
Assuming you have 3GSupport-0.4.tar.gz in /sdcard you should do following in Terminal Emulator or ConnectBot to extract 3Gsupport-0.4.tar.gz:
Code:
# su
# cp /sdcard/3Gsupport-0.4.tar.gz /
# cd /
# tar -zvxf 3Gsupport-0.4.tar.gz
Start the Terminal Emulator, or ConnectBot (to localhost).
Issue 'su' command in terminal window to gain root access.
Plug dongle in usb host port (full size USB on A101IT).
NOTE: For A70IT you'll need something called "mini USB Type-A to USB female host cable adapter", and maybe manually loading of host-mode USB driver (musb_hdrc.ko) – I don’t have A70IT so I can’t test.
Wait couple of seconds (at least 5) and then start 3G modem detection script with '/system/xbin/3Gmodem_detect.sh' command.
The output of the detect scripts should be pretty self-explanatory, and if your modem is supported by usb_modeswitch (in both switching and non-switching mode) you should be able to see that usb serial module is loaded and configuration file is written and support for 3G modems is started.
Output should look like this:
Code:
# /system/xbin/3Gmodem_detect.sh
Supported USB device found !!!! VendorID: 12d1 - ProductID: 1446
New VendorID: 12d1
New ProductID not detected in usb-modeswitch config file. Try to detect it later !
Switching device to usbserial mode !
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 004 on bus 002 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Resetting response endpoint 0x81
Error resetting endpoint: -110
Resetting message endpoint 0x01
Error resetting endpoint: -19
Device is gone, skipping any further commands
Checking for mode switch (max. 20 times, once per second) ...
Searching for target devices ...
Searching for target devices ...
Found target device, now opening
Found correct target device
Mode switch succeeded. Bye.
Detected ProductID of a switched device: 140c
USB device VendorID: 12d1 ProdID: 140c. Probing serial mode
usbserial.ko module registered and /dev/ttyUSB{X} device nodes created sucessfully.
Writing default configuration to '/data/local.prop' file .....Done.
!!! REBOOT your A101IT now in order for your configuration to become active !!!
After reboot:
Disconnect your 3G USB dongle, do not connect anything to USB host port and go to Settings->Wireless & Networks->Cellphone tethering.
If there is tethering profile already defined, delete it - Archos handles only one tethering profile definition at a time.
Create new USB tethering profile.
Your APN, username and password won't be detected automatically, so fill them manually - find adequate info from your 3G service provider (for me on Telekom Srbija: APN is ‘gprsinternet’, username is ‘mts’, and password is ‘064’ (some 3G operators don't need username and password)).
This will create file '/data/tether_start' with adequate commands for ppp daemon to initialize 3G modem and make a connection to your 3G provider.
NOTE for uruk-0.6: It '/data/tether_start' file is not created after wizard finishes try following in terminal emulator:
Code:
su
chown 1000:1000 /data
chmod ug+rwx /data
then delete the tethering profile just created and re-create it again !!! Now everything should be OK.
File should look like this:
Code:
TIMEOUT 5
ECHO ON
ABORT BUSY
ABORT ERROR
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
TIMEOUT 12
'' ATZ
OK AT+CGDCONT=1,"IP","[COLOR="DarkRed"]<your APN configured in tethering wizard>[/COLOR]"
OK ATD*99#
TIMEOUT 120
CONNECT ''
If steps 3 and 4 were OK, then you should be able to test pppd connection to the Internet.
NOTE: This test assumes following:
a) that SIM/USIM card in your 3G modem doesn't require PIN code.
b) that your 3G modem automatically register SIM/USIM to a network in Automatic mode (auto-band, 3G preferred mode (EDGE service if no 3G available))
If this is not a case please take a look in section "Modifying tether_start script" later, for reference how to modify '/data/tether_start' script with adequate AT commands that should be sent to modem.
Re-plug your 3G USB dongle.
Wait at least 5 sec.
Start the Terminal Emulator, or ConnectBot (to localhost).
Issue 'su' command in terminal window to gain root access.
Issue '/system/xbin/3Gmodem_init.sh' command
Issue '/system/bin/pppd /dev/ttyUSB0 460800 debug mtu 1280 mru 1280 name <username> password <password> call tether'
If you get CONNECTED message then your dongle and /dev/ttyUSBx port is set right and everything is configured well.
Output should look like this:
Code:
ATZ
OK
AT+CGDCONT=1,"IP","[COLOR="DarkRed"]<your APN configured in tethering wizard>[/COLOR]"
OK
ATD*99#
CONNECT
You can interrupt pppd with Ctrl+C.
If you don't see CONNECT (or any) response from modem try with one of other ttyUSB[0-5] ports first, or refer to following section on modifying /data/tether_start script.
Assuming the step 5 was success, edit '3Gmod.usbPort' option to match the number you have used in test in step 5, in '/data/local.prop' file, and REBOOT your Archos.
From now you can use 3G USB tethering just by plugging 3G USB dongle, and starting 'Setup->Wireless & Network->Cellphone Tethering->Tether'.
Modifying '/data/tether_start' script for your particular 3G modem and 3G operator:
File '/data/tether_start' is standard chatscript for unix chat program ('man chat' on Google for more info and syntax reference) used by pppd when making connection.
In default tether_start file most important line is one for setting APN: ' OK AT+CGDCONT=1,"IP","<your APN configured in tethering wizard>" ' in example above.
Second important line is one that connects your modem to your 3G data provider: 'OK ATDT*99#' - for some providers it needs to be modified to 'OK ATDT*99***1#'.
If your SIM/USIM card needs PIN in order for you to be able to use your 3G USB dongle, try to disable PIN on your card before using it in 3G USB dongle.
If you can't disable PIN for your SIM/USIM card (for example, as far as I know Tele2 cards must have PIN), you'll probably need to modify 'tether_start' script and to add adequate AT commands and expected responses, before setting APN.
A solid reference of 3G modem AT commands and manufacturer/model specific AT commands can be found these pages:
http://3g-modem.wetpaint.com/page/common+AT-commands
http://3g-modem.wetpaint.com/page/Huawei+AT-commands
http://3g-modem.wetpaint.com/page/ZTE+AT-commands and
http://3g-modem.wetpaint.com/page/Sierra+Wireless+AT-commands
Example /data/tether_start script that sends PIN 1234 and sets "auto 3G/GPRS mode" (for Huawei 3G USB dongles only !!!) looks something like this:
Code:
ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'VOICE'
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT 'DELAYED'
REPORT CONNECT
TIMEOUT 6
'' ATQ0
OK-AT-OK ATZ
TIMEOUT 3
OK AT+CPIN=1234
OK-AT-OK ATI
OK ATZ
OK ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK AT\^SYSCFG=14,2,3fffffff,0,1
OK-AT-OK AT+CGDCONT=1,"IP","<your APN configured in tethering wizard>"
OK ATDT*99***1#
TIMEOUT 30
CONNECT ''
There is a plenty of information on the Internet on how to configure Linux ppp chatscripts for particular models of 3G USB dongles and 3G operators, so please SEARCH, READ & TRY before asking, since you'll have to try it anyway at the end .
ISSUES:
First start of tethering after plugging, re-plugging 3G USB dongle or stopping tethering can (and probably will) end in "unable to connect by tethering" message.
This happens since dongle needs to be switched to usb-serial mode, kernel modules must be loaded, and most important 3G dongle must register to 3G data network to be able to connect, and Android framework timeout before connection is established.
Solution is to just start tethering again, and since there is no need to do a usb_modeswitch again, and kernel modules are already loaded, and dongle is registered to 3G network provider, it will connect before timeout.
When Archos wakes-up after sleep, some dongles (ZTE-MF190 is one of them), wake-up in default mode (non usb-serial mode), so tethering needs to be stopped and started manually.
One possible workaround is to enable "Prevent device from going to sleep" in 'Setup->Wireless & Network->Cellphone Tethering', but with uruk-droid 0.4.1 based on Archos 2.0.x firmware this option didn't work as expected - device still goes to sleep, even if tethering is connected.
With 2.1.x based uruk-droid (0.6 is first) it seems that this option works.
QUESTIONS & ANSWERS:
Q: Can I use my phone and 3G modem whithout reconfiguring tethering every time I switch them ?
A: Please take a look in this post
FUTURE PLANS:
Integration of real USB-cable tethering with Android based devices that require Archos to tether using usbnet.ko module via "Ethernet-over-USB" type of link. - DONE
Change log:
0.4.1 - Integrated in UrukDroid-0.7 with minor script errors corrected, tutorial updated
0.4 - RNDIS (Ethernet-over-USB) tethering merged with 3G modem, and Archos default USB tethering support this version needs UrukDroid-0.6 at least
changed scripts, in order to acheive auto-detection of tethering type (RNDIS, 3G modem or Archos default Serial-Over-USB)
changed location of saved 3G modem configuration data to /data/local.prop, so the configuration data is avalible upon reboot as Android properties (/data/local.prop file is NOT overwritten by 3Gmodem_detect.sh, so don't worry ;-) )
elimninated need for /etc/uruk.d service, because of previous changes
0.3 - lot of changes in scripts, in order to make 3Gdongle detection and module load configuration simplier.
/system/xbin/3Gmodem_detect.sh introduced for purpose above
tutorial changed to follow 3Gmodem_detect.sh usage
compatible with 3G USB dongles that don't need switching (like Huawei E176)
wokring on uruk-0.6RC2
0.2 - changes to '/system/etc/uruk.d/3Gsupport' script to conform to urukdriod 0.5 standard
'/system/etc/uruk.d/3Gsupport' script now supports (beside start and stop): status, UIstatus and config parameters as well as second parameter force
no other functional changes
working on urukdroid 0.5 and 0.4.1
0.1 - Initial release tested on urukdroid 0.4.1 and 0.5
Here is the list of 3G modems and providers confirmed to work and optional notes if '/data/tether_start' needed to be altered:
1. Huawei E1552 on MTS Serbia (APN: gprsinternet, U: mts, P: 064) and VIP Serbia (APN: vipmobile, U: vipmobile, P: vipmobile)
2. Huawei E1550 on MTS Serbia (APN: gprsinternet, U: mts, P: 064) and VIP Serbia (APN: vipmobile, U: vipmobile, P: vipmobile), and on Starhub (Singapore) (APN as shinternet no U: and no P
3. ZTE MF190 on MTS Serbia (APN: gprsinternet, U: mts, P: 064) and VIP Serbia (APN: vipmobile, U: vipmobile, P: vipmobile)
4. Huawei E173 on MTS Serbia (APN: gprsinternet, U: mts, P: 064) and VIP Serbia (APN: vipmobile, U: vipmobile, P: vipmobile)
5. Huawei E176 on unknown 3G provider/params
6. Huawei E1691 on Wind Mobile in Canada 3G provider and unknown params, but with configuration file change described in this post
7. Huawei E153 on unknow 3G provider/params
Here is the list of phones with RNDIS USB tethering, confirmed to work:
1. HTC Desire (stock 2.29.405.2 with built-in USB Tethering support enabled)
2. US HTC HD2 running a Desire-based NANDroid ROM on T-mobile (APN: epc.tmobile.com, no U: , no P: )
awesome, will have to try this out on my tmobile web and walk III stick later.
Thanks for this very well done explanation ! I'll try on my 70
solune said:
Thanks for this very well done explanation ! I'll try on my 70
Click to expand...
Click to collapse
Note that you'll probably need microUSB-Type A to USB host cable adapter in order to use 3G USB modem dongle.
I really don't know does Archos 70IT automaticaly unload's clinet mode usb driver, and loads host-mode driver when you plug in microUSB host adapter cable (it should do it - that is one of reasons why host cable has one pin more), but if it doesn't you'll have to load musb_hdrc.ko module in manually.
I think that it must be loaded with parameter mode_default set to 1 in order to activate host mode ('insmod /lib/modules/musb_hdrc.ko mode_default=1').
great it is a good news
but no simply
how the merge on UrukDroid
nenadr said:
Note that you'll probably need microUSB-Type A to USB host cable adapter in order to use 3G USB modem dongle.
I really don't know does Archos 70IT automaticaly unload's clinet mode usb driver, and loads host-mode driver when you plug in microUSB host adapter cable (it should do it - that is one of reasons why host cable has one pin more), but if it doesn't you'll have to load musb_hdrc.ko module in manually.
I think that it must be loaded with parameter mode_default set to 1 in order to activate host mode ('insmod /lib/modules/musb_hdrc.ko mode_default=1').
Click to expand...
Click to collapse
Yes I already have microUSB-Type A to USB Host cable adapter, and it works for my USB drive for example. I've already connected my 3G USB modem dongle just for see what's appen, and light blink on it, so I have hope to do something with your very well explained guide
I'll make feed-back here if host-mode driver loads or if I need to mount it manually.
cajl said:
great it is a good news
but no simply
Click to expand...
Click to collapse
I know it is not simple but it is try-error only until your connection is succesfull for a first time (while you fine tune params for your 3G modem, and for your 3G operator). After that is just metter of sticking 3G USB dongle, waiting 5 seconds, and clicking Tethering on Power Widget (twice )
cajl said:
how the merge on UrukDroid
Click to expand...
Click to collapse
I'll hopefully upgrade to uruk 0.5 today, and adapt scripts (mainly uruk-config ones), to 0.5 version of uruk-droid during the weekend, and post those scripts here.
After that my plan is to upgrade to a uruk-0.6RCx and play with USB cable tethering with Android phones that tether via "Ethernet-over-USB" support (usbnet.ko module).
Hopefully, I will know soon enough if that is operational, and after that I'll talk to $aur0n about integration.
solune said:
Yes I already have microUSB-Type A to USB Host cable adapter, and it works for my USB drive for example. ......
Click to expand...
Click to collapse
If it works with USB drive, that should be proof enough that Archos 70IT is switching to USB host mode just by plugging microUSB host adapter. Good news, more devices supported....
solune said:
I'll make feed-back here if host-mode driver loads or if I need to mount it manually.
Click to expand...
Click to collapse
Please do, thank you very much.
i'm up to step 6 . it was pretty clear up to then. a) i dont have a 3Gsupport.conf file in there b) i guess the bit in the [code ] box isnt what you need to do to edit it c) presuming you mean just open the 3Gsupport file and edit that, am i just replacing all instances of vendor and product or also the VendorID /ProductID bits too?
thefunkygibbon said:
i'm up to step 6 . it was pretty clear up to then. a) i dont have a 3Gsupport.conf file in there b) i guess the bit in the [code ] box isnt what you need to do to edit it c) presuming you mean just open the 3Gsupport file and edit that, am i just replacing all instances of vendor and product or also the VendorID /ProductID bits too?
Click to expand...
Click to collapse
Yup I've made a mess in that part of tutorial (wrong path/name of config file, not clear enough explanation):
You have to edit file '/system/etc/uruk.conf/3Gsupport' and it should look something like:
service_enabled=1
enable=on
vendor=12d1
product=1446
port=0
I've corrected that part of initial post. Thanks.
Pictures of this "exploit"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I've good news for Huawei E176 user, The modem doesn't require to switch mode.
So we just only need to edit ther_usb start and stop .sh
and here is the code for E176
/system/bin/tether_start_usb.sh
Code:
#!/bin/sh
# $1 is the user (not a mandatory argument)
# $2 is the password (not a mandatory argument)
setprop "3Gmod.enable" "on"
setprop "3Gmod.defVendorID" "12d1"
setprop "3Gmod.defProductID" "1003"
setprop "3Gmod.usbPort" "0"
rmmod usbserial
sleep 1
insmod /lib/modules/usbserial.ko vendor=0x12d1 product=0x1003
sleep 1
SUPPORT3G=`getprop "3Gmod.enable"`
VENDOR3G=`getprop "3Gmod.defVendorID"`
PRODUCT3G=`getprop "3Gmod.defProductID"`
PORT3G=`getprop "3Gmod.usbPort"`
if [ ${SUPPORT3G} != on ]; then
insmod /lib/modules/musb_hdrc.ko mode_default=1
insmod /lib/modules/cdc-acm.ko
if [ $# -eq 0 ]
then
/system/bin/pppd /dev/ttyACM0 460800 call tether
else
/system/bin/pppd /dev/ttyACM0 460800 name $1 password $2 debug call tether
fi
else
if [ $# -eq 0 ]; then
/system/bin/pppd /dev/ttyUSB${PORT3G} 921600 call tether
else
/system/bin/pppd /dev/ttyUSB${PORT3G} 921600 name $1 password $2 call tether
fi
fi
/system/bin/tether_stop.sh
Code:
#!/bin/sh
SUPPORT3G=`getprop "3Gmod.enable"`
if [ $1 = "DUN" ]
then
/system/xbin/dund --killall
elif [ $1 = "PAN" ]
then
/system/bin/pand --killall
else
if [ ${SUPPORT3G} != on ]; then
kill -9 $(pidof pppd)
/system/bin/rmmod cdc_acm
/system/bin/rmmod musb_hdrc
else
killall -15 pppd
fi
fi
Meen said:
I've good news for Huawei E176 user, The modem doesn't require to switch mode.
So we just only need to edit ther_usb start and stop .sh
and here is the code for E176
Click to expand...
Click to collapse
Thanks for the info on Huawei E176. I'll make some chaneges in original scripts, for those users that have modems that don't require switching, to be able to use original scripts. It'll be in 0.3 in next day or so.
cajl said:
Pictures of this "exploit"
Click to expand...
Click to collapse
could you please post some bigger pictures? I'm not sure its big enough for people to see.
ok nenadr, I'll try the rest of the process tonight cant wait to try it. have you managed to get an idea of the sort of battery drain using one of these? ie is it much worse than using wifi?
I'm getting the following on step 7 . I am using uruk 0.5 I it makes any difference
/system/xbin/3Gmodem_init.sh 12d1 1003
No 3G USB dongle support detected. Will try to initialize modem.
Found USB 3Gmodem dongle in default mode connected to device. Starting modeswitch.
ERROR: Module option does not exist in /proc/modules
ERROR: Module usbserial does not exist in /proc/modules
ERROR: Module usb_storage does not exist in /proc/modules
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
No devices in default mode found. Nothing to do. Bye.
sh: 1003: unknown operand
Found new Product ID: 0002
1003
0001
0a19 for Vendor ID: .
Loading 3G modem kernel driver with adeqate configuration
insmod: error inserting '/lib/modules/usbserial.ko': -1 Invalid parameters
Kernel module load failed. Exiting.
#
thefunkygibbon said:
I'm getting the following on step 7 . I am using uruk 0.5 I it makes any difference
Click to expand...
Click to collapse
Please, take a look couple of posts up, for an alternate solution, because it seems that your vendorID and productID doesn't need mode-switching. I'll fix the scripts, and tutoral for that case tomorrow.
Sent from my A101IT using Tapatalk
lol. oh yeah. sorry. i didnt know mine was a E176 and as such i skimmed over those posts sorry for appearing to be a bit of a idiot. cant wait for the new script.
btw has $auron shown any interest in incorporating this into his rom. would be useful to have all the legwork done automatically and maybe urukconfig could do some of the stuff that isnt able to be done automatically
thefunkygibbon said:
btw has $auron shown any interest in incorporating this into his rom. would be useful to have all the legwork done automatically and maybe urukconfig could do some of the stuff that isnt able to be done automatically
Click to expand...
Click to collapse
yes, his shown interest but this code is stll not mature (and tested on) enough devices to be merged with uruk.... meybe for some later urukdroid, who knows
Sent from my A101IT using Tapatalk
Hello. I have a question related to WAP enterprise on Android. Basically, my employer has detailed instructions on how to connect to the building wifi via BlackBerry or iphone but sadly not Android. I was wondering if there is a workaround or hack for this that would enable me to connect using either BB or iphone settings. I downloaded WiFi Advanced from the Market but I haven’t been able to figure out what to fill in what field ( I do see checkboxes for LEAP and WPA Enterprise mentioned below but no proxy field). Any tips using this app or another solution is appreciated! These are the settings I need to enter:
BlackBerry:
Setup Wifi Network: Office network name (appears as WPA Enterprise)
Select LEAP as security type
Enter username and password (which I have)
Connect to network
Manage connections , choose Enterprise Subtype as LEAP
Enter username and password (which I have)
Iphone:
Enter Wifi settings, tap Other
Enter network name, tap Security
Choose WPA Enterprise for security
Enter username and password (which I have)
Connect to network
Tap blue arrow next to network name and tap Auto under proxy
Enter proxy URL
So one uses LEAP and the other one asks me for a Proxy so I am not sure which one might work for my Samsung Galaxy S2 using Wifi Advanced app from the Market.
NOTE: I am able to create the network and it shows as connected but no internet access, its says WPA_EAP IEEE8021X below the name, but dont know how to take it from there in Wifi Advanced to complete the setup as per above .
Any help is appreciated!!!!!!
I have exactly the same problem. Any ideas?
erkan79 said:
I have exactly the same problem. Any ideas?
Click to expand...
Click to collapse
This thread is pretty old, but I don't see any reply to this problem so I thought to share solution that worked for me.
As per your description "Garoto1973" your network connection didn't establish. It failed while authenticating. You may find below steps useful.
I was able to connect to my companies PEAP network by using following configurations. Please note that I am using adb to modify wifi settings so your phone should be rooted.
1- Connect your phone to your PC.
2- Pull wpa_supplicant.conf file to your machine for editing:
adb pull /data/misc/wifi/wpa_supplicant.conf
3- Edit wpa_supplicant.conf file adding this configuration for your network:
network={
ssid="<YOUR_NETWORK_NAME>"
scan_ssid=1
proto=WPA
key_mgmt=IEEE8021X
pairwise=TKIP
group=TKIP
auth_alg=OPEN
eap=PEAP
identity="<DOMAIN\IDENTITY>"
password="<YOUR_PASSWORD>"
phase2="auth=MSCHAPV2"
eapol_flags=2
}
Note that "eapol_flags=2" is very important or connection fails for me with error "W/wpa_supplicant(27862): EAPOL: Failed to set WEP key to the driver."
4- Replace wpa_supplicant.conf on your mobile with the modified file:
adb push wpa_supplicant.conf /data/misc/wifi
5- Reassign user and group for wpa_supplicant file:
adb shell chown 1010 /data/misc/wifi/wpa_supplicant.conf
adb shell chgrp 1010 /data/misc/wifi/wpa_supplicant.conf
6- Restart wifi and it should connect
hello, not sure if it will help.
try to use aplication LEAP WIFI free from the market. With this app I am able to connect to my corporate network
Hello all,
I figured this tutorial may come in handy to a few people out there since the documentation for getting this to work is quite atrocious.
What this tutorial is:
A step-by-step walkthrough of setting up wpa_supplicant.conf to access advanced networking protocols that we otherwise don't have access to (note, this will ONLY work with root at the moment).
What this tutorial is not:
A wireless troubleshooting thread for any wireless issues not related to wpa_supplicant, EAP-TLS, EAP-TTLS, etc.
Thanks ahead of time.
NOTE: This tutorial will be giving instructions for a Windows 7 machine, but 90% of the code I provide can easily be copied over to Linux/BSD/OSX, just replace with the Bash equivalents.
To begin, you will need a few things:
--ADB, with working drivers, though you don't NEED root access through it it is nice to have, since it cuts the typing in half, and the setup for that can be found here: [App]: ADB Root Hijack [ADB Runs as Root now]
--openSSL, for converting certificates to the proper formats.
Windows instructions: Requires Cygwin, see this link here. This will install several other useful tools, and you'll love Cygwin if you're a power user
Linux/BSD/OSX instructions: install using your favorite repositories or from binaries (in the case of OSX). For Ubuntu/Debian: sudo apt-get install openssl
--You will need access to the Development menu (use an app or the Any Cut app to make a shortcut), as well as Root Browser lite (or Root Explorer).
--Alot of patience, and a bit of time. This should be straightforward, but don't expect a perfect solution for everyone.
1) The most important step, since this will cause you no end of headaches for possibly an hour or two as you trace it down: Go into the Development menu, UNCHECK USB Debugging and RECHECK it, then UNCHECK Auto Mount. So, even if debugging is checked, uncheck and check it anyway. And make SURE Auto Mount is unchecked, otherwise this will automatically install the "normal" NT drivers and screw up the entire process.
2) Plug in the Nook, and bring up the command line (cmd.exe). Run:
Code:
adb devices
If this returns an alphanumeric string (or anything), your device is in and you're good to go. Otherwise, check the other forum topics for troubleshooting (link to come).
3) To begin, we need to convert our tickets to the correct format. For this we will use OpenSSL. To make this easy, I piled all of my working space into a folder in the root of the C: drive, called "certs". For this example, I will assume that you were given a root certificate named rootCA.crt and a private certificate names [email protected].p12 (because I was, for the eduroam worldwide network).
This example also assumes EAP-TLS authentication. To convert the files:
Code:
openssl x509 -in rootCA.crt -out rootCA.der -outform DER
openssl x509 -in rootCA.der -inform DER -out rootCA.pem -outform PEM
then
openssl pkcs12 -in [email protected] -out cert.pem -clcerts -nokeys
openssl pkcs12 -in [email protected] -out key.pem -nocerts
Note: even if your business/Uni doesn't use a separate hashed key normally (For example, the University of Alaska system), you will need it here. Normally a certificate app handles all of this (on AOSP and custom builds).
4) Thanks to good ol' FSTAB, we will have to remount /system so we can read/write to it:
Code:
adb shell
su
mount -o remount,rw /system /system
5) Now, we have three new files: rootCA.pem, cert.pem and key.pem in the C:\certs folder. We push them to their proper directory on the NT:
Code:
adb push rootCA.pem /system/etc/wifi/
adb push cert.pem /system/etc/wifi/
adb push key.pem /system/etc/wifi/
Note: This is where it gets tricky without root ADB access...the option is to push them to "/media/My Files/My Downloads/" (including quotes) and then use a terminal or root browser to move them to /system/etc/wifi/
6) Next, we get to pull wpa_supplicant finally!
Code:
adb pull /system/etc/wifi/wpa_supplicant.conf .
Note: Make sure to include the . at the end, this means 'copy it to the current directory'
7) Open wpa_supplicant.conf in Wordpad (NOT notepad, wrapping issues), and build a profile based on the examples located here.
Here is an edited version of mine, if you use EAP-TLS this will work for you:
Code:
network={
ssid="YourAPNameHere"
scan_ssid=1
key_mgmt=WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP
eap=TLS
identity="[email protected]"
ca_cert="/system/etc/wifi/rootCA.pem"
client_cert="/system/etc/wifi/cert.pem"
private_key="/system/etc/wifi/key.pem"
private_key_passwd="yourPassHere"
priority=20
}
Change ssid, identity, and private_key_passwd to your respective information.
NOTE: priority, near the bottom, determines when it will connect to the network when others are around. Compare it to the values of the priority's set in /data/misc/wifi/wpa_supplicant.conf, the higher the value the higher the priority when they're all within range.
Now save and close the file.
8) Now, we push and reboot:
Code:
adb push wpa_supplicant.conf /system/etc/wifi/
then reboot the nook.
Now, after reboot, it should be good to go!
Notice, one bit of trouble I ran into, if you just get "error" when turning on the wireless after reboot, double-check that your certificates are correct and in the correct places, and wpa_supplicant.conf points at them. If thats fine, try erasing /data/misc/wifi/wpa_supplicant.conf, then reboot, and the list will be rebuilt and your AP will automatically connect.
Please let me know if there are any issues with the instructions, it's 6am and I haven't slept more than 8 hours in the last 3 days troubleshooting this, building kernels and playing Skyrim
reserved for future things
Also of note: I'm working on making this into scripts, don't worry everyone. And, if you bork your wifi, I will have a wireless fix in the works too.
Hi
First of all, thanks for this tutorial
I'm pretty sure this should be very straightforward but not to mess this thing up what do I need to change for a network with the following definitions:
Network SSID: eduroam
Security: 802.1x Enterprise
EAP method: PEAP
Phase 2 authentication: MSCHAPV2
Cheers
LacerdaPT said:
Hi
First of all, thanks for this tutorial
I'm pretty sure this should be very straightforward but not to mess this thing up what do I need to change for a network with the following definitions:
Network SSID: eduroam
Security: 802.1x Enterprise
EAP method: PEAP
Phase 2 authentication: MSCHAPV2
Cheers
Click to expand...
Click to collapse
Hey, it's not a problem at all. Pulled from the source here: NookDevs.com wpa_supplicant.conf I built this skeleton here:
Code:
network={
ssid="eduroam"
scan_ssid=1
key_mgmt=WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP
eap=PEAP
identity="[email protected]"
password="YOUR-PASSWORD"
ca_cert="/system/etc/wifi/cacert.pem"
phase1="peapver=0"
phase2="MSCHAPV2" }
As you can see, you'll need to enter your University email in the identity field and your password in the password field, and if you don't have the needed certificates/password/etc you can get that from your local IT office (I would ask to speak with your network technicians though, helpdesk may not have it). Make SURE to read the instructions in that link, the openssl bit is different than the guide above!
Thanks!
On monday I will try that and will report the outcome.
Cheers
Hi.
It worked like a charm! No problem at all.
Thanks!
Cheers
Awesome! Glad to hear it.
I've been looking for this for a while finally I got it, this is what I did:
- Connect your android device to your linux PC
- Enable USB tethering
- On your linux box as root (I'm using Fedora 16)
Code:
iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig usb0 12.12.10.1
With this you will enabled internet sharing between network interfaces and assign an IP to the usb interface.
- Enable mobile data access (3G) on your android
- On your Android using adb or terminal emulator
Code:
ifconfig rmnet0 0.0.0.0
ifconfig usb0 12.12.10.2
route add default gw 12.12.10.1 dev usb0
setprop net.dns1 8.8.8.8
The first line will disable the data traffic through your 3G connection so all the traffic wiil go through the USB
- Enjoy
All apps works because they see a vaild 3G connection!!!
WARNING: If during you are USB connected, the 3g connection is reset, the system will restore its IP and DNS so
the traffic will go through this interface you must reset again the IP to 0.0.0.0 and the dns to 8.8.8.8. Maybe
one of the devs here could help us to prevent this happened. You can always check the IP values of all interfaces by typing "netcfg"
Press Thanks if I help you
everytime,
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
yes i tried with sudo, same output.
using ubuntu12.04 64 bit. all other commands are fine,
gandhar said:
everytime,
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
yes i tried with sudo, same output.
using ubuntu12.04 64 bit. all other commands are fine,
Click to expand...
Click to collapse
In Ubuntu you can re-direct to files you own as the user calling sudo, such as files in your home directory, but not system files
so try this:
sudo bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
or you can edit /etc/sysctl.conf and then run sysctl -p
secondary problem
Thank you very much for your post, this is what I was looking for.
I have configured correctly, ubuntu 12.10 and android 2.3.7 (Huawei U8650) but there is a problem.
Only works a few seconds, the first moments. In the browser takes more time, but when I open "play store" internet is disconnected. It seems they check applications and stop working, it's strange. Configuration is successful because it works, but only a few seconds ...
Seems to prove that internet applications not from the 3g and crashes ...
I have broken the wireless on my huawei U8650 and this is the only way I can access the internet
Thanks in advance
PS: I'm Spanish, sorry for my bad English.
wideru said:
Thank you very much for your post, this is what I was looking for.
I have configured correctly, ubuntu 12.10 and android 2.3.7 (Huawei U8650) but there is a problem.
Only works a few seconds, the first moments. In the browser takes more time, but when I open "play store" internet is disconnected. It seems they check applications and stop working, it's strange. Configuration is successful because it works, but only a few seconds ...
Seems to prove that internet applications not from the 3g and crashes ...
I have broken the wireless on my huawei U8650 and this is the only way I can access the internet
Thanks in advance
PS: I'm Spanish, sorry for my bad English.
Click to expand...
Click to collapse
Yes sometimes it happen to me too but normally takes several minutes even hours not seconds, READ the WARNING.
Hope it help.
rply plx
what about windows 7 ?
how can i let my all apps including vpn to be worked with reverse tethering
Qutub Uddin said:
what about windows 7 ?
how can i let my all apps including vpn to be worked with reverse tethering
Click to expand...
Click to collapse
check this http://forum.xda-developers.com/showthread.php?t=1371345