Windows Mobile 6, "internet Sharing", Bluetooth And Suse (linux) - 8125, K-JAM, P4300, MDA Vario ROM Development

To those that might not know one of the major changes to windows mobile 6 from windows mobile 5 was the removal of bluetooth DUN (dial up networking) which has worked quite well under linux forever and the addition of a new tool called "Internet Sharing" which uses bluetooth pan. Linux has a tool called PAND which is supposed to allow us to use bluetooth pan but previously I had not had success in making it work. Recently I read the following page and used it as a guide and was able to get it working on Suse. http://klamstwo.org/evad/archives/40
Steps:
0) Run the kde bluetooth server (system, desktop applet, kbluetoothd) because when you run the pand command the first time the phone is going to prompt you for the "access code" you assigned on the pc and then the pc is going to ask you for the SAME access code to pair them. In yast under hardware, bluetooth you can set the access code it will expect. Make sure bluetooth is on and phone can be found by other devices.
1) Go into Yast, Network cards and create a Bluetooth network card..this should be "bnep0" when all is said and done..this has to be setup ahead of time because it won't exist until pand is called. My /etc/sysconfig/network/ifcfg-bnep0 looks like this:
-----
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME=''
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='hotplug'
USERCONTROL='no'
_nm_name='static-0'
--------
2)On the command line type "sdptool search NAP" and write down the device address which is in the format xx:xx:xx:xx:xx:xx
Example output:
--------
Inquiring ...
Searching for NAP on XX:121:2A:XX:XX ...
Service Name: Network Access Point
Service Description: Bluetooth NAP Service
Service RecHandle: 0x10000
Service Class ID List:
UUID 128: 00001116-0000-1000-8000-00805f9b34fb
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 15
"BNEP" (0x000f)
Version: 0x0100
SEQ8: 0 6 dd
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Network Access Point" (0x00001116-0000-1000-8000-00805f9b34fb)
Version: 0x0100
--------
3)On the command line type "pand --role PANU --connect xx:xx:xx:xx:xx:xx" replacing the XX's with your actual device address. (In my example that would be XX:121:2A:XX:XX) Pair the device when prompted. You will only have to pair it once..after that connects will be automatic.
4) On the command line type "route add default gw 192.168.0.1" and hit enter.
If you run ifconfig you should see the bnep0 device..on mine it gave me IP 192.168.0.85 and the phone is 192.168.0.1.
You should now have a bnep0 interface..and it should be the default route for internet....if you are running a firewall make sure it is the external zone..
Example ifconfig:
------
bnep0 Link encap:Ethernet HWaddr XX:11:F6:05:XX:XX
inet addr:192.168.0.85 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: 2002:48fa:6048:8:211:f6ff:fe05:7e97/64 Scope:Global
inet6 addr: fec0::8:211:f6ff:fe05:7e97/64 Scope:Site
inet6 addr: fe80::211:f6ff:fe05:7e97/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:427958 errors:0 dropped:0 overruns:0 frame:0
TX packets:354277 errors:0 dropped:0 overruns:0 carrier:0
-------
Advantages of Internet sharing over bluetooth dun...one big one...bluetooth dun would drop connection about every 20 minutes and have to be manually reconnected..or it would hang and have to be manually dropped and reconnected....Internet sharing creates an "always on" device and I've been connected for the last 6 hours without a hitch.
I hope this helps someone else and if it does please let me know
...and for further "tinkering" your phone now has an actual IP address... 192.168.0.1 so theoretically you can run software such as ssh server's and proxies on the phone and access it from the pc...an example would be running the compressing proxy toonel from toonel.net. The phone version acts as both a http proxy and a socks proxy and compresses text to speed up surfing. The linux/windows versions only acts as a http proxy.

I tried to use Internet sharing via USB but it does not carry the proxy server I have on the phone. I have to add proxy address manually to my laptop IE. Is there ant way that my phone acts as proxy server?
Thanks

hey fame, you find a working version of linux for our phones yet? lol

Shabe_syah said:
I tried to use Internet sharing via USB but it does not carry the proxy server I have on the phone. I have to add proxy address manually to my laptop IE. Is there ant way that my phone acts as proxy server?
Thanks
Click to expand...
Click to collapse
What your asking has nothing to do with the original topic and should be in it's own thread. That being said..even if you ran a proxy on your pocketpc you would still have to point to THAT proxy on the pc so whats the difference in that and pointing to the isp one?

nottoosmart said:
hey fame, you find a working version of linux for our phones yet? lol
Click to expand...
Click to collapse
I wouldn't bet my retirement on it.

well, ive been trying to watch the linux thing in the forum but no one seems to be updating. im kinda depressed lol

