Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I've been trying to connect to an ad hoc network for a week now, I can't figure out what's wrong. A debain machine is setting up an adhoc network. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16

    Connect to an ad-hoc network


    Hi,

    I've been trying to connect to an ad hoc network for a week now, I can't figure out what's wrong.

    A debain machine is setting up an adhoc network. I'm able to connect to it with my chromebook, windows and ubuntu machine.

    I'm unable to setup wpa supplicant to connect to the network.

    debian machine hosting the adhoc network:

    wpa_supplicantconf
    Code:
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    
    # use 'ap_scan=2' on all devices connected to the network
    ap_scan=2
    
    network={
        ssid="SSID"
        mode=1
        frequency=2432
        proto=WPA
        key_mgmt=WPA-NONE
        pairwise=NONE
        group=TKIP
        psk="password"
    }
    /etc/network/interfaces
    Code:
    auto lo
    
    iface lo inet loopback
    iface eth0 inet dhcp
    
    allow-hotplug wlan0
    iface wlan0 inet static
    #wpa-conf /etc/wpa_supplicant/wpa.conf
    wpa_conf /home/flitjes/wpa_supplicant/wpa_supplicant-adhoc.conf
     address 192.168.1.1
     netmask 255.255.255.0
      
    iface home inet dhcp
    iface default inet dhcp
    This is working correctly

    Debian machine with the connect setup (the one with the troubles)
    Code:
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    
    ap_scan=2
    
    network={
        ssid="SSID"
        psk="password"
    }
    /etc/network/interfaces
    Code:
    auto lo
    
    iface lo inet loopback
    iface eth0 inet dhcp
    
    allow-hotplug wlan0
    iface wlan0 inet static
    #wpa-conf /etc/wpa_supplicant/wpa.conf
    wpa_conf /home/flitjes/wpa_supplicant/wpa_supplicant-adhoc-connect.conf
     address 192.168.1.2
     netmask 255.255.255.0
      
    iface home inet dhcp
    iface default inet dhcp
    What should the config be to connect to this adhoc network?
    I've tried everything and can't seem to figure this out. Adding and changing the network params and no combination seems to work. The simple config works when connecting to a router with WPA encryption. (commenting the ap_mode line)
    Could someone help me?
    Last edited by flitjes; 06-26-2014 at 12:35 PM.

  2. #2
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    Does nobody have any idea what I'm doing wrong?

  3. #3
    Linux User jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    255
    I understand your frustration.. Something you might try, although a little odd, is to comment out all of your lines in the network/interfaces file and buy the defaults. What I'm suspicious of is that something there isn't correct. I don't know it well enough to look at what you've coded and accept it, so I'm saying, unless you know this is a proper configuration (i.e. working someplace you know of), just set it up for the minimal. Then when it's working, go back and see if you can put it back together piece by piece. You have a lot more complicated setup than I have ever used, not that it's right or wrong, but if something isn't working, comment out all the stuff you want but can live without for now, and keep it simple, s****, if you know what I mean...

    Start with a minimal configuration, and add on so you can see where it fails.

    I wish I could just look and correct it, but I can't and this is a pretty good debugging mechanism.

    Jack

Posting Permissions

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