<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HydTech &#187; wpa_supplicant</title>
	<atom:link href="http://hydtechblog.com/tag/wpa_supplicant/feed/" rel="self" type="application/rss+xml" />
	<link>http://hydtechblog.com</link>
	<description>anotha hyd anotha day</description>
	<lastBuildDate>Sun, 24 Jul 2011 22:38:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to connect to Ad Hoc networks using Tmobile G1 Android</title>
		<link>http://hydtechblog.com/2009/09/14/how-to-connect-to-ad-hoc-networks-using-tmobile-g1-android/</link>
		<comments>http://hydtechblog.com/2009/09/14/how-to-connect-to-ad-hoc-networks-using-tmobile-g1-android/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 18:38:07 +0000</pubDate>
		<dc:creator>HydTech</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux (Ubuntu)]]></category>
		<category><![CDATA[ad hoc]]></category>
		<category><![CDATA[g1]]></category>
		<category><![CDATA[hero]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tiwlan]]></category>
		<category><![CDATA[tiwlan.ini]]></category>
		<category><![CDATA[tmobile]]></category>
		<category><![CDATA[wep]]></category>
		<category><![CDATA[wpa_supplicant]]></category>
		<category><![CDATA[wpa_supplicant.conf]]></category>

		<guid isPermaLink="false">http://hydtechblog.com/?p=464</guid>
		<description><![CDATA[Intro The G1 does not connect to ad hoc networks through the wifi manager but we can hack it to allow scanning and connecting to ad hocs. I&#8217;ve been trying to figure this out for the longest time. Before you begin, you need to root your G1 and be comfortable using the command line. We [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Intro</em></strong></p>
<p>The G1 does not connect to ad hoc networks through the wifi manager but we can hack it to allow scanning and connecting to ad hocs.  I&#8217;ve been trying to figure this out for the longest time.  Before you begin, you need to root your G1 and be comfortable using the command line.  We will be editing tiwlan.ini and wpa_supplicant.conf.  I will be showing you 2 ways to edit the files.  Using vi and adb.</p>
<p><strong><br />
<em>Settings</em></strong></p>
<p>edit tiwlan.ini to read:</p>
<p>WiFiAdHoc = <a href="http://hydtechblog.com">1</a><br />
dot11DesiredSSID = HydtechAdhoc (or whatever name u want)<br />
dot11DesiredBSSType = 0</p>
<p>edit wpa_supplicant.conf to read:</p>
<p>ctrl_interface=tiwlan0<br />
update_config=1<br />
eapol_version=1<br />
ap_scan=2  (tells wpa_supplicant to scan hidden networks)</p>
<p>network={<br />
    ssid=&#8221;HydtechAdhoc&#8221;<br />
    scan_ssid=1    (for APs with multiple SSIDS)<br />
    mode=1<br />
    key_mgmt=NONE<br />
    group=WEP104<br />
    auth_alg=SHARED<br />
    wep_key0=&#8221;MyWepKey&#8221;  (replace MyWepKey with your key)<br />
}</p>
<p><strong><em>How to edit using vi:</em></strong></p>
<p>Download terminal from the market and type:</p>
<p>su (for superuser mode)<br />
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system (mount partition as writable)<br />
vi /system/etc/wifi/tiwlan.ini (open tiwlan.ini in vi text editor)</p>
<p>now type A to enter editing mode, finish editing your file and hold trackball+1 to stop editing.  To save and exit type :wq</p>
<p>vi /data/misc/wifi/wpa_supplicant.conf (open file for editing)</p>
<p>edit with the settings given above and exit and don&#8217;t forget to change the partition back to read only<br />
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system</p>
<p>reboot</p>
<p><strong><em>How to edit files with adb on Ubuntu:</em></strong></p>
<p>Connect your g1 to the computer using a usb cable and make sure USB debugging in enabled<br />
Open up terminal and type<br />
cd /home/hydtech/[android sdk folder]/tools (navigate to the directory which has you adb tool)</p>
<p>get the files from the device and place them in the root folder<br />
sudo ./adb pull /system/etc/wifi/tiwlan.ini /<br />
sudo ./adb pull /data/misc/wifi/wpa_supplicant.conf /</p>
<p>edit and save the files with the settings provided above using gedit or kate or what have you</p>
<p>make the partition read writable<br />
adb shell<br />
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system<br />
exit</p>
<p>place the files back onto the device<br />
sudo ./adb push /tiwlan.ini /system/etc/wifi/tiwlan.ini<br />
sudo ./adb push /wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf</p>
<p>make partition read only again<br />
adb shell<br />
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system<br />
exit</p>
<p>reboot device<a href="http://hydtechblog.com">.</a></p>
<p><em><strong>Troubleshooting</strong></em></p>
<p>shows connected but no internet<br />
1. I was having a problem where the connection would keep disconnecting and when it would connect, it wouldn&#8217;t load pages.  To fix this I had to disable my WEP key.</p>
<p>SSID not showing<br />
2. If the SSID isn&#8217;t showing up in the list, make sure you have ap_scan=2 in your wpa_supplicant</p>
<p>Unsuccessful connection<br />
3. Try enabling static IP if DHCP isn&#8217;t working for you.  It&#8217;s under advanced menu.</p>
<img src="http://hydtechblog.com/?ak_action=api_record_view&id=464&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://hydtechblog.com/2009/09/14/how-to-connect-to-ad-hoc-networks-using-tmobile-g1-android/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>