famewolf said:
To those that might not know one of the major changes to windows mobile 6 from windows mobile 5 was the removal of bluetooth DUN (dial up networking) which has worked quite well under linux forever and the addition of a new tool called "Internt ...... proxy.
Click to expand...
Click to collapse
What kernel are you using with that version of SuSe?
The reason I ask, is that I'm using Debian Etch with a 2.6.18 kernel, and I get connected fine.. however...
I can't ping anywhere, or connect in any fashion anywhere, unless I first run tcpdump or ngrep on bnep0. Once I've done that, I can do a few things, for example, I seem to get DNS queries through (and with my own DNS on the net at large).
However, I can't seem to connect to anywhere, although oddly tcpdump seems to show packets coming in.
Anyone have any ideas. There is zero in the way of an iptables firewalling on this box...

BRad Barnett said:
What kernel are you using with that version of SuSe?
The reason I ask, is that I'm using Debian Etch with a 2.6.18 kernel, and I get connected fine.. however...
I can't ping anywhere, or connect in any fashion anywhere, unless I first run tcpdump or ngrep on bnep0. Once I've done that, I can do a few things, for example, I seem to get DNS queries through (and with my own DNS on the net at large).
However, I can't seem to connect to anywhere, although oddly tcpdump seems to show packets coming in.
Anyone have any ideas. There is zero in the way of an iptables firewalling on this box...
Click to expand...
Click to collapse
I have a handful of cheap chinese knockoff bluetooth dongles that I got for $5 each..they ALL have mac id's of all 11:11:11:11:11:11 and will not work with internet sharing..they can get an ip address but even with default route they don't seem to be able to get anywhere...the good news is bluetooth dun has been hacked BACK into wm6 and those same cheap dongles work fine using bluetooth DUN because it doesn't care about the mac id.
I have one airnet $15 bluetooth adapter I got from buy.com...this is the one dongle which I have that will work with internet sharing and it has a real mac id....I have used the same dongle on both a desktop and laptop to verify the dongle is the issue and not the pc's....so make sure you get a name brand dongle with it's own mac id and not a cheap clone....hope this helps.

famewolf said:
I have a handful of cheap chinese knockoff bluetooth dongles that I got for $5 each..they ALL have mac id's of all 11:11:11:11:11:11 and will not work with internet sharing..they can get an ip address but even with default route they don't seem to be able to get anywhere...the good news is bluetooth dun has been hacked BACK into wm6 and those same cheap dongles work fine using bluetooth DUN because it doesn't care about the mac id.
I have one airnet $15 bluetooth adapter I got from buy.com...this is the one dongle which I have that will work with internet sharing and it has a real mac id....I have used the same dongle on both a desktop and laptop to verify the dongle is the issue and not the pc's....so make sure you get a name brand dongle with it's own mac id and not a cheap clone....hope this helps.
Click to expand...
Click to collapse
That's it.. thanks.
Crappy chinese garbage!!!

Internet Sharing vs Bluetooth DUN
BRad Barnett said:
That's it.. thanks.
Crappy chinese garbage!!!
Click to expand...
Click to collapse
The specific model of bluetooth dongle I have is the Airnet ABT101..it's about $15 on ebay..there is also the ABT201 which is $9 on ebay but it has the shorter range.
Internet sharing has some definite pluses over bluetooth dun....for one it doesn't drop the connection every 20 minutes like dun did..for another your phone still has access to the internet while you do...so it can still sync..get email etc....lastly your phone has a real ip address (192.168.0.1) so you can run sync software like finchsync under linux to sync to thunderbird etc where previously you had to have a wifi connection.

Related

How to get a real IP in my notebook?

