Find the answer to your Linux question:
Results 1 to 10 of 10
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?

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

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,709
    You say that you can connect via a number of machines and distributions. Which one doesn't work? Please provide hardware, linux distribution+version+kernel you are using.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    Thnx for your reply.

    I will get the data to night when I'm home from work.
    Ill get
    lsusb for the wifi dongle
    uname -a for distro etc
    version of wpa_supplicant


    I'm able to connect with the adhoc network X with the network managers form windows, chrome os and ubuntu.

    I'm trying to connect to the same adhoc network (X) with a raspberry pi and debain weezy with wpa supplicant. I'm unable to connect to the adhoc network with the use of wpa_supplicant.

    Due to the fact I'm able to connect with the network managers, I'm sure that the adhoc network config is correct but my wpa_supplicant config for the raspberry pi isn't.

    Thnx in advance

  6. #5
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    Here we go, hope it helps
    This is the pi which I want to connect to the adhoc network SSID.

    Code:
    lsusb
    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
    Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    Bus 001 Device 005: ID 0bda:8171 Realtek Semiconductor Corp. RTL8188SU 802.11n WLAN Adapter
    Code:
    uname -a
    Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
    Code:
    wpa_supplicant -v
    wpa_supplicant v1.0
    Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi> and contributors
    Code:
    lsmod
    Module                  Size  Used by
    binfmt_misc             6968  1 
    snd_bcm2835            16432  0 
    snd_pcm                77728  1 snd_bcm2835
    snd_seq                53482  0 
    snd_timer              20110  2 snd_pcm,snd_seq
    snd_seq_device          6462  1 snd_seq
    snd                    58744  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
    snd_page_alloc          5169  1 snd_pcm
    r8712u                169239  0 
    leds_gpio               2243  0 
    led_class               3570  1 leds_gpio
    Code:
    cat /etc/issue
    Raspbian GNU/Linux 7 \n \l
    Code:
    cat /etc/wpa_supplicant/wpa_supplicant.conf 
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    
    ap_scan=2
    
    network={
        ssid="SSID"
        psk="password"
    }
    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

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,709
    Any particular reason why you are using wpa_supplicant? If the wifi device on the Pi is not supported by your kernel, check on wireless.kernel.org to see if there are drivers and firmware available. If wpa_supplicant should work, do you have the firmware blob for the device?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #7
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    The reason being: what else? I want wpa encryption and a wifi G network.
    I've tried iwtools and had it working, with an adhoc network created with iwtools on device A and connect to it with iwtools on
    the target which now has troubles to connect with wpa_supplicant.
    This worked but it creates a wifi b network with a throughput of 11mbit which is to low. I need 54mbit atleast.

    It is supported, I can connect to my home network with WPA2 and about the same config as the adhoc. So that is working.

    Does your comment mean it should work with my wpa config? Because you are referring to compatibility issues.

  9. #8
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    The reason being: what else? I want wpa encryption and a wifi G network.
    I've tried iwtools and had it working, with an adhoc network created with iwtools on device A and connect to it with iwtools on
    the target which now has troubles to connect with wpa_supplicant.
    This worked but it creates a wifi b network with a throughput of 11mbit which is to low. I need 54mbit atleast.

    It is supported, I can connect to my home network with WPA2 and about the same config as the adhoc. So that is working.

    Does your comment mean it should work with my wpa config? Because you are referring to compatibility issues.

  10. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,709
    For Linux to use a particular WiFi hardware device, two things are needed.

    1. The appropriate driver.
    2. A firmware blob that is the low-level device code that is loaded by the OS onto the device. This is often a proprietary bit of binary code that is written and compiled for the WiFi chipset directly.

    The wpa_supplicant tools is to enable you to use Windows drivers with Linux to control WiFi devices that have no Linux-specific driver. Since Pi was designed to run Linux, I would suspect this is not the case. Hence, I doubt you should be using it to enable the driver.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  11. #10
    Just Joined!
    Join Date
    Apr 2012
    Posts
    16
    Ok when the weather coolsdown abit ill check it out. thnx.

Posting Permissions

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