Internet does not work - Touch Cruise Android Development

Hallo,
I installed "system-froyo-15-07-10_15.tgz". The most things are fine, but I have big problems to run the internet on my XDA Orbit 2.
I use:
Code:
#alloctest 0x2000
set RAMSIZE 0x08000000
set MTYPE 1723
set KERNEL zImage
set initrd initrd.gz
#
# The following kernel parameters are useful
# ppp.nostart - Set ppp.nostart=1 to disable starting the ppp connection on boot
# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# pm.sleep_mode - The mode used when the phone is off
# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,
# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt
# Default is 1, use 1 for best power savings
# board-htcpolaris.panel_type - Panel type used to power the panel off and on
# 0=Don't power off the panel (Default)
# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)
# lcd.density - Defaults to 160, 128 shows more on screen
#
set cmdline "ppp.nostart=0 ppp.apn=internet ppp.username=none ppp.password=none pm.sleep_mode=1 mddi.width=240 mddi.height=320 no_console_suspend clock-7x00.mddi=0xa51"
boot
What can I do to run the internet with 3G (UMTS by o2)?
Ciao
Alex

Hi,
i didn`t use Froyo on my XDA2, but the only thing to get 3G Work was to flash it on NAND. Never had success, with any distro, to get 3G work booting from haret.
rgds
Matthias

Related

ppp over adb (for linux/unix users)

Hey, I was trying to share my internet connection on my laptop with my android phone, so the android could use the laptop's internet connection via usb.
Until somebody compiles an usbnet enabled kernel into an android ROM (this would be the cleanest way), the only way I found for doing this has been emulating the "ppp over ssh" method (search google).
I know, tcp over tcp is a bad idea, but hey, it works!.
Every method I found for doing something similar is to do the opposite: share the phone internet connection with the laptop. I'd like my laptop to be the one that shares the Internet.
The idea here is quite simple:
Code:
pppd nodetach noauth nodeflate pty "ssh [email protected] pppd noauth nodetach notty" ipparam vpn 192.168.0.1:192.168.0.254
pppd in the local host can be connected to pppd in the remote host using a tcp connection, so we can have an IP tunnel between the two endpoints.
The first thing I tried was to replace the ssh part of the command with "adb shell", supposing that adb was going to respect the pipe chain, but it seems that adb doesn't connect its stdin with the shell stdin (try "echo test | adb shell cat", it simply doesn't work)
So, I made it work by using the port redirection feature in adb, and the wonderful "nc". The idea is this:
In the linux host:
Code:
# forward 12000/tcp
adb forward tcp:12000 tcp:12000
# enable routing
sysctl net.ipv4.ip_forward=1
# enable nat
iptables -t nat -I POSTROUTING -s 192.168.0.254 -j MASQUERADE -o eth0
In the android device:
Code:
# delete the default route
ip r del default
# execute pppd listening in 12000/tcp
pppd nodetach noauth pty "nc -l -p 12000" defaultroute
In the linux host:
Code:
# execute pppd connected to 12000/tcp
pppd nodetach noauth nodeflate pty "nc localhost 12000" ipparam vpn 192.168.0.1:192.168.0.254
Et voilà. The android device is accessing the Internet using my laptop's ethernet connection via USB.
I'd like to develop a more user friendly method of doing this, but first I'd like to know if somebody has been working on this already.
BTW, AFAIK this is only for linux/unix users.
EDIT: Sorry, forgot to comment: for some reason, android's pppd version, when doing this kind of things, tries to allocate a pseudo tty under "/dev.pts". As this directory doesn't exists, current pppd will fail.
I had to modify pppd source to allocate the pseudo tty under "/dev/pts" instead of under "/dev.pts". I attach the modified version of the binary.
How reliable is it?
I did the same thing a few months ago, but when I ran some heavy traffic through it, the connection broke and adb started reporting the device as "offline" until re-plugged. Are you able to run heavy traffic on top of it for more than 2-3 minutes?
When I tested it for a min it worked great, but when I really needed to use it (my ADSL went offline and I tried to run my home network's traffic through the G1 via ppp), it went offline every 2-3 minutes and needed replugging.
Correction: I retested my script now, on JF 1.51, and it works reliably. With the old kernel (2.6.25) it was unreliable but with the current one it's fine. I'm tethering over it right now.
i made a script to tethering using this pppd-mod for everyone who is interested
Code:
ADB=/opt/android-sdk-1.5/tools/adb
echo "Setting up..."
$ADB shell "echo 1 > /proc/sys/net/ipv4/ip_forward"
$ADB shell "iptables -t nat -F"
$ADB shell "iptables -t nat -A POSTROUTING -j MASQUERADE -o rmnet0"
$ADB forward tcp:12000 tcp:12000
$ADB shell "killall pppd-mod" &> /dev/null
echo "Starting PPP daemon..."
$ADB shell "pppd-mod noauth pty 'nc -l -p 12000 '" &
sleep 5
echo "Establishing connection..."
pppd noauth nodeflate pty "nc localhost 12000" ipparam vpn 192.168.0.2:192.168.0.1
while [ "`ifconfig | grep 192.168.0.1`" == "" ]; do
sleep 1
done
route del -net 0.0.0.0 &> /dev/null
route add -net 0.0.0.0 gw 192.168.0.1
echo "nameserver 4.2.2.2" > /etc/resolv.conf
echo "Connected."
Still hoping some day regular usb networking will work :-/
mzet said:
i made a script to tethering using this pppd-mod for everyone who is interested
Click to expand...
Click to collapse
Is there anything required phone-side for that to work?
juanmasg said:
Until somebody compiles an usbnet enabled kernel into an android ROM (this would be the cleanest way), the only way I found for doing this has been emulating the "ppp over ssh" method (search google).
Click to expand...
Click to collapse
skyjumper said:
Is there anything required phone-side for that to work?
Click to expand...
Click to collapse
I do believe Cyanogen's 3.9.1 has rudimentary support and he's working on getting it working. Of course the man appears to be on at least 3-4 completely unique vectors (quite impressive, I counted donut, samba, cyanogen mod, and usbnet) so it might be a little bit of time before we get this from him.
skyjumper said:
Is there anything required phone-side for that to work?
Click to expand...
Click to collapse
you have to have binary pppd-mod from first post in your $PATH on your phone and rooted phone with iptables of course
mzet said:
you have to have binary pppd-mod from first post in your $PATH on your phone and rooted phone with iptables of course
Click to expand...
Click to collapse
Ah, didnt even notice the first post had a file. Been looking to do this for some time. Thanks to whoever all helped to get it working.
juanmasg said:
Hey, I was trying to share my internet connection on my laptop with my android phone, so the android could use the laptop's internet connection via usb.
Until somebody compiles an usbnet enabled kernel into an android ROM (this would be the cleanest way), the only way I found for doing this has been emulating the "ppp over ssh" method (search google).
I know, tcp over tcp is a bad idea, but hey, it works!.
Every method I found for doing something similar is to do the opposite: share the phone internet connection with the laptop. I'd like my laptop to be the one that shares the Internet.
The idea here is quite simple:
Code:
pppd nodetach noauth nodeflate pty "ssh [email protected] pppd noauth nodetach notty" ipparam vpn 192.168.0.1:192.168.0.254
pppd in the local host can be connected to pppd in the remote host using a tcp connection, so we can have an IP tunnel between the two endpoints.
The first thing I tried was to replace the ssh part of the command with "adb shell", supposing that adb was going to respect the pipe chain, but it seems that adb doesn't connect its stdin with the shell stdin (try "echo test | adb shell cat", it simply doesn't work)
So, I made it work by using the port redirection feature in adb, and the wonderful "nc". The idea is this:
In the linux host:
Code:
# forward 12000/tcp
adb forward tcp:12000 tcp:12000
# enable routing
sysctl net.ipv4.ip_forward=1
# enable nat
iptables -t nat -I POSTROUTING -s 192.168.0.254 -j MASQUERADE -o eth0
In the android device:
Code:
# delete the default route
ip r del default
# execute pppd listening in 12000/tcp
pppd nodetach noauth pty "nc -l -p 12000" defaultroute
In the linux host:
Code:
# execute pppd connected to 12000/tcp
pppd nodetach noauth nodeflate pty "nc localhost 12000" ipparam vpn 192.168.0.1:192.168.0.254
Et voilà. The android device is accessing the Internet using my laptop's ethernet connection via USB.
I'd like to develop a more user friendly method of doing this, but first I'd like to know if somebody has been working on this already.
BTW, AFAIK this is only for linux/unix users.
EDIT: Sorry, forgot to comment: for some reason, android's pppd version, when doing this kind of things, tries to allocate a pseudo tty under "/dev.pts". As this directory doesn't exists, current pppd will fail.
I had to modify pppd source to allocate the pseudo tty under "/dev/pts" instead of under "/dev.pts". I attach the modified version of the binary.
Click to expand...
Click to collapse
Hello,
I have been trying your method without success. The phone and the computer can ping each other but no connection to the internet. Using wireshark I can't see anything on the eth0 when I try to ping from the phone. All I see is stuff from ppp0 and the loop back. What am I doing wrong?
Thanks
ethernet-over-usb
First, I appreciate juanmasg's initiaive on this much needed feature. thanks!
CyanogenMod thread at http://forum.xda-developers.com/showthread.php?t=539744 talks about experimental ethernet-over-usb functionality (see CHANGELOG for 3.9.1). I don't know how it will be used but it seems he's trying to get it to work. juanmasg can talk to cyanogen for current status and a possible integration of his methodology into his ROMs. I am monitoring his thread for any update on this feature and I just sent a tweet to cyanogen about this. he's a great developer!
With your script .I got these output
Setting up...
Starting PPP daemon...
Establishing connection...
[: 16: unexpected operator
Connected.
And it didn't work.Do you have any ideas?
Sorry for my poor English.
I use a route and the route's ip is 192.168.0.1 ,the computer's ip is 192.168.2.
I think it cause the problem but I don't know how to edit your scipt to make it works.
Hmm. Does anyone know the correct parameters to use the actual "adb ppp" command? I've searched all over the web and nobody has posted any example of how to use this command with the G1. What is the name of the tty device that we should use? etc. etc...
Never mind, I see it now in the adb source code. It's a bit useless as-is, but a small tweak would make it pretty useful. If it was changed to return an interactive_shell() session, and then invoke "pppd notty" in that session, then invoke pppd on the host, it would be a simple means of tethering over USB. The only other thing you'd need is to set up the appropriate NAT rules on either side, depending on whether you want the G1 to share the PC's network, or vice versa.
Too bad pppd insists on setting up a pseudo-tty for itself, there's no need for a tty device driver in scenarios like this.
OK, this is the patch I made to adb to make its ppp command work the way I want.
With that, invoke adb like this:
adb ppp foo notty 192.168.2.1:192.168.2.2
The <tty> parameter is no longer used; everything past the "foo" is just passed as arguments to the local pppd.
Once this is done you can set up NAT forwarding on whichever side you want.
And yes, I know this isn't a clean patch. I should make this a new command instead of usurping the existing ppp command, since presumably the original command is still useful to somebody out there. But this was just a quick hack to see if it would work, and it works great. This saves a lot of the CPU overhead of ssh / port forwarding / etc...
To use the G1's network from the PC, issue these commands on the G1:
# enable routing
sysctl net.ipv4.ip_forward=1
# enable nat
iptables -t nat -I POSTROUTING -s 192.168.2.1 -j MASQUERADE -o rmnet0
(Use tiwlan0 if you want to use the G1's wifi. Not sure why you'd need to do this if the PC already has its own wifi.)
And then set the default route on the PC
route add -net default gw 192.168.2.2
I got about 15-20KB/sec download using EDGE, and about 65KB/sec download using 3G. You may want the "usepeerdns" option in your pppd options, otherwise you'll have to edit /etc/resolv.conf yourself and copy the nameservers from the G1's /system/etc/resolv.conf
To use the PC's network from the G1, just swap the appropriate parameters around. E.g.,
Issue these commands on the PC:
# enable routing
sysctl net.ipv4.ip_forward=1
# enable nat
iptables -t nat -I POSTROUTING -s 192.168.2.2 -j MASQUERADE -o eth0
And issue this command on the G1
route add -net default gw 192.168.2.1
ppp over adb on G2
Hi guys,
I've take your example to do the same on my G2.
I've found some problem and some solution.
This is the script I used:
Code:
#!/bin/sh
ADB=/opt/Android/android-sdk-linux_x86-1.5_r3/tools/adb
echo "Setting up..."
$ADB shell "echo 1 > /proc/sys/net/ipv4/ip_forward"
$ADB forward tcp:12000 tcp:12000
$ADB shell "killall pppd-mod" &> /dev/null
echo "Starting PPP daemon..."
$ADB shell "pppd-mod noauth pty 'nc -l -p 12000 '" &
sleep 5
echo "Establishing connection..."
/usr/sbin/pppd noauth nodeflate pty "nc localhost 12000" ipparam vpn 192.168.0.2:192.168.0.1
while [ "`/sbin/ifconfig | grep 192.168.0.1`" == "" ]; do
sleep 1
done
$ADB shell "iproute add default dev ppp0" &
$ADB shell "iproute del default via 192.168.1.1 dev tiwlan0" &
echo "Connected."
But there is a problem on G2. If the system doesn't believe to be connected (WIFI or 3G) although it can go in internet through the ppp connection it doesn't go on internet.
So to fool it I've created a WIFI connection, not suitable for internet, and then deleted ( in the script ) the default route to tiwlan0.
Somebody know if is possible to believe to Android that it is connected when it isn't?
Bye
im on archlinux and i wanna do this :S how can i ?
i follow the guid in the first page but cant get to it :S when i do the last step on the linux host it says that nc its not a commmand .
anyone plzzz ????
Hi dear,
I don't know archlinux...
However the problem in your situation is that you have to install netcat too.
But if you need more help please tell us which problem you encounter with more detail.
Bye
Zioalex
zioalex said:
Hi dear,
I don't know archlinux...
However the problem in your situation is that you have to install netcat too.
But if you need more help please tell us which problem you encounter with more detail.
Bye
Zioalex
Click to expand...
Click to collapse
gonna try installing netcant and comment, thx !!!!

[Q] Networking (netmask) issues on a Captivate

I've got a shiny new Samsung Captivate (Galaxy S) on AT&T.. working fairly well so far, besides the annoyances with the phone being locked down and the crappy bundled mail client (I've got loooots of email in my imap box, grin.) Phone is still stock; haven't had a chance to root it yet.
In any case, the issue I'm having is that the phone is setting an invalid netmask (255.0.0.0) on the wifi interface, instead of the proper one as served by dhcp (255.255.255.0).. this is preventing the phone from talking to other devices in 10/8.
Here's the DHCP response sent to the phone by my DHCP server:
Code:
Client-IP 10.20.0.120
Your-IP 10.20.0.120
Client-Ethernet-Address 00:26:37:xx:xx:xx
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Server-ID Option 54, length 4: 10.20.0.254
Lease-Time Option 51, length 4: 86400
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 10.20.0.254
Domain-Name-Server Option 6, length 8: 10.20.0.254,10.20.0.1
BR Option 28, length 4: 10.20.0.255
RN Option 58, length 4: 43200
RB Option 59, length 4: 75600
END Option 255, length 0
PAD Option 0, length 0, occurs 4
As you can see from the above, the phone was assigned 10.20.0.120 with a netmask of 255.255.255.0. I finally set up the android sdk, and fired up a shell with adb.. here's what it thinks its ip is:
Code:
$ ifconfig eth0
eth0: ip 10.20.0.120 mask 255.0.0.0 flags [up broadcast running multicast]
even odder, the properties on the phone has the correct netmask; output from 'getprop':
Code:
[dhcp.eth0.pid]: [3350]
[dhcp.eth0.reason]: [BOUND]
[dhcp.eth0.dns1]: [10.20.0.254]
[dhcp.eth0.dns2]: [10.20.0.1]
[dhcp.eth0.dns3]: []
[dhcp.eth0.dns4]: []
[dhcp.eth0.ipaddress]: [10.20.0.120]
[dhcp.eth0.gateway]: [10.20.0.254]
[dhcp.eth0.mask]: [255.255.255.0]
[dhcp.eth0.leasetime]: [86400]
[dhcp.eth0.server]: [10.20.0.254]
I suspect a firmware bug, but don't know for sure - anyone run into this before?
Appreciate any thoughts!
Same issue here. I posted about it here and on the ATT forums and sadly nobody has any suggestions other than reporting the bug to samsung. I did a bit of poking around in the console grepping 255.0.0.0 but didnt find any files. Im just gonna weather the storm and wait for the next firmware to be released. I have a shortcut to wifi settings and I just toggle the "static ip" option as needed.
FYI, there's also a post on ATT's forums about this.. I'm not allowed to link to it, but a Google search for "Samsung Captivate WiFi DHCP netmask issue" will get you to it..
Generally I dislike reviving old threads, but this appears unresolved and I've been encountering it on my Samsung Vibrant.
Can anyone confirm whether this happens with Froyo, or other Eclair-based handsets, or is it specific to Android 2.1 on Samsung GalaxyS?
When the Wifi DHCP assigns an IP in the 10.x.x.x block, (which is actually assigned with a /24 netmask) android puts the IP on the interface TWICE, with both /24 and an incorrect /8 subnet mask. ("ifconfig" is essentially a legacy command from linux kernel 2.2 era, when multiple IPs required aliased interfaces - with two IPs on one interface today "ifconfig" will only show the first one. Since kernel 2.4 days "ip" is the preferred tool)
$ busybox ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5e:38:e9:7b:aa:6d brd ff:ff:ff:ff:ff:ff
3: tunl0: <NOARP> mtu 1480 qdisc noop state DOWN
link/ipip 0.0.0.0 brd 0.0.0.0
4: gre0: <NOARP> mtu 1476 qdisc noop state DOWN
link/gre 0.0.0.0 brd 0.0.0.0
30: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 5c:da:d4:09:fb:f3 brd ff:ff:ff:ff:ff:ff
inet 10.200.10.28/8 brd 10.255.255.255 scope global eth0
inet 10.200.10.28/24 brd 10.200.10.255 scope global eth0
inet6 2001:470:e130:98:5eda:d4ff:fe09:fbf3/64 scope global dynamic
valid_lft 2591705sec preferred_lft 604505sec
inet6 fe80::5eda:d4ff:fe09:fbf3/64 scope link
valid_lft forever preferred_lft forever
$
This causes me significant problems, as 10.200.10.0/24 is the wifi subnet, but 50 other 10.x.x.x subnets exist on the local network, and because it erroneously applies a /8 mask on the local interface I'm unable to reach anything on the 10.x.x.x networks outside of 10.200.10.x. (I have to manually go in and remove the first IP with the /8 subnet)
(Aside, as you might notice it correctly autoconfigured an ipv6 address, with 2001:470:e130::1/64 gateway running radvd - now if only apps like web browser understood ipv6...)
j

[Q] Looking for tuning beacon interval on BCM4325 WLAN card

I am carrying out wifi mesh experiments on my several GT540 phones which are configured with wifi ad hoc mode.
However, I found that the network traffic has been dominated by the beacon messages which are broadcasted at the interval of 0.1 second. So I am looking for methods that can increase this beacon interval for higher network throughput.
The wifi adapters on my GT540 phones are Broadcom BCM4325. How can I configure their beacon intervals?
I did a liitle search into the android source code.
$ cd android-source-folder/hardware/broadcom/wlan/bcm4325
$ grep -lir "beacon_period" .
./src/include/wlioctl.h
./src/include/proto/802.11.h
There is only a range defined for beacon interval in the file 802.11.h.
#define DOT11_MIN_BEACON_PERIOD 1
#define DOT11_MAX_BEACON_PERIOD 0xFFFF
How I can adjust this beacon period? Any feedback would be extremely appreciated
Shawn

[ubuntu] Manual (no app) LAN Reverse Tethering

this has been tested on ICS. You will need Terminal Emulator with root privileges. you may not have to use (or have different) full path to the binaries but they are shown when used as part of a file eg. "/system/bin/".
Android
Code:
Settings -> More... -> Tethering & portable hotspot -> USB tethering
this will bring up the usb network device with an automatically assigned IP address on both the host and client ie. PC and phone.
Linux
Code:
$ sudo su
# echo 1 > /proc/sys/net/ipv4/ip_forward
# exit
$ ifconfig
[b]usb0[/b] Link encap:Ethernet HWaddr 1e:98:35:16:12:cd
inet addr:[b]192.168.42.170[/b] Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::1c98:35ff:fe16:12cd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:537 errors:0 dropped:0 overruns:0 frame:0
TX packets:671 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:55661 (55.6 KB) TX bytes:346260 (346.2 KB)
look for device usbX where X is the connected device number. e. if there is only one tethered device connected it would most likely be usb0.
grab the PC usbX devices IP prefixed with "inet addr:". in this example the address is 192.168.42.170.
if you do not see a usbX network device, you will have to setup RNDIS, which is outside the scope of this example howto.
Android
Code:
Apps -> Terminal Emulator
open terminal emulator.
Code:
$ su
# route add default gw [b]192.168.42.170[/b] dev usb0
# exit
$ exit
NB, substitute with the PC IP address you obtained earlier.
with these steps completed, the phone will send outgoing packets to the PC address then the PC will forward packets to its default gw (gateway).
my router at work (where i use this) is already forwarding for the example network class above so i do not have to go any further than this.
google play appears to work but downloading does not seem to actually happen. i tried leaving mobile data enabled with this method and it did not work, others may have success. i obviously do not have a wifi AP to connect to, so it still might be possible to connect to an AP and use this method to enable download in google play (but that seems a bit redundant if you are able to connect via wifi in the first place).
at this point try the browser and attempt to load any site. if it does not work then continue on with the remaining steps; you can either bridge the usbX and ethX device (or whatever your LAN device is), change the IP (on both PC and phone) of usbX to the same network class (as your LAN) or have the PC network translate on behalf of the phone (untested as i dont need it). below is an example of NAT (network address translation) for linux; for bridging or changing the IP addresses please use google for a howto.
Linux
Code:
$ vi nat_ethX.sh
use an editor and paste the follow code below into the script or type the three lines below manually (ignoring the first line).
Code:
#!/bin/sh
/sbin/iptables -F --table nat
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE
replace eth0 with the actual PC ethX network device name relevant to your LAN setup.
Code:
$ chmod 744 nat_ethX.sh
$ sudo ./nat_ethX.sh
change the permissions of the file and run it.
again this is untested, but your PC should now be sending packets from its own IP address on behalf of the phone which your router is already accepting.
Code:
iptables -F --table nat
to remove the NAT iptables rules
Wi-Fi Hotspot
Code:
Settings -> More... -> Tethering & portable hotspot -> Portable Wi-Fi hotspot
this will bring up the wifi network device with a static IP on the host and an automatically assigned IP address on the client ie. first phone and second phone (in this example).
on the second phone, connect to the newly created AP from the first phone.
as wifi is enabled on the second phone google play will actually download. you do not need to setup anything else on the second phone.
Android (first phone)
Code:
Apps -> Terminal Emulator
open terminal emulator.
Code:
$ su
# route add default gw [b]192.168.42.170[/b] dev usb0
if you enable the wifi hotspot on the first phone, you must once again reset the default gw in the route table.
Code:
$ su
# echo 1 > /proc/sys/net/ipv4/ip_forward
IP forwarding should have been automatically set when enabling the wifi hotspot feature. you should not have to do this step, it should not break anything if you do.
Code:
#!/system/bin/sh
/system/bin/iptables -F --table nat
/system/bin/iptables -P FORWARD ACCEPT
/system/bin/iptables --table nat -A POSTROUTING -o usb0 -j MASQUERADE
again you can probably route another way, but here i am using NAT once more as in my case, the wifi hotspot / AP device wl0.1 is set to another network class (192.168.43.0) from that of usb0 (192.168.42.0). like the example above, you can place this in a file and run it, or type the three lines manually (ignoring the first line).
Code:
iptables -F --table nat
to remove the NAT iptables rules
Terminal Emulator (extra info.)
Code:
$ ifconfig
$ iwconfig
you can check the wifi hotspot network device name and information, in my case it is wl0.1. use google for more information on these commands.
Code:
$ ip route show
is another way to see the route table, if the default route command does not print the table with the ROM you are using.

[Q] Photon Q capable of 5GHz Wifi

Hi!
Is the Q capable of doing wifi over 5GHz ?
Accoriding to:
http://www.qualcomm.com/snapdragon/smartphones/motorola-photon-q
and
http://en.wikipedia.org/wiki/Snapdragon_(system_on_chip)#Snapdragon_S4
it should be capable of doiung so.
Is there a way to determine the exact cpu type build in? ... did a cat /proc/cpuinfo
-> Hardware is : msm8960dt
So the hardware is capable of 5Ghz Wifi. Maybe there are some antennas missing.
As far as I can tell, it isn't. When I run the INSSIDer application, it does not detect any 5 ghz channels, despite having 5 ghz channels in range.
Sucks! I have to buy a dual band router because the 2.4GHz spectrum is crowded in this apartment. I literally get a better signal from my upstairs neighbors router than i do my own.
Sent from my XT897 using Tapatalk 2
jae18708 said:
Sucks! I have to buy a dual band router because the 2.4GHz spectrum is crowded in this apartment. I literally get a better signal from my upstairs neighbors router than i do my own.
Sent from my XT897 using Tapatalk 2
Click to expand...
Click to collapse
Try changing the channel on your router.
As a matter of fact, you can use that same inssider application I mentioned to find what channels nearby wifi networks are running, and change the channel yours is operating on to avoid the interference.
Have you tried poking around in the build.prop to see if 5 GHz can be enabled? You may have to find one from an Android device that does have 5 GHz to get the proper line.
Found this @ /system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
Something about gEnableApProt states about n.
Hopefully someone is wiser and braver than me to know more about this file and changes which may enable 5ghz.
Code:
# This file allows user to override the factory
# defaults for the WLAN Driver
# Enable IMPS or not
gEnableImps=1
# Enable/Disable Idle Scan
gEnableIdleScan=0
# Increase sleep duration (seconds) during IMPS
# 0 implies no periodic wake up from IMPS. Periodic wakeup is
# unnecessary if Idle Scan is disabled.
gImpsModSleepTime=0
# Enable BMPS or not
gEnableBmps=1
gBmpsMinListenInterval=1
gBmpsModListenInterval=2
gBmpsMaxListenInterval=3
gPowerUsage=Max
#Telescopic Beacon skipping
gTelescopicBeaconWakeupEn=1
telescopicBeaconTransListenInterval=3
telescopicBeaconTransListenIntervalNumIdleBcns=1
telescopicBeaconMaxListenInterval=3
telescopicBeaconMaxListenIntervalNumIdleBcns=1
# Performance parameters
gEnableCloseLoop=1
gDataInactivityTimeout=120
gChannelBondingMode5GHz=1
# Enable suspend or not
# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter
gEnableSuspend=3
# Phy Mode (auto, b, g, n, etc)
gDot11Mode=0
# Handoff Enable(1) Disable(0)
gEnableHandoff=0
# CSR Roaming Enable(1) Disable(0)
gRoamingTime=0
# Assigned MAC Addresses - This will be used until NV items are in place
# Each byte of MAC address is represented in Hex format as XX
Intf0MacAddress=000AF58989FF
Intf1MacAddress=000AF58989FE
Intf2MacAddress=000AF58989FD
Intf3MacAddress=000AF58989FC
# UAPSD service interval for VO,VI, BE, BK traffic
UapsdMask=0
InfraUapsdVoSrvIntv=0
InfraUapsdViSrvIntv=0
InfraUapsdBeSrvIntv=0
InfraUapsdBkSrvIntv=0
# Disable RSSI FW filtering
gEnableFWRssiMonitoring=0
# Make 1x1 the default antenna configuration
gNumRxAnt=1
# Beacon filtering frequency (unit in beacon intervals)
gNthBeaconFilter=50
# Enable WAPI or not
# WAPIIsEnabled=0
# Flags to filter Mcast abd Bcast RX packets.
# Value 0: No filtering, 1: Filter all Multicast.
# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
McastBcastFilter=0
#Flag to enable HostARPOffload feature or not
hostArpOffload=1
#SoftAP Related Parameters
# AP MAc addr
gAPMacAddr=000AF58989EF
# 802.11n Protection flag
gEnableApProt=1
#Enable OBSS protection
gEnableApOBSSProt=0
#Enable/Disable UAPSD for SoftAP
gEnableApUapsd=1
# Fixed Rate
gFixedRate=0
# Maximum Tx power
# gTxPowerCap=30
# Fragmentation Threshold
# gFragmentationThreshold=2346
# RTS threshold
RTSThreshold=2347
# Intra-BSS forward
gDisableIntraBssFwd=0
# WMM Enable/Disable
WmmIsEnabled=0
# 802.11d support
g11dSupportEnabled=1
# SAP Country code
# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.
# Example
# US Indoor, USI
# Korea Outdoor, KRO
# Japan without optional byte, JP
# France without optional byte, FR
#gAPCntryCode=USI
#Short Guard Interval Enable/disable
gShortGI20Mhz=1
gShortGI40Mhz=1
#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
gAPAutoShutOff=0
# SAP auto channel selection configuration
# 0 = disable auto channel selection
# 1 = enable auto channel selection, channel provided by supplicant will be ignored
gApAutoChannelSelection=0
# Listen Energy Detect Mode Configuration
# Valid values 0-128
# 128 means disable Energy Detect feature
# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.
# 10-128 are reserved.
# The EDET threshold mapping is as follows in 3dB step:
# 0 = -60 dBm
# 1 = -63 dBm
# 2 = -66 dBm
# ...
# 7 = -81 dBm
# 8 = -84 dBm
# 9 = -87 dBm
# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:
#
# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm.
#
gEnablePhyAgcListenMode=128
#Preferred channel to start BT AMP AP mode (0 means, any channel)
BtAmpPreferredChannel=0
#Preferred band (both or 2.4 only or 5 only)
BandCapability=1
#Beacon Early Termination (1 = enable the BET feature, 0 = disable)
enableBeaconEarlyTermination=1
beaconEarlyTerminationWakeInterval=3
#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)
gEnableBtAmp=0
#SOFTAP Channel Range selection
gAPChannelSelectStartChannel=1
gAPChannelSelectEndChannel=11
#SOFTAP Channel Range selection Operating band
# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND
gAPChannelSelectOperatingBand=0
#Enable Keep alive with non-zero period value
gStaKeepAlivePeriod=55
#If set will start with active scan after driver load, otherwise will start with
#passive scan to find out the domain
gEnableBypass11d=1
#If set to 0, will not scan DFS channels
gEnableDFSChnlScan=1
# Enable logp/SSR
gEnableLogp=1
# Enable Automatic Tx Power control
gEnableAutomaticTxPowerControl=1
# Priority Setting:COUNTRY IOCTL > 11d > NV default
gCountryCodePriority=1
END
# Note: Configuration parser would not read anything past the END marker
Sent from my awesome XT897
Found this :
http://www.modaco.com/topic/361678-5ghz-wifi/
Try it when i am home and in range of a 5ghz rooter.
Sent from my awesome XT897
A quick look through iwlist looks good so far
Code:
sh-4.2$ iwlist wlan0 frequency
wlan0 32 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 36 : 5.18 GHz
Channel 40 : 5.2 GHz
Channel 44 : 5.22 GHz
Channel 48 : 5.24 GHz
Channel 52 : 5.26 GHz
Channel 56 : 5.28 GHz
Channel 60 : 5.3 GHz
Channel 64 : 5.32 GHz
Channel 100 : 5.5 GHz
Channel 104 : 5.52 GHz
Channel 108 : 5.54 GHz
Channel 112 : 5.56 GHz
Channel 116 : 5.58 GHz
Channel 120 : 5.6 GHz
Channel 124 : 5.62 GHz
Channel 128 : 5.64 GHz
Channel 132 : 5.66 GHz
Channel 136 : 5.68 GHz
Channel 140 : 5.7 GHz
Current Channel:6
Sent from my awesome XT897
So back home but unable to see 5ghz wifi ;( don't know if i miss something to edit, or if the gui is "forcing" 2.4 ghz.
Maybe a more experienced user can hop in.
Finally answering and closing this thread.
I am now on scrillax gsm cm10.1 nightlies and able to connect to 5ghz networks.
Somehow the signalstrength is not properly shown, so it may use a stronger 2.4 Ghz channel if applicable. Forcing 5Ghz works just fine.
Gesendet von meinem XT897 mit Tapatalk 2
I wonder what is different in skrillax's ROM that enables 5GHz, and if it's something that can be applied to stock JB.
BAMF said:
I wonder what is different in skrillax's ROM that enables 5GHz, and if it's something that can be applied to stock JB.
Click to expand...
Click to collapse
Is this thread really dead?
I can't imagine that nobody is interested in getting 5GHz WiFi working...
probably it's just some regulatory settings, as there seem to be ROMS that are capable of 5GHz wifi.
Just tried CM11 nightly and CarbonROM, no luck with both.
Can't somebody experienced have a look at the configuration?
Killler07 said:
Is this thread really dead?
I can't imagine that nobody is interested in getting 5GHz WiFi working...
probably it's just some regulatory settings, as there seem to be ROMS that are capable of 5GHz wifi.
Just tried CM11 nightly and CarbonROM, no luck with both.
Can't somebody experienced have a look at the configuration?
Click to expand...
Click to collapse
See this thread:
http://forum.xda-developers.com/showthread.php?t=2671559

Categories

Resources