I access internet via Internet sharing with my Polaris USB connection
I found my notebook would get a NAT ip (192.168.xxxx)
How can I do to get a real IP?
http://www.whatismyip.org/
I mean I want my notebook to get the real IP not NAT
your laptop have 1 ip for each nic wifi and wired and firewire and bluetooth nic
connected and then it have the loopback adaptor
in a console on your laptop you can type ipconfig and have them listed
Sorry my poor English
All I need is to access my notebook's web site by my friends
so I want a real IP to tell my friend
I can browse other web site by using Internet sharing
but my friend can not browse my web site if I use my Polaris to the Internet
I found there was some HTC USB modem driver to use.
but it seems no use on the Polaris
You have a web-server active on your notebook and it is connected in lan at your home, and you want to view this website from internet when you are in your friend's home: it's right?
If I've understand, you must point at the public IP address of your home's internet access (you can find it in site like http://www.whatismyip.org/), but before this, you must forward the port 80 in your router to the private address of your notebook.
Hoping that he was quite clear...
P.S.: Also my English is not the greatest ...
caliu said:
I access internet via Internet sharing with my Polaris USB connection
I found my notebook would get a NAT ip (192.168.xxxx)
How can I do to get a real IP?
Click to expand...
Click to collapse
It was my understanding that with Internet Sharing on WM6, clients are placed into a DMZ and all incoming connections will go to the client.
That means that your web / ftp / etc server should work fine.
However, if your mobile provider makes you use a proxy to access the internet, then incoming connections are not possible.
I'm going to bet that this is what is happening to you, and there is nothing you can do to solve this problem.

[REQ] Reverse wired tethering

Before i start i want to let people know YES I DO HAVE A WIRELESS ROUTER!! So please do not respond telling me to just go buy a router.
REQUEST - Reverse wired tethering. I.E. Sharing PC's iNet connection with your phone via USB.
REASON - My university's wireless is locked down and does not allow mobile phones, pda's to connect up to our wireless without submitting MAC for approval. Looking to sync certain apps without using my data connection.
I dont know if anyone has played around with trying to get this working or not. I know its a small market of people who may be interested in this, but for certain places (CANADA) where data charges are WAY to expensive this could be handy for students at UNI where wireless is not an option.
get a second wifi adapter on your laptop, and share your uni wireless network connection with the second wifi adapter. Use a hidden SSID, then no one will know what is going on
This was asked a couple of times before here and I remember people saying you couldn't reverse the tethering.You could try though.
alexperkins said:
get a second wifi adapter on your laptop, and share your uni wireless network connection with the second wifi adapter. Use a hidden SSID, then no one will know what is going on
Click to expand...
Click to collapse
Thats a good idea xD
Hey guys,
I have been trying to find a way to do this for a long time.
The best solution i have found (actually the only solution) is Connectify. The only downside is you must have Win7.
What it does is turns your wifi adapter into a HotSpot, even if you are using wifi to get the net in the first place. Its a great tool and should be what your after.
http://www.connectify.me/
memphisraynz said:
Hey guys,
I have been trying to find a way to do this for a long time.
The best solution i have found (actually the only solution) is Connectify. The only downside is you must have Win7.
What it does is turns your wifi adapter into a HotSpot, even if you are using wifi to get the net in the first place. Its a great tool and should be what your after.
http://www.connectify.me/
Click to expand...
Click to collapse
thank you so much for this
Your best solution is the WiFi adapter. You could most likely get away with a SOCKS proxy over USB, possibly using adb, but it would be complicated, unstable, and messy.
I still don't know you just don't use your wireless router. I assume they have wired. Clone your PC's mac address and hook it up. Universities are retarded with that crap. They have the worst networks and security.
If no wired, then what podunk place is it? haha
Even if they had only wireless , you could set up a wlan client and repeat it. DDWRT, etc, ftw.
Just get backtrack for your laptop and spoof your mac to all 0 then grab connect to the network at your school the spoofed mac will allow you to browse so long as no other encyption is on the network such as WEP or WPA.
then you can try to flood all the ports on the network so no one else can connect then spoof your phones mac by conneecting to your laptop through wireless as an adhoc connection and while staying connected through adhoc load a second server through the same wireless network card and you can connect to the achools network again. and walla...
death1246 said:
Just get backtrack for your laptop and spoof your mac to all 0 then grab connect to the network at your school the spoofed mac will allow you to browse so long as no other encyption is on the network such as WEP or WPA.
then you can try to flood all the ports on the network so no one else can connect then spoof your phones mac by conneecting to your laptop through wireless as an adhoc connection and while staying connected through adhoc load a second server through the same wireless network card and you can connect to the achools network again. and walla...
Click to expand...
Click to collapse
so simple, i dunno why i didnt think of that. thanks! lol
Well its quit simple once you learn your way around linux...
If you have any experience with *nix, you may want to look at Cyanogen's original usb tether shell script:
http://github.com/cyanogen/android_vendor_cyanogen/blob/master/bin/usb-tether
Basically you could use the internet connection sharing function that comes with all popular OSes and access your uni's network on your phone. You must have Cyanogen mod or another mod using his kernel. Not yet working on OSX for some reason. Tested under Windows 7.
First you'll need to figure out what IP address range your computer's DHCP server is using. This is normally fixed for each OS. For Windows 7, it's always 192.168.137.0/24.
For OSX or Linux, you can setup connection sharing (for some other connection because we don't have the USB interface yet) and ifconfig.
Second is to enable the USB connection on the phone's side. Type the following command in any console program, like Connectbot. (You must use a console program as opposed to adb because you will lose USB debugging once the USB network interface is enabled.)
Code:
su
cd /sys/devices/virtual/net/usb0
ifconfig usb0 192.168.137.200 mask 255.255.255.0
echo 1 > enable
The first line makes you the superuser. (Skip if the command prompt is #)
The second line land you in usb0's directory under sys. We'll need to type the disable command later, so it's easier if we're here.
The third line brings up the virtual usb network interface and sets its IP address.
The IP address should be in the same network (i.e. IP address range) you obtained in step 1. Say if the original is 192.168.137.1 in a /24, you can use 192.168.137.2 through 192.168.137.254
This actually enables the usb interface.
You will now see a new network adapter is recognized by your computer. Set up connection sharing to share your internet TO that adapter.
Make sure you have connection by pinging your computer from your phone.
For example:
ping 192.168.137.1
Now you'll have to change the routes so traffic go through the USB cable instead of the mobile network.(# is the command prompt, do not enter)
# busybox route
check the line starting with "default". Write down the ip address after it; call it IP1.
# getprop net.dns1
Call the IP returned IP2.
Code:
busybox route del default gw IP1
busybox route add -host IP2 rmnet0
busybox route add default gw 192.168.137.1
The first line deletes the old default route via the mobile network.
The second line adds an "exception" for your carrier's DNS server.
The third line adds the new route via USB. You should replace the address at the end with the IP address from the first step.
Your network should be working now. Test by visiting some website that is only available on campus or by traceroute.
You must make sure the mobile network is always connected though. This is because domain names are still resolved by your mobile carrier. If you ever lose your mobile connection, the routing table will be changed as well.
To disconnect:
Make sure you're still in /sys/devices/virtual/net/usb0.(Use pwd if unsure.)
Code:
netcfg usb0 down
echo 0 > enable
The usb interface will disappear on your computer.
Now switch the phone to airplane mode and back to re-enable mobile network.
The disconnect step should always restore your phone's state.
// This is written at 3am, so use it at your own risk...
help?
look at this
http://superuser.com/questions/91699/spoof-mac-address-from-ip-command
bg
It's really sad that Android can't reverse tether. If you want to use your laptop's AdHoc connection you have to do serious hacking to the tiwlan.ini and the wpa_supplicant.conf. There is no way to connect via bluetooth ar USB.
I'm seriously considering WP7 now for my next OS of choice... A nd for everyone saying "go buy a router" - go buy a router and stick it up your .... nose.
Hi,
I have the same problem. No WiFi in my work and no WiFi in my current home (a Resident Hall). There's no possibility to buy a WiFi router, of course. I tried to hack the system to connect ad-hoc networks but it didn't work.
I have found some interesting resources:
sluniverse.com/php/vb/blogs/psyke+phaeton/1042-making-android-phone-use-your.html
letsgoustc.spaces.live.com/blog/cns!89AD27DFB5E249BA!877.entry
I have a HTC Magic with the ADP-DRC83 hacked ROM with Usb tethering integrated. But usb0 interface in the mobile is configured to provide Internet connection (as gateway) to the PC, not the reverse functionality: connecting the mobile to Internet through the PC. So, all I need is to change the gateway in Android and then configure a NAT-DNS in my linux PC (easy with iptables and dnsmasq). But, I don't know how automatize the process exactly.
digitaljeff said:
but for certain places (CANADA) where data charges are WAY to expensive this could be handy for students at UNI where wireless is not an option.
Click to expand...
Click to collapse
Wind will be launching in vancouver soon.
$35 unlimited data.
Silly ragin' cajun.
Ok, now it works. Here it's my procedure for a HTC Magic (Sapphire) without any APN previously configured from Telecom provider and ROM CSDIv4.
In the mobile by using Better Terminal:
Code:
su
cd /sys/devices/virtual/net/usb0
echo 1 > enable
ifconfig usb0 192.168.2.2 mask 255.255.255.0
busybox route add default gw 192.168.2.1
setprop net.dns1 8.8.8.8
In the linux computer:
Code:
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i usb0 -j ACCEPT
sudo ifconfig usb0 192.168.2.1 netmask 255.255.255.0
Android Market downloads and location service don't work but I think is possible if you switch on the WiFi.
Update: Syncronization, Android Market downloads and location service don't work even the WiFi antenna is switched on. I have added the iptables commands also.
Well gosh, reverse wireless tethering is so much simpler
There are another similar thread: http://forum.xda-developers.com/showthread.php?t=522498

Join Bluetooth PAN as client? (reverse tether)

How can I join an Android device to a Bluetooth PAN (Personal Area Network) as a client? In some areas, the only internet connection available would be to tether it through another cell phone via bluetooth PAN (other phone has no wifi).
Solutions that require rooting or config file editing are OK.
I've searched alot, but all results are about going the other way - tethering other devices through the Android.
Soundman6 said:
How can I join an Android device to a Bluetooth PAN (Personal Area Network) as a client? In some areas, the only internet connection available would be to tether it through another cell phone via bluetooth PAN (other phone has no wifi).
Solutions that require rooting or config file editing are OK.
I've searched alot, but all results are about going the other way - tethering other devices through the Android.
Click to expand...
Click to collapse
It's Linux, man, all you need is setting network config I was using reverse tethering for some time, this is my script (run on PC):
Code:
sudo pand --listen --role NAP
adb shell pand --connect XX:XX:XX:XX:XX:XX
sudo ifconfig bnep0 192.168.101.1
adb shell ifconfig bnep0 down 192.168.101.2 up
adb shell route add default gw 192.168.101.1 dev bnep0
adb shell setprop net.dns1 192.168.101.1
Of course you should omit 1st and 3rd lines.
Are you sure second phone supports PAN connections, not DUN? PAN is quite complicated for phone, because it requires full NAT.
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.
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 believe that is a valid concern. Anyone know how to deal with this? Thanks.
Soundman6 said:
I believe that is a valid concern. Anyone know how to deal with this? Thanks.
Click to expand...
Click to collapse
But most of the apps don't check internet status and just use it - they will work. AFAIR I couldn't use Market, GTalk and syncing feature, but Browser, Gmail and many, many more was working.
If you have any WiFi device then you could connect Android to it. Even if it doesn't share internet connection, Android OS will think, that it does (but will use BT connection configured at linux level ) - then any app should work.
At work I got a laptop with windows XP, There's a wireless network but it's EAP secured and I can't connect to it with the phone (Motorola Milestone - Android 2.1).
Did you manage to make internet work through Bluetooth PAN? I just need to use the borwser, so It's not important if market or other apps don't work.
I have android sdk with adb on my laptop and terminal emulator with busybox on my phone. I'm kind of a newbie in this so some hints would be nice. I think many people like me would be gratefull
haxxy said:
Has anybody got it working?
At work I got a laptop with windows XP, There's a wireless network but it's EAP secured and I can't connect to it with the phone (Motorola Milestone - Android 2.1).
Did you manage to make internet work through Bluetooth PAN? I just need to use the borwser, so It's not important if market or other apps don't work.
I have android sdk with adb on my laptop and terminal emulator with busybox on my phone. I'm kind of a newbie in this so some hints would be nice. I think many people like me would be gratefull
Click to expand...
Click to collapse
And my first post was about what, you think? I don't use it now, but I was reverse-tethering through BT for several months, until I bought some data plan.
Above commands should work for you, but... they will let you connect your phone to PC, but I don't know, how to share internet connection on Windows XP. AFAIR I tried to do it, but failed.
There's a bluetooth network icon. I know it's possible to share the internet connection from my ethernet to the other network cards. So this should work also with the bluetooth network.
I will try the commands and see how it goes.
haxxy said:
it's possible to share the internet connection from my ethernet to the other network cards. So this should work also with the bluetooth network.
Click to expand...
Click to collapse
Unfortunately not ;-) It is a cost of easy-clicking-configuration that Windows has - it's very limited, don't work for BT connections. I guess there is some professional software for internet sharing on Windows, but I don't know one.
Brut.all said:
Unfortunately not ;-) It is a cost of easy-clicking-configuration that Windows has - it's very limited, don't work for BT connections. I guess there is some professional software for internet sharing on Windows, but I don't know one.
Click to expand...
Click to collapse
I did this with my symbian phone. I managed to share internet to the bluetooth network, but the phone had a bluetooth PAN profile that connected to my laptop.
No! Already I have a bluetooth network set up on my Ubuntu Laptop - pand is running and there is a dhcp server monitoring the interface. What I need is not the below advice, which are commands to run on the PC, but an application / utility / instructions for enabling BLUETOOTH PAN CLIENT on Android. That is what the original question was too! Anybody?
Paul Beardsell
Brut.all said:
It's Linux, man, all you need is setting network config I was using reverse tethering for some time, this is my script (run on PC):
Code:
sudo pand --listen --role NAP
adb shell pand --connect XX:XX:XX:XX:XX:XX
sudo ifconfig bnep0 192.168.101.1
adb shell ifconfig bnep0 down 192.168.101.2 up
adb shell route add default gw 192.168.101.1 dev bnep0
adb shell setprop net.dns1 192.168.101.1
Of course you should omit 1st and 3rd lines.
Are you sure second phone supports PAN connections, not DUN? PAN is quite complicated for phone, because it requires full NAT.
Click to expand...
Click to collapse
psb777 said:
What I need is not the below advice, which are commands to run on the PC, but an application / utility / instructions for enabling BLUETOOTH PAN CLIENT on Android.
Click to expand...
Click to collapse
4 of 6 lines of my instructions were for setting Android client: connecting, setting IP, routing and DNS. And yes, they are run on Android, not on PC - I thought you will notice "adb shell" prefixes... You can also use dhcpcd instead of last 3 lines, but if you don't understand, what are you doing, you will have problems anyway.
Maybe anyone with Froyo can confirm that there's still no official option for joining a Bluetooth PAN from Android there?
@Brut.all So I guess there's currently no way to kind of telling Android there's a configured connection on Linux level?
By the way, every Mac allows the creation of a Bluetooth PAN with one click so this would be my usage scenario ;-)
This seems like it should work, and indeed I can use a similar technique from an ubuntu laptop to connect to another device, but my HTC Hero doesn't seem to have hcitool or pand installed on it. I downloaded some prebuilt binaries for them but they don't seem to be able to access the bluetooth device:
# /data/tmp/pand --role PANU --connect 00:17:83:0F:0F:C7 -n
pand[5083]: Bluetooth PAN daemon version 3.36
pand[5083]: Connecting to 00:17:83:0F:0F:C7
pand[5083]: Connect to 00:17:83:0F:0F:C7 failed. No route to host(113)
Do all versions of Android come with pand and hcitool? I'm on 1.5 although I'll be reflashing to 2.1 soon.
"find / -name pand" yields no results
trphunk said:
Do all versions of Android come with pand and hcitool? I'm on 1.5 although I'll be reflashing to 2.1 soon.
Click to expand...
Click to collapse
No, it was added by rom cookers and I don't know how they did this. I think there are missing some kernel modules or something like that.
trphunk said:
This seems like it should work, and indeed I can use a similar technique from an ubuntu laptop to connect to another device, but my HTC Hero doesn't seem to have hcitool or pand installed on it. I downloaded some prebuilt binaries for them but they don't seem to be able to access the bluetooth device:
# /data/tmp/pand --role PANU --connect 00:17:83:0F:0F:C7 -n
pand[5083]: Bluetooth PAN daemon version 3.36
pand[5083]: Connecting to 00:17:83:0F:0F:C7
pand[5083]: Connect to 00:17:83:0F:0F:C7 failed. No route to host(113)
Do all versions of Android come with pand and hcitool? I'm on 1.5 although I'll be reflashing to 2.1 soon.
"find / -name pand" yields no results
Click to expand...
Click to collapse
Brut.all said:
No, it was added by rom cookers and I don't know how they did this. I think there are missing some kernel modules or something like that.
Click to expand...
Click to collapse
Thanks, I've got the FroydVillain ROM installed now and can confirm that it comes with pand and hcitool compiled and working.
Reverse tether does seem to work, the method that's worked for me has been to use:
Code:
pand --connect <remote BT device hex address>
ifconfig bnep0 down
dhcpcd bnep0
setprop net.dns1 8.8.8.8
This allows the device to access the internet, and you can ping www . google . com and get a response etc.
However, a lot of android apps (including the built-in google apps for gmail etc) use the ConnectivityService (see source code here) to access the net, and since this method of reverse tethering doesn't change the connectivity state within this service, those apps still believe that there is no internet connection on the device.
I can't see an easy way of "tricking" the ConnectivityService as it appears to have been hard coded to only cater for WIFI and 3G connectivity. So perhaps the only way is to rewrite it.
I've found a few cases of others going through the same issues online, although I think the getMobileDataEnabled return value is a red herring:
(I'm not allowed to post links, so you will need to add http : // www to these
superuser.com/questions/188636/close-connect-android-to-internet-using-usb-tether-through-laptops-newtwork
forceclose.com/questions/2669/connect-android-to-internet-using-usb-tether-through-laptops-newtwork
Looking at the code in ConnectivityService.java it seems that apps must subscribe to this service via getInstance() and then wait for a sendConnectedBroadcast() to occur, triggering them into action (e.g. the gmail app will attempt to sync to the gmail server etc).
Anyone got any ideas for an easier route than rewriting ConnectivityService.java to add an additional connectivity type?
Edit to add:
Found another related discussion at the following site. Seems to suggest modifying the ConnectivityService is the way to go:
comments.gmane.org/gmane.comp.handhelds.android.porting/12028
Based on the posts I've seen in this thread, I'm guessing I can't use BlueTooth PAN tethering from my rooted Dinc to provide internet access to a Samsung Galaxy Tab???
So has anyone tried to Bluetooth tether a Galaxy tab with a phone?
Thanks for this thread! I just successfully Tethered both internet+gps over bluetooth from my G1 to my AdventVega tablet.
For now I am using GScript lite with the following script commands:
Code:
pand --connect {my phones BT hex address}
ifconfig bnep0 down
dhcpcd bnep0
setprop net.dns1 8.8.8.8
dhcpcd bnep0
(for some reason the first dhcpcd command always says permission denied, but the last one always works)
So...
1) Get in to car with Android phone and Vega Tablet.
2) On phone: Enable GPS/Bluetooth, click GPS2Bluetooth widget button, click WiFi Tether (configure for BT), press to start tethering.
3) On tablet: Enable Bluetooth, click Bluetooth GPS Provider, click Start, click Back or Home, click GScript Lite, click "Connect to BT-PAN" (above script)
4) Run GoogleMaps/Navigation on tablet and enjoy using your tablet as the ultimate GPS navigation system (while streaming Pandora in the background)!
I am very happy. I just wish I could make step 2 & 3 be a single click instead of so many.
NOTE: Must have "Allow mock locations" enabled in Settings->Applications->Development
NOTE2: You must pair your phone and tablet in BT settings (it will never say "connected" though, which is fine)
I tried this, but still no connection between my android phone and the other phone. Is there some other method?

