Re: wifi with no encryption: No DHCPOFFERS received

2018-12-13 Thread Vincent Lefevre
On 2018-12-12 10:30:44 -0500, Dan Ritter wrote:
> Yeah, I think you had a link problem, not a DHCP problem.

I've tried today, and the issue is not always reproducible.
But since there are several access points with the same ESSID,
a reason might be that wicd doesn't always try to connect to
the same one, and one of them at least may yield the error.
This could explain why the connection succeeded with Android.

After stopping the wicd daemon (service wicd stop):

root@zira:/home/vinc17# iw dev wlp61s0 link
Not connected.
root@zira:/home/vinc17# iw dev wlp61s0 scan
command failed: Network is down (-100)
root@zira:/home/vinc17# ifconfig wlp61s0 up
root@zira:/home/vinc17# iw dev wlp61s0 link
Not connected.
root@zira:/home/vinc17# iw dev wlp61s0 scan
[a lot of output]

Something interesting is that not all corresponding to "invites"
are equivalent, e.g.

BSS 00:26:cb:11:1a:82(on wlp61s0)
last seen: 63544.369s [boottime]
TSF: 33102324019 usec (0d, 09:11:42)
freq: 2462
beacon interval: 100 TUs
capability: ESS ShortPreamble ShortSlotTime (0x0421)
signal: -73.00 dBm
last seen: 3060 ms ago
Information elements from Probe Response frame:
SSID: invites
Supported rates: 11.0* 12.0 18.0 24.0 36.0 48.0 
DS Parameter set: channel 11
ERP: 
WMM: * Parameter version 1
 * u-APSD
 * BE: CW 15-1023, AIFSN 3
 * BK: CW 15-1023, AIFSN 7
 * VI: CW 7-15, AIFSN 2, TXOP 6016 usec
 * VO: CW 3-7, AIFSN 2, TXOP 3264 usec

BSS 44:ad:d9:bb:d2:42(on wlp61s0)
last seen: 63544.360s [boottime]
TSF: 33118289997 usec (0d, 09:11:58)
freq: 2462
beacon interval: 102 TUs
capability: ESS ShortPreamble ShortSlotTime (0x0421)
signal: -81.00 dBm
last seen: 3068 ms ago
SSID: invites
Supported rates: 11.0* 12.0 18.0 24.0 36.0 48.0 
DS Parameter set: channel 11
ERP: 
HT capabilities:
Capabilities: 0x186e
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
 * primary channel: 11
 * secondary channel offset: no secondary
 * STA channel width: 20 MHz
 * RIFS: 0
 * HT protection: non-HT mixed
 * non-GF present: 1
 * OBSS non-GF present: 0
 * dual beacon: 0
 * dual CTS protection: 0
 * STBC beacon: 0
 * L-SIG TXOP Prot: 0
 * PCO active: 0
 * PCO phase: 0
WMM: * Parameter version 1
 * u-APSD
 * BE: CW 15-1023, AIFSN 3
 * BK: CW 15-1023, AIFSN 7
 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec

root@zira:/home/vinc17# iw dev wlp61s0 connect invites
root@zira:/home/vinc17# iw dev wlp61s0 link
Connected to 00:26:cb:b8:bf:f2 (on wlp61s0)
SSID: invites
freq: 2412
RX: 22122 bytes (117 packets)
TX: 4371 bytes (20 packets)
signal: -76 dBm
tx bitrate: 24.0 MBit/s

bss flags:  short-preamble short-slot-time
dtim period:2
beacon int: 100
root@zira:/home/vinc17# dhclient wlp61s0
ping: Warning: source address might be selected on device other than wlp61s0.

and I get an IP address. This always works, and I can see I get
the link immediately or almost immediately.

However, if I do like what wicd does according to its logs, i.e.

[...]
2018/12/11 18:44:15 :: ifconfig wlp61s0 up
2018/12/11 18:44:17 :: enctype is None
2018/12/11 18:44:17 :: ['iwconfig', 'wlp61s0', 'essid', '--', 'invites']
2018/12/11 18:44:17 :: iwconfig wlp61s0 channel 11
2018/12/11 18:44:17 :: iwconfig wlp61s0 ap 00:26:CB:11:1A:82
2018/12/11 18:44:17 :: Running DHCP with NO hostname
2018/12/11 18:44:17 :: /sbin/dhclient -v -cf /var/lib/wicd/dhclient.conf  
wlp61s0
[...]

this does not work:

root@zira:/home/vinc17# iwconfig wlp61s0 essid -- invites
root@zira:/home/vinc17# iw dev wlp61s0 link
Not connected.
root@zira:/home/vinc17# iwconfig wlp61s0 channel 11
root@zira:/home/vinc17# iwconfig wlp61s0 ap 00:26:CB:11:1A:82
root@zira:/home/vinc17# iw dev wlp61s0 link
Not connected.

(and still no link after several minutes). Note that the BSS is
different, but that's wicd's fault to choose a wrong one, while
iw is always successful.


Re: wifi with no encryption: No DHCPOFFERS received

2018-12-12 Thread Dan Ritter
Vincent Lefevre wrote: 
> On 2018-12-11 15:45:19 -0500, Dan Ritter wrote:
> > Check the link status:
> > 
> > iw dev wlp61s0 link
> > 
> > Look for the hotspot:
> > 
> > iw dev wlp61s0 scan
> > 
> > Connect to one:
> > 
> > iw dev wlp61s0 connect "$ESSID"
> > 
> > Run dhclient by hand:
> > 
> > dhclient wlp61s0
> > 
> > Tell us where it falls down along that path.
> 
> Thanks for the instructions. I hope I can try tomorrow
> (I need to bring my laptop there).
> 
> In the mean time, I could try another open wifi hotspot that was
> reachable, and the connection was successful. I could see a difference
> in the kernel logs. This time, I had the following additional lines:
> 
> Dec 12 10:36:50 zira kernel: wlp61s0: authenticate with 14:0c:76:9f:e9:d9
> Dec 12 10:36:50 zira kernel: wlp61s0: send auth to 14:0c:76:9f:e9:d9 (try 1/3)
> Dec 12 10:36:50 zira kernel: wlp61s0: aborting authentication with 
> 14:0c:76:9f:e9:d9 by local choice (Reason: 3=DEAUTH_LEAVING)
> Dec 12 10:36:50 zira kernel: wlp61s0: authenticate with 14:0c:76:9f:e9:d9
> Dec 12 10:36:50 zira kernel: wlp61s0: send auth to 14:0c:76:9f:e9:d9 (try 1/3)
> Dec 12 10:36:50 zira kernel: wlp61s0: authenticated
> Dec 12 10:36:50 zira kernel: wlp61s0: associate with 14:0c:76:9f:e9:d9 (try 
> 1/3)
> Dec 12 10:36:50 zira kernel: wlp61s0: RX AssocResp from 14:0c:76:9f:e9:d9 
> (capab=0x401 status=0 aid=1)
> Dec 12 10:36:50 zira kernel: wlp61s0: associated
> Dec 12 10:36:50 zira kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp61s0: link 
> becomes ready
> 
> So, the issue was not due to DHCP.

Yeah, I think you had a link problem, not a DHCP problem.

> BTW, I don't know whether this is related, but I sometimes
> see a kernel warning with a trace, e.g.
> 
> Dec 11 11:01:43 zira kernel: [ cut here ]
> Dec 11 11:01:43 zira kernel: TX on unused queue 2
> Dec 11 11:01:43 zira kernel: WARNING: CPU: 0 PID: 2545 at 
> /build/linux-F3l5KA/linux-4.18.20/drivers/net/wireless/intel/iwlwifi/pcie/tx.c:2287
>  iwl_trans_pcie_tx+0xdab/0x1180 [iwlwifi]
> [...]

It's the right thing to go wrong and produce problems.

-dsr-



Re: wifi with no encryption: No DHCPOFFERS received

2018-12-12 Thread Vincent Lefevre
On 2018-12-11 15:45:19 -0500, Dan Ritter wrote:
> Check the link status:
> 
> iw dev wlp61s0 link
> 
> Look for the hotspot:
> 
> iw dev wlp61s0 scan
> 
> Connect to one:
> 
> iw dev wlp61s0 connect "$ESSID"
> 
> Run dhclient by hand:
> 
> dhclient wlp61s0
> 
> Tell us where it falls down along that path.

Thanks for the instructions. I hope I can try tomorrow
(I need to bring my laptop there).

In the mean time, I could try another open wifi hotspot that was
reachable, and the connection was successful. I could see a difference
in the kernel logs. This time, I had the following additional lines:

Dec 12 10:36:50 zira kernel: wlp61s0: authenticate with 14:0c:76:9f:e9:d9
Dec 12 10:36:50 zira kernel: wlp61s0: send auth to 14:0c:76:9f:e9:d9 (try 1/3)
Dec 12 10:36:50 zira kernel: wlp61s0: aborting authentication with 
14:0c:76:9f:e9:d9 by local choice (Reason: 3=DEAUTH_LEAVING)
Dec 12 10:36:50 zira kernel: wlp61s0: authenticate with 14:0c:76:9f:e9:d9
Dec 12 10:36:50 zira kernel: wlp61s0: send auth to 14:0c:76:9f:e9:d9 (try 1/3)
Dec 12 10:36:50 zira kernel: wlp61s0: authenticated
Dec 12 10:36:50 zira kernel: wlp61s0: associate with 14:0c:76:9f:e9:d9 (try 1/3)
Dec 12 10:36:50 zira kernel: wlp61s0: RX AssocResp from 14:0c:76:9f:e9:d9 
(capab=0x401 status=0 aid=1)
Dec 12 10:36:50 zira kernel: wlp61s0: associated
Dec 12 10:36:50 zira kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp61s0: link 
becomes ready

So, the issue was not due to DHCP.

BTW, I don't know whether this is related, but I sometimes
see a kernel warning with a trace, e.g.

Dec 11 11:01:43 zira kernel: [ cut here ]
Dec 11 11:01:43 zira kernel: TX on unused queue 2
Dec 11 11:01:43 zira kernel: WARNING: CPU: 0 PID: 2545 at 
/build/linux-F3l5KA/linux-4.18.20/drivers/net/wireless/intel/iwlwifi/pcie/tx.c:2287
 iwl_trans_pcie_tx+0xdab/0x1180 [iwlwifi]
[...]

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: wifi with no encryption: No DHCPOFFERS received

2018-12-11 Thread Dan Ritter
Vincent Lefevre wrote: 
> I get the following error when I try to connect to wifi hotspots with
> no encryption. This is from the wicd log:
> 
> [...]
> 2018/12/11 18:44:15 :: Putting interface up...
> 2018/12/11 18:44:15 :: ifconfig wlp61s0 up
> 2018/12/11 18:44:17 :: enctype is None
> 2018/12/11 18:44:17 :: ['iwconfig', 'wlp61s0', 'essid', '--', 'invites']
> 2018/12/11 18:44:17 :: iwconfig wlp61s0 channel 11
> 2018/12/11 18:44:17 :: iwconfig wlp61s0 ap 00:26:CB:11:1A:82

> Dec 11 18:44:15 zira kernel: IPv6: ADDRCONF(NETDEV_UP): wlp61s0: link is not 
> ready


Check the link status:

iw dev wlp61s0 link

Look for the hotspot:

iw dev wlp61s0 scan

Connect to one:

iw dev wlp61s0 connect "$ESSID"

Run dhclient by hand:

dhclient wlp61s0

Tell us where it falls down along that path.

-dsr-



wifi with no encryption: No DHCPOFFERS received

2018-12-11 Thread Vincent Lefevre
I get the following error when I try to connect to wifi hotspots with
no encryption. This is from the wicd log:

[...]
2018/12/11 18:44:15 :: Putting interface up...
2018/12/11 18:44:15 :: ifconfig wlp61s0 up
2018/12/11 18:44:17 :: enctype is None
2018/12/11 18:44:17 :: ['iwconfig', 'wlp61s0', 'essid', '--', 'invites']
2018/12/11 18:44:17 :: iwconfig wlp61s0 channel 11
2018/12/11 18:44:17 :: iwconfig wlp61s0 ap 00:26:CB:11:1A:82
2018/12/11 18:44:17 :: Running DHCP with NO hostname
2018/12/11 18:44:17 :: /sbin/dhclient -v -cf /var/lib/wicd/dhclient.conf  
wlp61s0
2018/12/11 18:44:17 :: Internet Systems Consortium DHCP Client 4.3.5
2018/12/11 18:44:17 :: Copyright 2004-2016 Internet Systems Consortium.
2018/12/11 18:44:17 :: All rights reserved.
2018/12/11 18:44:17 :: For info, please visit https://www.isc.org/software/dhcp/
2018/12/11 18:44:17 :: 
2018/12/11 18:44:17 :: Listening on LPF/wlp61s0/cc:3d:82:a9:e3:ea
2018/12/11 18:44:17 :: Sending on   LPF/wlp61s0/cc:3d:82:a9:e3:ea
2018/12/11 18:44:17 :: Sending on   Socket/fallback
2018/12/11 18:44:17 :: DHCPDISCOVER on wlp61s0 to 255.255.255.255 port 67 
interval 8
2018/12/11 18:44:25 :: DHCPDISCOVER on wlp61s0 to 255.255.255.255 port 67 
interval 11
2018/12/11 18:44:36 :: DHCPDISCOVER on wlp61s0 to 255.255.255.255 port 67 
interval 9
2018/12/11 18:44:45 :: DHCPDISCOVER on wlp61s0 to 255.255.255.255 port 67 
interval 16
2018/12/11 18:45:01 :: DHCPDISCOVER on wlp61s0 to 255.255.255.255 port 67 
interval 10
2018/12/11 18:45:11 :: DHCPDISCOVER on wlp61s0 to 255.255.255.255 port 67 
interval 7
2018/12/11 18:45:18 :: No DHCPOFFERS received.
2018/12/11 18:45:18 :: No working leases in persistent database - sleeping.
2018/12/11 18:45:28 :: DHCP connection failed
[...]

journalctl shows:

Dec 11 18:44:15 zira kernel: IPv6: ADDRCONF(NETDEV_UP): wlp61s0: link is not 
ready
Dec 11 18:44:17 zira dhclient[21331]: Internet Systems Consortium DHCP Client 
4.3.5
Dec 11 18:44:17 zira dhclient[21331]: Copyright 2004-2016 Internet Systems 
Consortium.
Dec 11 18:44:17 zira dhclient[21331]: All rights reserved.
Dec 11 18:44:17 zira dhclient[21331]: For info, please visit 
https://www.isc.org/software/dhcp/
Dec 11 18:44:17 zira dhclient[21331]: 
Dec 11 18:44:17 zira root[21338]: 
/etc/dhcp/dhclient-enter-hooks.d/google-tcp-dns with reason=PREINIT
Dec 11 18:44:17 zira root[21341]: 
/etc/dhcp/dhclient-exit-hooks.d/0google-tcp-dns with reason=PREINIT
Dec 11 18:44:17 zira dhclient[21331]: Listening on LPF/wlp61s0/cc:3d:82:a9:e3:ea
Dec 11 18:44:17 zira dhclient[21331]: Sending on   LPF/wlp61s0/cc:3d:82:a9:e3:ea
Dec 11 18:44:17 zira dhclient[21331]: Sending on   Socket/fallback
Dec 11 18:44:17 zira dhclient[21331]: DHCPDISCOVER on wlp61s0 to 
255.255.255.255 port 67 interval 8
Dec 11 18:44:25 zira dhclient[21331]: DHCPDISCOVER on wlp61s0 to 
255.255.255.255 port 67 interval 11
Dec 11 18:44:36 zira dhclient[21331]: DHCPDISCOVER on wlp61s0 to 
255.255.255.255 port 67 interval 9
Dec 11 18:44:45 zira dhclient[21331]: DHCPDISCOVER on wlp61s0 to 
255.255.255.255 port 67 interval 16
Dec 11 18:45:01 zira dhclient[21331]: DHCPDISCOVER on wlp61s0 to 
255.255.255.255 port 67 interval 10
Dec 11 18:45:11 zira dhclient[21331]: DHCPDISCOVER on wlp61s0 to 
255.255.255.255 port 67 interval 7
Dec 11 18:45:18 zira dhclient[21331]: No DHCPOFFERS received.
Dec 11 18:45:18 zira dhclient[21331]: No working leases in persistent database 
- sleeping.
Dec 11 18:45:18 zira root[21382]: 
/etc/dhcp/dhclient-enter-hooks.d/google-tcp-dns with reason=FAIL
Dec 11 18:45:18 zira root[21384]: 
/etc/dhcp/dhclient-exit-hooks.d/0google-tcp-dns with reason=FAIL
Dec 11 18:45:18 zira avahi-autoipd(wlp61s0)[21391]: Found user 'avahi-autoipd' 
(UID 107) and group 'avahi-autoipd' (GID 113)
Dec 11 18:45:18 zira avahi-autoipd(wlp61s0)[21391]: Successfully called 
chroot().
Dec 11 18:45:18 zira avahi-autoipd(wlp61s0)[21391]: Successfully dropped root 
privileges.
Dec 11 18:45:18 zira avahi-autoipd(wlp61s0)[21391]: Starting with address 
169.254.12.91
Dec 11 18:45:24 zira avahi-autoipd(wlp61s0)[21391]: Callout BIND, address 
169.254.12.91 on interface wlp61s0
Dec 11 18:45:24 zira avahi-daemon[782]: Joining mDNS multicast group on 
interface wlp61s0.IPv4 with address 169.254.12.91.
Dec 11 18:45:24 zira avahi-daemon[782]: New relevant interface wlp61s0.IPv4 for 
mDNS.
Dec 11 18:45:24 zira avahi-daemon[782]: Registering new address record for 
169.254.12.91 on wlp61s0.IPv4.
Dec 11 18:45:28 zira avahi-autoipd(wlp61s0)[21391]: Successfully claimed IP 
address 169.254.12.91

There are no issues when I connect to this hotspot with my phone
under Android.

Any idea?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)