Quote:
Originally Posted by fish199902
I used Ad-Hoc on my pre, and it WORKED!
Heres what I did to make it work:
[code]
# Setting up ad-hoc network
iwconfig eth0 mode Ad-Hoc
iwconfig eth0 ap any
iwconfig eth0 key off
iwconfig eth0 essid PreNet
iwconfig eth0 channel 6
ifconfig eth0 192.168.1.1 up
# Route traffic from wifi to evdo
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# Stop routing through my local gateway, leaving only the Ev-Do route
route del default gw 192.168.2.1
while true; do
# This value resets iteself to 0 periodically, anyone know why?
echo 1 > /proc/sys/net/ipv4/ip_forward
sleep 10
done
# There should be code to restore the old network here
[/code]
And the settings on the remote computer:
IP: 192.168.1.5
Gateway: 192.168.1.1
DNS: 4.2.2.1
Update: I can confirm I was going though the sprint network, and not another connection. I checked an ISP lookup website and it said Sprint
|
Cool, I had similar success when I tried it by hand too using CLI.
The only things I ran into was the Pre would auto reset the Wifi settings with the WiFi daemon occasionally.
As well, it's not very useful when your on the go to have a permanent AdHoc setup... so I find this solution sorta useless to the masses as I don't think everyone will want their pre's to only connect to one network permanently.
The "loss" your experiencing is the Wifi Daemon process resetting the connection
I'm trying to fix the main Wifi app to show AdHoc networks on the scan... so all anyone would need is to configure the Masquerade permanently for ppp0 and connect to the AdHoc network. As well you'd need to manually configure your DNS servers, but that's pretty simple.