Question 2: why can't I connect to my NAS via my wireless LAN?

My new T-Mobile Samsung Galaxy S 4G will not connect to the WD-NetCenter on my home LAN.
I've tried 4 apps: ES File Explorer (which worked fine on my husband's cheap e-reader, although it's a slightly earlier version), Total Commander with the LAN plug-in, X-Plore File Manager, and File Manager by Rhythm. None of them can connect to my NetCenter.
I've tried scanning on all of them and none of them see anything at all on my LAN. Scanning works fine with ESFE from hubby's ereader. I've tried setting them up by hand, but even if they allow me to put in the info and make an icon, they still can't find any data if I try to connect. I figure that, since ESFE works on another device in our system and 4 different apps won't set up on this phone, it must be the phone.
WiFi is on, as that's how I connect to the net — haven't paid for a data plan. There are no user names or passwords for the NetCenter.
I'm not knowledgeable about networks and protocols, so here I am. What do I need to check to see how to connect to my NetCenter? Or is there a bug in this hardware or this version of Android that is in my way?
Since android is Linux based you need to make sure that your nas is capable of using samba to share. Your nas is probably reconfigured to use windows sharing.
Sent from my one horned SGS4G
Samba is "Windows sharing" for non_windows platforms.
I'd first check that you are properly connected to the same network as your NAS with your wireless.
If your ROM doesn't have it, I would install Terminal Emulator
Once you have started it (you don't need root, as I recall), type "ifconfig" after the $ prompt, then a return
Code:
$ ifconfig
Should give you your IP address, probably up near the top of the output. For me, I see eth0 as the first interface described and the second line starts with inet addr:192.168.mmm.nnn -- that tells me I'm on subnet 192.168.mmm -- that should be the same as your NAS. Yours might be also be something like 10.0.mmm.nnn -- as long as both your phone and your NAS have the first three of the four numbers between the dots matching, you're OK.
Code:
eth0 Link encap:Ethernet HWaddr 50:e5:49:54:e6:f3
inet addr:192.168.16.17 Bcast:192.168.16.255 Mask:255.255.255.0
[...]
If you are on the same subnet, then, if the address of your NAS is 192.168.mmm.NNN, try
Code:
$ ping 192.168.mmm.NNN
You can stop the output by holding the volume-down toggle on the left of your phone while you type the letter "c" on the phone's keyboard.
If you see lines like
Code:
PING 192.168.16.1 (192.168.16.1) 56(84) bytes of data.
64 bytes from 192.168.16.1: icmp_req=1 ttl=64 time=0.260 ms
64 bytes from 192.168.16.1: icmp_req=2 ttl=64 time=0.129 ms
64 bytes from 192.168.16.1: icmp_req=3 ttl=64 time=0.177 ms
as long as the "icmp_req=" numbers don't miss many, your phone is reaching the NAS. 1 in 10 is probably OK, much more than that you have some network issues.
If your phone is reaching your NAS, they you probably should ask for support from your phone application and/or the NAS.
If the NAS is wireless to the WiFi access point, then another possibility is that you have "client protection" or the like enabled on your wireless access point. This prevents one wireless client from "talking" with another. Can other wireless devices access the NAS?
Sorry, candler33w, but your reply makes no sense to me since, as I said, our other Android device connects to the NAS just fine, and I know I made no changes to the NAS or the device for that to happen. ???
jeffsf, I picked up Terminal Emulator, thanks. It's like going back to the DOS command line; ah, those were the days. I'm reading the Wiki, but assimilation will take me some time.
$ ifconfig returned nothing at all.
Am I perhaps not in the right directory to access that command?
$ echo $PATH returned this: /data/local/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
and $ ls gave me a list of commands(?) that did included config, but not ifconfig.​
Any assistance here will be appreciated. I know just enough to get myself in trouble if I'm not real careful here, and since I got this thing 2 days ago, I don't really want to brick it from carelessness.
Thanks.
Thank you, Gentlemen, for taking pity on a poor fool who can't keep track of her own networks.
jeffsf, my apologies for wasting so much of your time on that detailed answer to a problem that really didn't exist.
My router puts out two networks, a primary using WPA2 and the guest using WEP which has a much easier password. Thoughtlessly, I had logged my phone into the guest, not thinking that guest only has web access and no ability to get to my PCs or NAS.
Well, as I stated, I'm not that great on networks.
If this gray-matter deterioration continues apace, I'm going to have to move closer to the grandkids to have them maintain my systems for me. Bummer.
Not that great at networks with two ssid's broadcasting on the same router Hahahaha. Made my morning.
Well shoot! The stock ROM apparently doesn't have the ifstat command.
I use WiFi Widget and find the 2x1 widget shows information in a compact way. It will give you your IP address.
I found Fing on "Play" that seems like it might be helpful. I haven't used it nor heard of it before today.
Nice widget, FB. Thanks.
As for the second network, it's for the kids when they come loaded with their "stuff." The smarter ones leave that at home and just log in on one of our desktops, but some seem to be tethered to their laptops. Not hard to set up.
FBis251 said:
Not that great at networks with two ssid's broadcasting on the same router Hahahaha. Made my morning.
Click to expand...
Click to collapse
lol... I bet the router is a Netgear... they by default broadcast 2... I have a Netgear 7550 that does that exact thing.
Sent from my Cyanogen9 SGH-T959v
gabrielshaste said:
lol... I bet the router is a Netgear... they by default broadcast 2... I have a Netgear 7550 that does that exact thing.
Sent from my Cyanogen9 SGH-T959v
Click to expand...
Click to collapse
DD-WRT software will allow you to broadcast multiple ssid's.
Sent from my SGH-T959V using Tapatalk 2

Help! Android tethering! Double nat! 100% packet loss

I'm having issues with my internet and am unable to do certain things that are sensitive to the NAT type. I have an LG Stylo 2 (Sprint), Windows 7 PC, Linksys router, Xbox One. Here's the order things are connected in
LGLS775>USB Tethered via PDANet>Windows 7 PC>Ethernet wire>Linksys router>Ethernet wire>Xbox One
I'm not sure how to set things up to fix the NAT type. Connection details: 60ms ping. 28 download. 7 upload. 100% packet loss.
I can still play certain games and access certain websites. But not everything. PLEASE DO NO TELL ME TO GO TO A DIFFERENT FORUM! ONLY POST HELPFUL ANSWERS
3 years later.
This is almost the same setup I'm working with but im using the wifi instead of usb on those parts.
For anyone having these issues I've got a couple things to try.
You can connect directly to pdanet via WiFi with pretty much any device (that I've seen so far) if you're able to set the proxy setting to manual using the ip given in pdanet with the port 8000. For me it would be 192.168.49.1:8000.
Or if you have to or just prefer to use a PDANet -> PC -> Router -> Device setup.
I used to have a much worse time with disconnects and error codes playing Destiny 2 on Steam, I still have problems here and there, sometimes often still. Ive got a good feeling though that what i did, actually improved my situation at least a bit.
In pdanet top right little menu with "Help" and "Dev Code", select IPv6 Support, then Prioritize IPv4.
Then in Windows, head to Network and Sharing, Change adapter settings, right click > properties on the adapter doing ICS then (what i did) uncheck "Internet Protocol Version 6 (TCP/IPv6)", "QoS Packet Scheduler", and anything else that isn't default, in my case, Npcap Packet Drivers.
I actually can't be sure that any of these really did anything but im much less frustrated than i used to be.
Also in my case im using a Netgear in AP mode, which ends up with a different local ip than ones that pdanet give. For me, after pdanet is adequately connected to the router, it seems that most of my Android devices work without further setup but some devices require setting a static ip, which should be easy to find using "arp -a" or "ipconfig" in cmd.
-In My Case-
The gateway was 192.168.137.1 so i choose any 2 digit number after 137. for the main (connecting device's) ip. Example. 192.168.137.23
So when connecting device to router via WiFi you will choose to set Manual/Static IP then after that the settings should look something like...
IP: 192.168.137.23
Gateway: 192.168.137.1
DNS: 192.168.137.1
Secondary DNS: 8.8.8.8
If v these v are set automatically or not required then you should be able to ignore them
Network prefix length: 24
Subnet mask: 255.255.255.0
I'm still trying to find other ways to set things that may be better but so far these are working okay for me. Don't hesitate to ask any question if clarification is needed, i understand a lot of things i post can be confusing. I hope at least some of this was helpful in any way!
CornholeOS_x86 said:
3 years later.
This is almost the same setup I'm working with but im using the wifi instead of usb on those parts.
For anyone having these issues I've got a couple things to try.
You can connect directly to pdanet via WiFi with pretty much any device (that I've seen so far) if you're able to set the proxy setting to manual using the ip given in pdanet with the port 8000. For me it would be 192.168.49.1:8000.
Or if you have to or just prefer to use a PDANet -> PC -> Router -> Device setup.
I used to have a much worse time with disconnects and error codes playing Destiny 2 on Steam, I still have problems here and there, sometimes often still. Ive got a good feeling though that what i did, actually improved my situation at least a bit.
In pdanet top right little menu with "Help" and "Dev Code", select IPv6 Support, then Prioritize IPv4.
Then in Windows, head to Network and Sharing, Change adapter settings, right click > properties on the adapter doing ICS then (what i did) uncheck "Internet Protocol Version 6 (TCP/IPv6)", "QoS Packet Scheduler", and anything else that isn't default, in my case, Npcap Packet Drivers.
I actually can't be sure that any of these really did anything but im much less frustrated than i used to be.
Also in my case im using a Netgear in AP mode, which ends up with a different local ip than ones that pdanet give. For me, after pdanet is adequately connected to the router, it seems that most of my Android devices work without further setup but some devices require setting a static ip, which should be easy to find using "arp -a" or "ipconfig" in cmd.
-In My Case-
The gateway was 192.168.137.1 so i choose any 2 digit number after 137. for the main (connecting device's) ip. Example. 192.168.137.23
So when connecting device to router via WiFi you will choose to set Manual/Static IP then after that the settings should look something like...
IP: 192.168.137.23
Gateway: 192.168.137.1
DNS: 192.168.137.1
Secondary DNS: 8.8.8.8
If v these v are set automatically or not required then you should be able to ignore them
Network prefix length: 24
Subnet mask: 255.255.255.0
I'm still trying to find other ways to set things that may be better but so far these are working okay for me. Don't hesitate to ask any question if clarification is needed, i understand a lot of things i post can be confusing. I hope at least some of this was helpful in any way!
Click to expand...
Click to collapse
So I actually figured it out a while back but now I'm in the same boat since I've moved to a place with no highspeed again. Same basis except I'm now T-Mobile, using a VPN and the Hotspot VPN APK. Same connection route. If I remember correctly there was an IP address error with the 137.anything. I'll post an update soon.
Anything better then pdanet ? That bypass data speed throttle after using so much???

Categories

Resources