How to put wireless into adhoc mode?

Discussion in 'Networking' started by Guest, Jul 16, 2008.

  1. Guest

    Hyperjoe

    Joined:
    Aug 14, 2008
    Messages:
    28
    Likes Received:
    0
    ok, now can someone explain how to link iPhone with Netshare to adhoc One?
     
    Hyperjoe, Aug 25, 2008
    #41
  2. Guest

    openschnitzel

    Joined:
    Aug 6, 2008
    Messages:
    14
    Likes Received:
    0
    Hmm, it still doesn't work for me.

    Here is my adhoc.sh script:

    Code:
    /etc/rc.d/init.d/NetworkManager stop
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    iwconfig ath0 channel 6
    iwconfig ath0 essid JoikuSpot_N95
    ifconfig ath0 up
    dhclient ath0
    The settings in the Joiku software correspond to those above. I turned off encryption and GPS as suggested.

    When I start Joiku on the N95 mobile, it claims to connect successfully to the web. First, the Joiku screen shows only the MAC address of the mobile phone. Then, after running the
    Code:
    ifconfig ath0 up
    line of the script,
    I can also see the laptop's MAC address on the phone display. The only thing which doesn't seem to work is the dhclient. I get the same error messages as my predecessors in this thread:

    wifi0: unknown hardware address type 801

    I'm stuck with this for a couple of days now, any help highly appreciated.
     
    openschnitzel, Aug 25, 2008
    #42
  3. Guest

    R200

    Joined:
    Aug 6, 2008
    Messages:
    5
    Likes Received:
    0
    Location:
    Finland
    That error message appears to me too but dhcp and everything works perfectly and I can connect with the exact procedure I mentioned earlier.
     
    R200, Aug 26, 2008
    #43
  4. Guest

    aspireonehk

    Joined:
    Aug 4, 2008
    Messages:
    9
    Likes Received:
    0
    how to put aa1 in ad hoc mode so other wifi device can connect to it?

    What i mean by that is i want to connect my iphone to it and in MAC OR WIN you can just create an ad hoc connection and you mechine will be broadcasting that and any wifi device can connect....

    But in aa1 (linux) the networkmanager doesnt have that option at all . is there an better manager to do this task or any other way to do this ?

    Many thanks for any advice
     
    aspireonehk, Aug 29, 2008
    #44
  5. Guest

    Stefan

    Joined:
    Aug 22, 2008
    Messages:
    11
    Likes Received:
    0
    I have tried all the above steps and managed to connect with wmwifirouter once when it was broadcasting on channel 6.
    Since then I tried to connect (it is now broadcasting on channel 11) and although I changed the script to channel 11, it won't let me browse the internet.
    Funny enough, I can ping the wmwifirouter.
    I can also ping web.de for example and get an IP address for it, so there must be some connection to resolve the name to an IP, but then it times out. 100% packet loss.
    Same in my browser. Connection times out.

    Any ideas?

    I live off grid far away from any broadband and use my MDA Touch for web browsing via GPRS, which is a pain on the 320x240 screen and no keyboard..... I was hoping o use the AA1 for web browsing via the wmwifirouter. Worked well for one day but not since then. I have since upgraded to the web'n'walk plan, so it's not costing me a pound a day but 7.50 a month. Could it be that T-Mobile restricts something???

    Stefan
     
    Stefan, Aug 29, 2008
    #45
  6. Guest

    Stefan

    Joined:
    Aug 22, 2008
    Messages:
    11
    Likes Received:
    0
    I have since used channel 6 again and there is no difference. Also, a friend came round with his xp laptop and managed to connect and browse the internet with my wmwifirouter, so the problem lies with the aa1.
    Any ideas anybody?
    Please.

    Stefan
     
    Stefan, Aug 31, 2008
    #46
  7. Guest

    chris3lx

    Joined:
    Oct 2, 2008
    Messages:
    3
    Likes Received:
    0
    I am yet to try the script. I have one concern. Once the script has been run and you are in ad-hoc mode, how do you revert back to AP mode? Does a reboot do it?
     
    chris3lx, Oct 5, 2008
    #47
  8. Guest

    elsapo

    Joined:
    Jul 31, 2008
    Messages:
    21
    Likes Received:
    0
    Yes, it does.

    Cheers.
     
    elsapo, Oct 5, 2008
    #48
  9. Guest

    cheops

    Joined:
    Oct 10, 2008
    Messages:
    12
    Likes Received:
    0
    see http://www.aspireoneuser.com/forum/viewtopic.php?f=34&t=5092

    It does not require the netshare.app - but you could take the method and use it to provide the settings that netshare.app requires.
     
    cheops, Oct 11, 2008
    #49
  10. Guest

    John-H

    Joined:
    Nov 17, 2008
    Messages:
    7
    Likes Received:
    0
    Hi all,
    sorry to bring this thread back but I'm completely stuck. I've installed WMWifirouter on to my HTC620 smartphone, and I know it's working because I can see and connect to it using an iphone.

    On the Aspire One I've followed the instructions given by Carbrinus after typing su and then entering my pasword. In terminal all seems right, no errors, NetworkManager stops and restarts. I then switch off the wifi on the aspire as instructed, switch back on and all that happens is it reconnects to my home network.

    When I go into NetworkManager / new / wlan / access point - select, it shows my home router + several neighboring wireless points but not the WMWifiRouter. WMWifiRouter is running on the smartphone and is seen by the iphone.

    Can anyone point out what I'm doing wrong???

    I consider myself an advanced Windoze user but am a complete novice with Linux. I've only had the Aspire One for less than a week and love it, but really really want to be able to connect through the phone when out and about.

    Many thank

    John
     
    John-H, Nov 22, 2008
    #50
  11. Guest

    ihamadani

    Joined:
    Dec 8, 2008
    Messages:
    1
    Likes Received:
    0
    did u guys ever make AA1 with linpus to connect to an ad-hoc connection when encryption is on ? if yes please give me the procedure...currently I run the script and I am getting the same errors as others previously shown:

    wifi0: unknown hardware address type 801
    /sbin/dhclient-script: configuration for ath0 not found. Continuing with defaults.
    /etc/sysconfig/network-scripts/network-functions: line 78: ath0: No such file or directory
    wifi0: unknown hardware address type 801

    ...etc

    I tried removing the battery, rebooting, running the script or line by line running the commands...it reaches the last command: 'dhclient ath0' and I get the errors...

    Thanks in advance :)
     
    ihamadani, Dec 8, 2008
    #51
  12. Guest

    brunomalone

    Joined:
    Dec 16, 2008
    Messages:
    2
    Likes Received:
    0
    Hello everybody. I'm following the instructions very carefully and I can't get the one connected with the WMWifiRouter in my PPC...
    I paste below what I get from the terminal. Any help, clue or suggestion will be very welcome...
    Thanks for reading and sorry for the bad english.
    B.

    [user@localhost home]$ su
    Password:
    [root@localhost home]#
    [root@localhost home]# /etc/rc.d/init.d/NetworkManager stop
    Stopping NetworkManager daemon: [ OK ]
    [root@localhost home]# ifconfig ath0 down
    [root@localhost home]# wlanconfig ath0 destroy
    [root@localhost home]# wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    ath0
    [root@localhost home]# iwconfig ath0 channel 11
    [root@localhost home]# iwconfig ath0 essid isidro
    [root@localhost home]# ifconfig ath0 up
    [root@localhost home]# dhclient ath0
    Internet Systems Consortium DHCP Client V3.0.6-Fedora
    Copyright 2004-2007 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/
    wifi0: unknown hardware address type 801
    /sbin/dhclient-script: configuration for ath0 not found. Continuing with defaults.
    /etc/sysconfig/network-scripts/network-functions: line 78: ath0: No such file or directory
    wifi0: unknown hardware address type 801
    Listening on LPF/ath0/00:22:69:0b:2f:c1
    Sending on LPF/ath0/00:22:69:0b:2f:c1
    Sending on Socket/fallback
    DHCPREQUEST on ath0 to 255.255.255.255 port 67
    DHCPACK from 192.168.3.1
    /sbin/dhclient-script: configuration for ath0 not found. Continuing with defaults.
    /etc/sysconfig/network-scripts/network-functions: line 78: ath0: No such file or directory
    bound to 192.168.3.224 -- renewal in 41272 seconds.
    [root@localhost home]#
     
    brunomalone, Dec 30, 2008
    #52
  13. Guest

    maxtors

    Joined:
    Jan 5, 2009
    Messages:
    6
    Likes Received:
    0
    here is the script i made for when i need to use ad-hoc

    Code:
    #!/bin/sh
    #[email protected]
    #
    
    # The stop function
    stop() {
        ifconfig ath0 down
        wlanconfig ath0 destroy
        wlanconfig ath0 create wlandev wifi0 wlanmode managed
        ifconfig ath0 up
    }
    
    # The start function
    start() {
        ifconfig ath0 down
        wlanconfig ath0 destroy
        wlanconfig ath0 create wlandev wifi0 wlanmode monitor
        ifconfig ath0 up
    }
    
    
    # Main if statment to see what user wants
    if [ "$1" = "start" ]; then
        start
    elif [ "$1" = "stop" ]; then
        stop
    else
        echo "usage = monitor start / stop"
    fi
    [user@localhost sh]$ cat adhoc
    #!/bin/sh
    #[email protected]
    #
    
    # The stop function
    stop() {
        ifconfig ath0 down
        wlanconfig ath0 destroy
        wlanconfig ath0 create wlandev wifi0 wlanmode managed
        ifconfig ath0 up
    }
    
    # The start function
    start() {
        ifconfig ath0 down
        wlanconfig ath0 destroy
        wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
        ifconfig ath0 up
    }
    
    
    # Main if statment to see what user wants
    if [ "$1" = "start" ]; then
        start
    elif [ "$1" = "stop" ]; then
        stop
    else
        echo "usage = adhoc start / stop"
    fi
    
    save as adhoc (no file type)
    Code:
    chmod 755 adhoc && sudo cp adhoc /usr/bin/
    log inn as su and start or stop adhoc
    Code:
    su
    enter password
    adhoc start
    or
    adhoc stop
     
    maxtors, Jan 5, 2009
    #53
  14. Guest

    brunomalone

    Joined:
    Dec 16, 2008
    Messages:
    2
    Likes Received:
    0
    Thanks a lot maxtors, but i still get an error...
    Any idea?
     
    brunomalone, Jan 6, 2009
    #54
  15. Guest

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    maxtor inadvertently copied his script twice into the code box.

    Everything after line 30 is a repeat of earlier code, together with (at line 31) the command prompt and the command he entered to copy the text over in the first place!

    Just type
    Code:
    mousepad adhoc
    into a terminal, then delete everything from
    Code:
    [user@localhost sh]$ cat adhoc
    onward, (including that line). Save the file and try again!
     
    daldred, Jan 6, 2009
    #55
  16. Guest

    capricorn1

    Joined:
    Dec 30, 2008
    Messages:
    2
    Likes Received:
    0
    Ok, dumb Windows only user question time. :?

    What do I use to create the script? In Windows for example I'd use something like notepad?

    Likewise, when I've created the script - where do I save it?

    The chmod 755 adhoc && sudo cp adhoc /usr/bin/ part - should that be part of the script or is it a command I should be running somewhere? if so, where and how (in a Terminal?)

    Sorry if the questions are dumb, I'm 3rd level support in a Windows Environment but Linux is new to me and I'd like to learn more (hence not just reloading my One with Windows).

    Thanks in advance guys :mrgreen:
     
    capricorn1, Jan 16, 2009
    #56
  17. Guest

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    Mousepad. It's not in the standrad Linpus desktop menus, but you can run it by doing ALT-F2 and typing 'mousepad' in the dialog box.

    You can save it wherever you like, to start with!

    Those lines are not part of the script - they are Terminal commands which affect the script.

    The first one changes its 'mode' (hence 'chmod') to make it executable (Linux won't execute a file unless it's been made executable - that's one of the things which makes it much harder to make a virus work in Linux - not only does the user have to download it, but they also have to explicitly make it executable before it will run. Just clicking on a download link won't run anything!).

    The second one copies the script into the directory /usr/bin. This is where many executable files 'live' - they are "user" rather than main system files (so usr), and originally most of them were binaries (so bin). These three letter directory names are a very historic throwback and no longer at all necessary, but Unix/Linux people are used to them so they survive for certain purposes!

    The reason for putting the script there is that /usr/bin is part of the path Linux automatically uses to find programs, so if it's in /usr/bin you can start the program by just typing 'adhoc'.

    Hope this helps. It might be worth checking your local library to see if they have a book on using Linux - even if it's a bit old it will give you a lot of the basic concepts which don't change.

    Your questions aren't dumb at all - Linux is not the same as Windows, and it's better to ask questions than expect things to work the same way when they won't!
     
    daldred, Jan 17, 2009
    #57
  18. Guest

    capricorn1

    Joined:
    Dec 30, 2008
    Messages:
    2
    Likes Received:
    0
    Excellent reply with great explanations, thanks a lot - it's working a treat now.
     
    capricorn1, Jan 20, 2009
    #58
  19. Guest

    Kerbo

    Joined:
    Jan 23, 2009
    Messages:
    1
    Likes Received:
    0
    Hey!

    I got that script working now but my A110 + Linpus wont find any wireless connections when i start adhoc.

    What what should i do?

    When I start adhoc, A110 closes my connection to my home wlan. And then I start my Joikuspot premium and go to wlan connection manager, but connection manager wont find any connections. I have tried to chance channelnumber to 1,6, 11 and automatic, but it still wont find my Nokia N81 connection.

    Help me please :roll:
     
    Kerbo, Jan 23, 2009
    #59
  20. Guest

    Kidorain

    Joined:
    Jul 24, 2008
    Messages:
    4
    Likes Received:
    0
    Anyone found a solution that works for everyone yet? I;ve tried it a dozen of times now, but the scripts so far dont seem to work with my A1 and Nokia N82. And im not the only one who doesnt seem to get it to work.

    If anyone has a suggestion, it would be highly appreciated.

    Greetz..
     
    Kidorain, Feb 24, 2009
    #60
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.