How to put wireless into adhoc mode?

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

  1. Guest

    fgps

    Joined:
    Feb 24, 2009
    Messages:
    7
    Likes Received:
    0
    As a new AAO owner this is the thing that is annoying me most as well. I've tried using the script posted above and although it obviously does something, because it stops my normal access point connection it still doesn't enable me to see or connect to my JoikuSpot ad-hoc service.

    I know the JoikuSpot works because I can connect to it from my HP laptop (running windows XP).

    The ability to tether to my mobile phone was one of the things that finally sold me on the idea of getting a netbook - but various googling seems this is not easy to get going. I've found many similar questions asked - usually with no reply or or a couple of replys and a tail off with no solution or a suggestion to use a different linux distribution or a link to another (inconclusive) thread. Surely someone somewhere has managed this?
     
    fgps, Feb 26, 2009
    #61
  2. Guest

    fgps

    Joined:
    Feb 24, 2009
    Messages:
    7
    Likes Received:
    0
    Trying to make some progress on this I found this tool

    http://code.google.com/p/aa1-wlancontrol/

    It certainly seems to do something and will take down the standard Network Manager but I have no idea how I then find and connect to an ad-hoc connection. I'm not sure anyone else will have used this as the source page doesn't show very many downloads.
     
    fgps, Feb 28, 2009
    #62
  3. Guest

    fgps

    Joined:
    Feb 24, 2009
    Messages:
    7
    Likes Received:
    0
    I can successfully get connected to and unencrypted JoikuSpot on my Nokia N95 by running the following script as su

    Code:
    #!/bin/sh
    /etc/rc.d/init.d/NetworkManager stop
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    iwconfig ath0 channel 11
    iwconfig ath0 essid JoikuSpot_N95
    ifconfig ath0 up
    dhclient ath0
    
    Then to get back to normal WiFi it's a just a reboot, so I can get online without a WiFi hotspot now. But there's a few extra things I'd like some extra help with.

    1. Is it possible to attach the script above to an icon so I (or less techy family members) can just click on it and run with the required permissions? I suspect there isn't as you need to be root, but I'm new with Linpus.

    2. The script above works for the particular ad-hoc connection on my phone but is it possible to scan to see what ad-hoc connections are available and then pick one and connect? Even if I restart Network Manager it doesn't seem to be able to find ad-hoc access points. I'd guess there isn't an alternative network manager that handles these sort of things otherwise I would have found references to it already.
     
    fgps, Mar 1, 2009
    #63
  4. Guest

    Kidorain

    Joined:
    Jul 24, 2008
    Messages:
    4
    Likes Received:
    0
    Hello there,

    I tried it once again. I'll post a copy of the output i got:

    ----------------------------------------------------------------------
    [user@localhost ~]$ su
    Password:
    [root@localhost user]# #!/bin/sh
    [root@localhost user]# /etc/rc.d/init.d/NetworkManager stop
    Stopping NetworkManager daemon: [ OK ]
    [root@localhost user]# ifconfig ath0 down
    [root@localhost user]# wlanconfig ath0 destroy
    [root@localhost user]# wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    ath0
    [root@localhost user]# iwconfig ath0 channel 11
    [root@localhost user]# iwconfig ath0 essid JoikuSpot_N82
    [root@localhost user]# ifconfig ath0 up
    [root@localhost user]# 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:1f:e2:bc:a0:71
    Sending on LPF/ath0/00:1f:e2:bc:a0:71
    Sending on Socket/fallback
    DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 5
    DHCPOFFER from 192.168.2.1
    DHCPREQUEST on ath0 to 255.255.255.255 port 67
    DHCPACK from 192.168.2.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.2.2 -- renewal in 396 seconds.
    [root@localhost user]#
    [root@localhost user]#
    --------------------------------------------------------------

    So, i still got an error message. but the good (best) part is: when i start firefox, INTERNET IS WORKING OK!

    I hope it keeps working like this, maybe its something for you to try, if you get the same error message..
     
    Kidorain, Mar 1, 2009
    #64
  5. Guest

    fgps

    Joined:
    Feb 24, 2009
    Messages:
    7
    Likes Received:
    0
    Yes I get similar messages, but if I understand it correctlt, the bit at the bottom that says "bound to 192.168.2.2 -- renewal in 396 seconds." means that it's successfully used DHCP to get an IP address. I was expecting a nice "connected" type message so it cofused me at first as well. I have to keep reminding myself that whereas Windows hand holds you all the way Linux assumes you know what you're doing.
     
    fgps, Mar 1, 2009
    #65
  6. Guest

    magnumopus

    Joined:
    Jan 9, 2009
    Messages:
    28
    Likes Received:
    0
    Hi, thanks for all the tips in this thread I can now get my N95 to connect to the AA1 without any problems. However I really need an encrypted connection. Can anyone advise me on how to set one up? I have looked earlier in this thread an online but so far have had no luck.

    Kind regards,

    rod
     
    magnumopus, Oct 4, 2009
    #66
  7. Guest

    Neva

    Joined:
    Nov 3, 2009
    Messages:
    13
    Likes Received:
    0
    I got it working too thanks to this thread.

    Few tricks: when using Joikuspot shareware version, the connection must be closed to enter the settings menu and switching the wifi channel to 11. Whatever you set it to, you need to know the channel when configuring linpus to work with it.

    Using the start / stop script did not work for me, and the comp needed to be shut down and restarted for the wlan circuit to wake up again.

    There were some warnings about the network being down and unknown addresses. The important line to look for is DHCPACK from i.p.add.here, it means the netbook got a working ip address from the adhoc wlan device.

    Hardware used in my case: Aspire One model ZG5, Nokia E63 (symbian 3rd ed) with JoikuSpot Light.

    With the shareware version, you can connect to HTTP and HTTPS ports (TCP 80 and 443). The premium version offers unrestricted access to the rest of the ports and settings.
     
    Neva, Mar 13, 2010
    #67
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.