FORUMS
Remove All Ads from XDA

Tethering via WiFi - Troubleshooting

10 posts
Thanks Meter: 1
 
By divinehawk, Junior Member on 10th November 2008, 03:18 AM
Post Reply Email Thread
11th November 2008, 07:43 AM |#21  
JesusFreke's Avatar
Inactive Recognized Developer
Flag Dallas
Thanks Meter: 52
 
More
Awesome! Thanks for the link
 
 
11th November 2008, 09:13 AM |#22  
Member
Thanks Meter: 41
 
More
dhcpd compiled statically using bionic attached (gave many errors during compile but works in initial tests)

dhcpd.conf also in attached zip (you will have to edit it for your settings)

dhcpd is looking for dhcpd.conf in /etc/dhcpd.conf (annoying, but you could probably just stick it in /system/etc/dhcpd.conf and symlink until the next reboot).

it is also looking for /var/state/dhcp/dhcpd.leases which can just be a zero length file to start (yes, you will have to symlink to that dir too... sorry).

Many thanks to fnord for compiling this. If it seems to work, I'll ask him to do a build pointing to a more sensible location for the dhcpd.conf and dhcpd.leases files and maybe we can even fix up the init.d script for starting and stopping the daemon.

I haven't had time to actually test a full conf to see if it's properly handing out addresses... far too early in the morning and I'm going to go get some sleep.
Attached Files
File Type: zip dhcp3.zip - [Click for QR Code] (485.4 KB, 82 views)
11th November 2008, 09:15 AM |#23  
Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by alansj

dhcpd compiled statically using bionic attached (gave many errors during compile but works in initial tests)

dhcpd.conf also in attached zip (you will have to edit it for your settings)

dhcpd is looking for dhcpd.conf in /etc/dhcpd.conf (annoying, but you could probably just stick it in /system/etc/dhcpd.conf and symlink until the next reboot).

it is also looking for /var/state/dhcp/dhcpd.leases which can just be a zero length file to start (yes, you will have to symlink to that dir too... sorry).

Many thanks to fnord for compiling this. If it seems to work, I'll ask him to do a build pointing to a more sensible location for the dhcpd.conf and dhcpd.leases files and maybe we can even fix up the init.d script for starting and stopping the daemon.

I haven't had time to actually test a full conf to see if it's properly handing out addresses... far too early in the morning and I'm going to go get some sleep.

P.S. To symlink from the root partition you will of course have to do: mount -oremount,rw rootfs /
11th November 2008, 09:15 AM |#24  
JesusFreke's Avatar
Inactive Recognized Developer
Flag Dallas
Thanks Meter: 52
 
More
Quote:
Originally Posted by alansj

dhcpd is looking for dhcpd.conf in /etc/dhcpd.conf (annoying, but you could probably just stick it in /system/etc/dhcpd.conf and symlink until the next reboot).

/etc already is a symlink for /system/etc
11th November 2008, 09:20 AM |#25  
Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by JesusFreke

/etc already is a symlink for /system/etc

Right you are. That's what I get for too little sleep... well at least you have to symlink /var to get it to work.
11th November 2008, 10:47 AM |#26  
Junior Member
Thanks Meter: 0
 
More
I built a copy of dnsmasq, which has a dhcp server built in, and should be a bit more light-weight than dhcpd. I modified the paths so that no changes outside /data/local are needed.

I put together a zip with a fully working configuration and all the binaries required to enable adhoc with NAT/dhcp/dns, and a shell script to run everything.

To use, just put adhoc.sh, dnsmasq, and iptables in /data/local/bin, chmod 755, and put tiwlan.ini and dnsmasq.conf in /data/local. Disable wifi in the gui, and run /data/local/bin/adhoc.sh to start.

Download: here.

Now we just need to figure out how to get a secure connection going.
11th November 2008, 01:30 PM |#27  
dagentooboy's Avatar
Senior Member
Flag Kansas
Thanks Meter: 156
 
More
wow.... I guess the next question is can we call shell scripts from the GUI (for all the non hacker types out there)?
11th November 2008, 02:25 PM |#28  
Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by rale00

I put together a zip with a fully working configuration and all the binaries required to enable adhoc with NAT/dhcp/dns, and a shell script to run everything.

Very nice. Should there also be a shell script to revert iptables and restart the standard wifi interface?
11th November 2008, 02:28 PM |#29  
humble's Avatar
Senior Member
Thanks Meter: 5
 
More
Thumbs up
That a good idea!
11th November 2008, 03:53 PM |#30  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by rale00

I built a copy of dnsmasq, which has a dhcp server built in, and should be a bit more light-weight than dhcpd. I modified the paths so that no changes outside /data/local are needed.

Now we just need to figure out how to get a secure connection going.

The busybox included in Jesusfreke's images has "udhcpd" included. "ln -s busybox udhcpd" will get you a working udhcpd that just needs a conf file.

That doesn't get you a dns proxy though... Does the DNS portion of dnsmasq work?
11th November 2008, 04:07 PM |#31  
Senior Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by rale00

I built a copy of dnsmasq, which has a dhcp server built in, and should be a bit more light-weight than dhcpd. I modified the paths so that no changes outside /data/local are needed.

I put together a zip with a fully working configuration and all the binaries required to enable adhoc with NAT/dhcp/dns, and a shell script to run everything.

To use, just put adhoc.sh, dnsmasq, and iptables in /data/local/bin, chmod 755, and put tiwlan.ini and dnsmasq.conf in /data/local. Disable wifi in the gui, and run /data/local/bin/adhoc.sh to start.

Download: here.

Now we just need to figure out how to get a secure connection going.

Thanks!

Once I copied ALL the files everything worked perfectly..
Post Reply Subscribe to Thread

Tags
ad-hoc, tether

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes