Page 1 of 3 123 LastLast
Results 1 to 15 of 43
  1. #1
    offline Itty Bitty Modder
    Join Date
    Apr 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0

    Connect G1 to Ad-hoc network SOLVED

    This guide will help you to connect your G1 to laptop's Ad-hoc wireless network.

    Requirements:
    1. Rooted G1 phone.
    2. Terminal emulator. (You can download it here or from Android market)
    3. Busybox for android. (download)

    Steps:
    1. Install Terminal emulator
    I assume that most of you guys already have this since it is essential for root access.
    For those who don't have this installed you will have to make sure that you have root access first.
    The easyest way to install this application is to download it from Android market, but if you don't have access to internet from your phone, you could install it over ADB or some other way.

    2. Install busybox for android

    Open Terminal emulator and type following commands:
    Become super user:
    Code:
    su
    Make new directory for busybox and navigate to it:
    Code:
    mkdir /data/busybox
    cd /data/busybox
    Now you should copy your downloaded busybox file to this new directory. You could do this simply by connecting your phone to the computer over usb cable and copy file to the sdcard or you could push it using ADB service directly to our directory. If you wish to do this over ADB you should do the following.

    a) ADB is part of Android SDK and you can freely download it for Windows, Linux or even Mac, just google it. Your downloaded busybox file must be in the same folder with adb or you can specify the different path in adb command if you have it somewhere else. To push the file to the phone using ADB you could type the following command on your computer (offcourse you must first navigate to the folder in which is your Android SDK and then to the subfolder tools):
    Code:
    adb push busybox /data/busybox/busybox
    b) The other way is to copy the file to your sdcard and then move it to our folder with cat command, since we don't have cp command to copy the file. To do this you must type the following commands on your phone assuming we didn't leave Terminal emulator and we are still in /data/busybox/ directory.
    Code:
    cat /sdcard/busybox > ./busybox
    Now that you have it in your folder you should do the following:
    Make busybox binary executable
    Code:
    chmod 755 ./busybox
    Execute following command to install busybox:
    Code:
    ./busybox --install
    Make all the installed tools in folder executable like you did with the first one:
    Code:
    chmod 755 *
    Last step is to export it to PATH to make it usable at all time.
    Code:
    export PATH=/data/busybox:$PATH
    3. Now you can modify two important files to make your phone able to connect to Ad-hoc
    First gain root access with su command like before:
    Code:
    su
    Remount /system partition as read-write with the following command:
    Code:
    mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
    Navigate to /system/etc/wifi/
    Code:
    cd /system/etc/wifi
    Now you must edit tiwlan.ini file in current directory. I did this with VI editor which is part of busybox. You must know some basic things about VI editor befor you do this. VI operates in two modes. When you open editor you are in command mode and you can't edit your file yet.
    To edit file type:
    Code:
    vi tiwlan.ini
    First you must navigate trough file with your trackball. Find the following line:
    Code:
    WiFiAdhoc = 0
    This is the line we need to edit. To enter edit mode press A on your phone's keyboard. Now move the cursor with trackball to the end off this line. Replace 0 with 1. You must add two more lines in order this to work. To add new line press enter key and then type:
    Code:
    dot11DesiredSSID = HTCG1
    dot11DesiredBSSType = 0
    Replace HTCG1 with whatever you like. This is SSID of your wireless Ad-hoc network.
    Now you must exit back again to command mode. This is done with escape key, and since our keyboard doesn't have escape key we must click down trackball and simultaniously press 1. This is the same as you pressed escape on regular computer keyboard. In command mode again we can't edit the file but we can type commands. Command for saving file is 'w' and for exiting editor is 'q'. Every command is typed after ':' so our command to save file and exit editor will be:
    Code:
    :wq
    The next file we need to edit is /data/misc/wifi/wpa_supplicant.conf
    Edit it the same way as previous file and add these lines:
    Code:
    network={
    ssid="HTCG1" scan_ssid=1 key_mgmt=NONE mode=1
    **
    If you have problem connecting try to add "ap_scan=2" without quotes in the beginning of the file, and try to disable-enable wifi.
    Save and exit
    'mode = 1' indicate that this is Ad-hoc network


    4. Make Ad-hoc network on your laptop or computer.
    I assume you know how to do that and I won't explain it because you can google it. Only thing to know when you do this is that you have to set SSID for the network same as the SSID in two files you edited and that you must make open network without wep or other security. SSID is CASE-sensitive. Yet if you decide to have protected network you must also edit wpa_supplicant.conf file and modify it. Again google it if you want to know more.

    5. Finally connect
    If you configured correctly your computer wireless network and selected it to connect, you should then disable and enable wireless in your mobile phone settings. If SSID is broadcasted you should see your network and signal strenght in network list. Connect.

  2. #2
    offline Itty Bitty Modder
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    I can't seem to get this to work.

    I have followed all of the steps and I can see the wi-fi network in my g1 list and it shows full signal strength.

    When I try to connect to it it attempts to acquire network address and the ad hoc network on the computer does the same thing, then the G1 says unsuccessful and is not connected.

    Any help would be awesome as I have been trying to do this for some time now and I thought I had finally found a solution.

    Using JF 1.5 adp

  3. #3
    offline Itty Bitty Modder
    Join Date
    Apr 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    This is because there's no DHCP on ad-hoc and you need to configure your IP adresses manually, both on computer and phone.
    This is the configuration that I use:

    Computer:
    Code:
    IP adress: 192.168.0.1
    Subnet mask: 255.255.255.0
    Default gateway: 192.168.0.1
    Prefered DNS: 192.168.0.1
    Phone:
    Code:
    IP adress: 192.168.0.2
    Gateway: 192.168.0.1
    Netmask: 255.255.255.0
    DNS 1: 192.168.0.1
    To change IP settings on phone go to Wi-Fi settings and then press menu key and select advanced. There you must select to use static IP and configure it like me.

    Hope it helped

  4. #4
    offline Itty Bitty Modder
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    i can connect to it and all but it just wont let me surf ?
    Made this account just to talk to you . .. feel loved!
    You should post this on xda... cyanogen has included an adhoc thing in 3.9.1 ive just no idea how it works.. but yeah .. check it out!
    and help...most importantly help!

  5. #5
    offline Itty Bitty Modder
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    ive edited all the files, but do i really need busybox? I thought it was already built into JF Roms. I have rooted JF 1.51. I can't get any signal with adhoc networks.

  6. #6
    offline Itty Bitty Modder
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    Thanks for this!

    After jailbreaking and upgrading my phone, I went through the whole process you describe successfully, but when I go to my wireless settings and try to turn on wifi, it says "unable to scan for networks." Since I didn't enable after jailbreaking, I wasn't sure if that was the problem or if I had done something incorrect when following your instructions. I re-edited the two files to return them to their previous state, but I still get the scanning problem. Any idea what this could be? Any ideas on how to enable succesful scanning?

    Thanks a ton!

  7. #7
    offline Itty Bitty Modder
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    Like danmalone72, I made this account just to talk to you . .. feel loved too!

    I really would like to try this on an HTC Hero, but i feel a little bit worried if no one tried before!

    Hope there will be an easier way to connect had hoc soon!

    I really don t want to buy wifi router just for my htc hero as nokia, iphone, laptot and macbook can connect!

    Thank for your help and i bump this topic because it is essential for me.

  8. #8
    offline Itty Bitty Modder
    Join Date
    Apr 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    I connected my G1 with JF1.51 ROM to adhoc without any problems and there shouldn't be any damage if you try it yourself on Hero. If you are scared of possible issues you can do full backup with nandroid and then go throug all steps except first two if you already have Terminal emulator and busybox and your phone is already rooted.
    Then if something wrong happen you can always return back to way it was before with restoring nandroid backup.
    Hope it helped.
    Reply if you had success.

  9. #9
    offline Itty Bitty Modder
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by chax View Post
    I connected my G1 with JF1.51 ROM to adhoc without any problems and there shouldn't be any damage if you try it yourself on Hero. If you are scared of possible issues you can do full backup with nandroid and then go throug all steps except first two if you already have Terminal emulator and busybox and your phone is already rooted.
    Then if something wrong happen you can always return back to way it was before with restoring nandroid backup.
    Hope it helped.
    Reply if you had success.
    Ok, i'll try.

    Root mode is ok, but terminal doesn't work as i have no real keyboard.. lol

    Impossible to enter a command!

  10. #10
    offline Itty Bitty Modder
    Join Date
    Apr 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    There is application called "Better Terminal Emulator" in Market and it has feature to input via touchscreen. Just touch the screen and virtual keyboard should appear.
    If your phone is rooted it should be possible for this to work.

  11. #11
    offline Itty Bitty Modder
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    you talk about the 1,99$ better terminal?

    the free one is effectively with a keyboard, but the "enter" key doesn t work.

    i write "su" than try to type the enter key and nothing happen. i can always write command line but never validate it.

    Thank for your help..

  12. #12
    offline Itty Bitty Modder
    Join Date
    Apr 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    I just remembered another way of editing your files. You can do it over ADB. ADB is part of Android SDK and you can always download latest SDK to do it.
    First you have to connect your Android phone to computer and then install all necessary drivers for this to work. Then when your computer recognizes device you can open command line on computer, navigate to folder where SDK and ADB. For example "cd Desktop\android-sdk-windows-1.5_r2\tools\". You can verify if adb is really there with dir command or ls command if you are on linux. Next step is to type following command: "adb shell". If everything went fine you should be in your phone typing commands from computer. If you succeeded this then all you have to do is type commands as if you type them on the phone.

  13. #13
    offline Itty Bitty Modder
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    Mhhh, i really would like to edit "/data/misc/wifi/wpa_supplicant.conf" with my actual wep40 password, but seem difficult..

    I will wait for more informations...

  14. #14
    offline Itty Bitty Modder
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    Hi,

    I am trying to configure connection for WEP security.
    I found some man pages and wrote something like this:
    Code:
    network={
    	ssid="SSID"
    	key_mgmt=NONE
    	wep_key0="ASCII-KEY"
    	wep_key1=""
    	wep_key2=""
    	wep_tx_keyidx=0
    	priority=5
    **
    I didn't make any changes in /system/etc/wifi/tiwlan.ini (I left version modified according to chax).

    But it doesn't work.

    I would appreciate if somebody more experienced can help me (and other guys trying to config G1 this way )

  15. #15
    offline Itty Bitty Modder
    Join Date
    Apr 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Downloads
    0
    Uploads
    0
    If you want to configure wpa_supplicant.conf you can google it because wpa_supplicant isn't related to android only, it's Linux daemon application used in every Linux distro to connect to WEP and WPA secured wireless as well as wired networks.
    About the SSID thing, you must have the same SSID in wpa_supplicant.conf configuration as in tiwlan.ini in order this to work.
    Just google for wpa_supplicant configuration file examples or something similar.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •