7

I'm trying to setup an access point, using Raling RT5370 USB Dongle on a Debian system, I followed the following tutorial, until "Internet connection Sharing.", I don't want to share internet, so I skip this step. After the reboot I can see the AP, but I can't connect, it seams I can't get an IP address, how can I debug on raspberry to see what's happening or where did I made the mistake?

Edited


This is my dhcpd.conf file content:

ddns-update-style none;

subnet 10.10.0.0 netmask 255.255.255.0 {
        range 10.10.0.2 10.10.0.16;
        option domain-name-servers 8.8.4.4, 208.67.222.222;
        option routers 10.10.0.1;
}

The system log:

Aug 11 20:47:46 raspberrypi dhcpd: Wrote 0 leases to leases file.
Aug 11 20:47:46 raspberrypi dhcpd: 
Aug 11 20:47:46 raspberrypi dhcpd: No subnet declaration for wlan0 (no IPv4 addresses).
Aug 11 20:47:46 raspberrypi dhcpd: ** Ignoring requests on wlan0.  If this is not what
Aug 11 20:47:46 raspberrypi dhcpd:    you want, please write a subnet declaration
Aug 11 20:47:46 raspberrypi dhcpd:    in your dhcpd.conf file for the network segment
Aug 11 20:47:46 raspberrypi dhcpd:    to which interface wlan0 is attached. **
Aug 11 20:47:46 raspberrypi dhcpd: 
Aug 11 20:47:46 raspberrypi dhcpd: 
Aug 11 20:47:46 raspberrypi dhcpd: Not configured to listen on any interfaces!

EDITE2

sytemlog:

Aug 11 21:00:23 raspberrypi hostapd: wlan0: STA 5c:0a:5b:24:43:d9 IEEE 802.11: disassociated
Aug 11 21:00:23 raspberrypi hostapd: wlan0: STA 5c:0a:5b:24:43:d9 IEEE 802.11: disassociated
Aug 11 21:00:26 raspberrypi hostapd: wlan0: STA 5c:0a:5b:24:43:d9 IEEE 802.11: authenticated
Aug 11 21:00:26 raspberrypi hostapd: wlan0: STA 5c:0a:5b:24:43:d9 IEEE 802.11: associated (aid 1)
Aug 11 21:00:26 raspberrypi kernel: [  123.878201] BUG: scheduling while atomic: hostapd/1358/0x00000002
Aug 11 21:00:26 raspberrypi kernel: [  123.878227] Modules linked in: aes_generic 8021q garp stp llc snd_bcm2835 snd_pcm snd_seq snd_timer snd_seq_device snd snd_page_alloc arc4 rt2800usb rt2800lib crc_ccitt rt2x00usb rt2x00lib mac80211 cfg80211
Aug 11 21:00:26 raspberrypi kernel: [  123.878515] [<c00153d4>] (unwind_backtrace+0x0/0xfc) from [<c03f9598>] (dump_stack+0x20/0x24)
Aug 11 21:00:26 raspberrypi kernel: [  123.878580] [<c03f9598>] (dump_stack+0x20/0x24) from [<c00216d0>] (__schedule_bug+0x74/0x80)
Aug 11 21:00:26 raspberrypi kernel: [  123.878621] [<c00216d0>] (__schedule_bug+0x74/0x80) from [<c03f9e00>] (__schedule+0x568/0x670)
Aug 11 21:00:26 raspberrypi kernel: [  123.878669] [<c03f9e00>] (__schedule+0x568/0x670) from [<c03fa4cc>] (schedule+0x58/0x70)
Aug 11 21:00:26 raspberrypi kernel: [  123.878708] [<c03fa4cc>] (schedule+0x58/0x70) from [<c03fa9b4>] (schedule_timeout+0x1a0/0x34c)
Aug 11 21:00:26 raspberrypi kernel: [  123.878745] [<c03fa9b4>] (schedule_timeout+0x1a0/0x34c) from [<c03fa2c4>] (wait_for_common+0xf0/0x1c4)
Aug 11 21:00:26 raspberrypi kernel: [  123.878793] [<c03fa2c4>] (wait_for_common+0xf0/0x1c4) from [<c03fa44c>] (wait_for_completion_timeout+0x1c/0x20)
Aug 11 21:00:26 raspberrypi kernel: [  123.878842] [<c03fa44c>] (wait_for_completion_timeout+0x1c/0x20) from [<c02dd2f4>] (usb_start_wait_urb+0xac/0xd4)
Aug 11 21:00:26 raspberrypi kernel: [  123.878884] [<c02dd2f4>] (usb_start_wait_urb+0xac/0xd4) from [<c02dd538>] (usb_control_msg+0xd4/0xf8)
Aug 11 21:00:26 raspberrypi kernel: [  123.878962] [<c02dd538>] (usb_control_msg+0xd4/0xf8) from [<bf09eddc>] (rt2x00usb_vendor_request+0xc0/0x144 [rt2x00usb])
Aug 11 21:00:26 raspberrypi kernel: [  123.879030] [<bf09eddc>] (rt2x00usb_vendor_request+0xc0/0x144 [rt2x00usb]) from [<bf09ef18>] (rt2x00usb_vendor_req_buff_lock+0x70/0x120 [rt2x00usb])
Aug 11 21:00:26 raspberrypi kernel: [  123.879105] [<bf09ef18>] (rt2x00usb_vendor_req_buff_lock+0x70/0x120 [rt2x00usb]) from [<bf09f148>] (rt2x00usb_vendor_request_buff+0x78/0xbc [rt2x00usb])
Aug 11 21:00:26 raspberrypi kernel: [  123.879182] [<bf09f148>] (rt2x00usb_vendor_request_buff+0x78/0xbc [rt2x00usb]) from [<bf0bc1b4>] (rt2x00usb_register_multiread+0x48/0x50 [rt2800usb])
Aug 11 21:00:26 raspberrypi kernel: [  123.879274] [<bf0bc1b4>] (rt2x00usb_register_multiread+0x48/0x50 [rt2800usb]) from [<bf0ab014>] (rt2800_get_tkip_seq+0x50/0x80 [rt2800lib])
Aug 11 21:00:26 raspberrypi kernel: [  123.879588] [<bf0ab014>] (rt2800_get_tkip_seq+0x50/0x80 [rt2800lib]) from [<bf0528d8>] (ieee80211_get_key+0x1a8/0x1f8 [mac80211])
Aug 11 21:00:26 raspberrypi kernel: [  123.879964] [<bf0528d8>] (ieee80211_get_key+0x1a8/0x1f8 [mac80211]) from [<bf00a908>] (nl80211_get_key+0x288/0x328 [cfg80211])
Aug 11 21:00:26 raspberrypi kernel: [  123.880130] [<bf00a908>] (nl80211_get_key+0x288/0x328 [cfg80211]) from [<c036c2bc>] (genl_rcv_msg+0x1f0/0x23c)
Aug 11 21:00:26 raspberrypi kernel: [  123.880183] [<c036c2bc>] (genl_rcv_msg+0x1f0/0x23c) from [<c036b568>] (netlink_rcv_skb+0xcc/0xe8)
Aug 11 21:00:26 raspberrypi kernel: [  123.880219] [<c036b568>] (netlink_rcv_skb+0xcc/0xe8) from [<c036c0c0>] (genl_rcv+0x28/0x34)
Aug 11 21:00:26 raspberrypi kernel: [  123.880254] [<c036c0c0>] (genl_rcv+0x28/0x34) from [<c036ae78>] (netlink_unicast+0x2c8/0x320)
Aug 11 21:00:26 raspberrypi kernel: [  123.880297] [<c036ae78>] (netlink_unicast+0x2c8/0x320) from [<c036b0e0>] (netlink_sendmsg+0x210/0x328)
Aug 11 21:00:26 raspberrypi kernel: [  123.880341] [<c036b0e0>] (netlink_sendmsg+0x210/0x328) from [<c0336cf0>] (sock_sendmsg+0xb0/0xd0)
Aug 11 21:00:26 raspberrypi kernel: [  123.880380] [<c0336cf0>] (sock_sendmsg+0xb0/0xd0) from [<c033713c>] (__sys_sendmsg+0x318/0x338)
Aug 11 21:00:26 raspberrypi kernel: [  123.880428] [<c033713c>] (__sys_sendmsg+0x318/0x338) from [<c0338c38>] (sys_sendmsg+0x4c/0x78)
Aug 11 21:00:26 raspberrypi kernel: [  123.880475] [<c0338c38>] (sys_sendmsg+0x4c/0x78) from [<c000e140>] (ret_fast_syscall+0x0/0x48)
Aug 11 21:00:26 raspberrypi hostapd: wlan0: STA 5c:0a:5b:24:43:d9 RADIUS: starting accounting session 5026C775-00000001
Aug 11 21:00:26 raspberrypi hostapd: wlan0: STA 5c:0a:5b:24:43:d9 WPA: pairwise key handshake completed (RSN)

hostapd.conf

interface=wlan0
driver=nl80211
ssid=quadcopter
channel=1
hw_mode=g
auth_algs=1
wpa=3
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

Interface

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
 address 10.10.0.1
 netmask 255.255.255.0

Here is a small script which solve the problem:

#!/bin/bash

/etc/init.d/hostapd restart
/sbin/ifdown wlan0
/sbin/ifup wlan0
/etc/init.d/dnsmasq restart

I'm using cronjob to run this script at the startup.

  • You got a DHCP server running on any machine attached to the Raspberry Pi? – Alex Chamberlain Aug 11 '12 at 20:34
  • I edited my question. – OHLÁLÁ Aug 11 '12 at 20:49
  • /etc/network/interfaces? – Alex Chamberlain Aug 11 '12 at 21:04
  • I tested this configuration on Ubuntu 12.04, and it's working, but I couldn't get it work on Raspberry PI – OHLÁLÁ Aug 12 '12 at 8:55
  • ifconfig -a?? – Alex Chamberlain Aug 12 '12 at 19:48
6

My guess would be a startup order issue. Wifi drivers can be fickle creatures. Is it possible that when dhcpd starts that wlan0 does not yet have an ip assigned, then gets one later after dhcpd has already given up?

Debug this by letting the system start up and the wifi "settle" (ie. you start to see the wifi ssid broadcasts). Log into the PI and manually do a dhcpd restart. Check your logs again to see if its still throwing the interface ignored error even then.

If that still causes you grief, skip wifi altogether and just try to get it working on the ethernet port so that you can be sure that your dhcpd settings are working right. Then add the complication of a wifi AP.

  • If I restart the services manually than it does work. I will try the dnsmasq instead of isc-dhcp – OHLÁLÁ Aug 20 '12 at 7:26
4

So you want to use the RT5370 to start an access point, and have it give out IP addresses ? If I'm reading that right, I did exactly that here - http://sirlagz.net/?p=589

I used dnsmasq rather than the ISC DHCP server though.

0

In my case this was associated with a message in /var/log/syslog:

dnsmasq-dhcp[2699]: DHCP packet received on wlan0 which has no address

Re-assigning the Access Points ip address fixed the issue: ifconfig wlan0 192.168.0.1

See this blog: http://robots.ianrenton.com/day-22-i-occidentally-a-whole-access-point

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.