Wifi authentication issues

Hi, I saw at least two other posts with similar problem but since they two months old (and I have a lightly different experience with it) I figured it would be best to create a new post.

My Yun works fine and I have used it for the past week connected to my macbook usb port on wifi without issues, whenever I connect it it will bring wifi up and connect to my home network after a few minutes, it never failed. Now comes the disturbing part, yesterday I tried to connect the Yun to my pc instead (with the same usb mini cable), it did not come up so I connected an ethernet cable and not only it successfully connected to my lan with but it also brought the wifi interface up !Oo

Here is the log as shown with logread first when the ethernet cable is not connected:

Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Successfully dropped root privileges.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: avahi-daemon 0.6.31 starting up.
Feb  6 18:21:35 Arduino daemon.warn avahi-daemon[1463]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Loading service file /etc/avahi/services/arduino.service.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Loading service file /etc/avahi/services/ssh.service.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Network interface enumeration completed.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Registering HINFO record with values 'MIPS'/'LINUX'.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Server startup complete. Host name is Arduino.local. Local service cookie is 2713574976.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Service "Secure Shell on Arduino" (/etc/avahi/services/ssh.service) successfully established.
Feb  6 18:21:35 Arduino daemon.info avahi-daemon[1463]: Service "Arduino" (/etc/avahi/services/arduino.service) successfully established.
Feb  6 18:21:38 Arduino kern.info kernel: [   71.770000] wlan0: authenticate with f4:ca:e5:c6:9f:bc
Feb  6 18:21:38 Arduino kern.info kernel: [   71.830000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:21:38 Arduino kern.info kernel: [   71.980000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 2/3)
Feb  6 18:21:38 Arduino kern.info kernel: [   71.990000] wlan0: authenticated
Feb  6 18:21:38 Arduino kern.info kernel: [   72.000000] wlan0: associate with f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:21:38 Arduino kern.info kernel: [   72.010000] wlan0: RX AssocResp from f4:ca:e5:c6:9f:bc (capab=0x411 status=0 aid=4)
Feb  6 18:21:38 Arduino kern.info kernel: [   72.020000] wlan0: associated
Feb  6 18:21:40 Arduino user.info sysinit: Start uSDaemon
Feb  6 18:21:42 Arduino kern.info kernel: [   75.110000] wlan0: deauthenticated from f4:ca:e5:c6:9f:bc (Reason: 2)
Feb  6 18:22:02 Arduino kern.info kernel: [   95.910000] wlan0: authenticate with f4:ca:e5:c6:9f:bc
Feb  6 18:22:02 Arduino kern.info kernel: [   95.970000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:22:02 Arduino kern.info kernel: [   95.990000] wlan0: authenticated
Feb  6 18:22:02 Arduino kern.info kernel: [   96.010000] wlan0: associate with f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:22:03 Arduino kern.info kernel: [   96.040000] wlan0: RX AssocResp from f4:ca:e5:c6:9f:bc (capab=0x411 status=0 aid=4)
Feb  6 18:22:03 Arduino kern.info kernel: [   96.050000] wlan0: associated
Feb  6 18:22:06 Arduino kern.info kernel: [   99.150000] wlan0: deauthenticated from f4:ca:e5:c6:9f:bc (Reason: 2)
Feb  6 18:22:26 Arduino kern.info kernel: [  119.940000] wlan0: authenticate with f4:ca:e5:c6:9f:bc
Feb  6 18:22:26 Arduino kern.info kernel: [  120.000000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:22:27 Arduino kern.info kernel: [  120.130000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 2/3)
Feb  6 18:22:27 Arduino kern.info kernel: [  120.140000] wlan0: authenticated
Feb  6 18:22:27 Arduino kern.info kernel: [  120.150000] wlan0: associate with f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:22:27 Arduino kern.info kernel: [  120.160000] wlan0: RX AssocResp from f4:ca:e5:c6:9f:bc (capab=0x411 status=0 aid=4)
Feb  6 18:22:27 Arduino kern.info kernel: [  120.170000] wlan0: associated
Feb  6 18:22:30 Arduino kern.info kernel: [  123.270000] wlan0: deauthenticated from f4:ca:e5:c6:9f:bc (Reason: 2)
Feb  6 18:22:51 Arduino kern.info kernel: [  144.050000] wlan0: authenticate with f4:ca:e5:c6:9f:bc
Feb  6 18:22:51 Arduino kern.info kernel: [  144.110000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:22:51 Arduino kern.info kernel: [  144.130000] wlan0: authenticated
Feb  6 18:22:51 Arduino kern.info kernel: [  144.150000] wlan0: associate with f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:22:51 Arduino kern.info kernel: [  144.240000] wlan0: associate with f4:ca:e5:c6:9f:bc (try 2/3)
Feb  6 18:22:51 Arduino kern.info kernel: [  144.270000] wlan0: RX AssocResp from f4:ca:e5:c6:9f:bc (capab=0x411 status=0 aid=4)
Feb  6 18:22:51 Arduino kern.info kernel: [  144.280000] wlan0: associated
Feb  6 18:22:54 Arduino kern.info kernel: [  147.380000] wlan0: deauthenticated from f4:ca:e5:c6:9f:bc (Reason: 2)

The deauthenticate/authenticate loop continues until I connect the ethernet cable and then:

Feb  6 18:23:59 Arduino kern.info kernel: [  212.120000] eth1: link up (100Mbps/Full duplex)
Feb  6 18:23:59 Arduino daemon.notice netifd: wan (781): Sending select for 192.168.0.27...
Feb  6 18:24:01 Arduino daemon.notice netifd: wan (781): Lease of 192.168.0.27 obtained, lease time 43200
Feb  6 18:24:01 Arduino daemon.info avahi-daemon[1463]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.0.27.
Feb  6 18:24:01 Arduino daemon.info avahi-daemon[1463]: New relevant interface eth1.IPv4 for mDNS.
Feb  6 18:24:01 Arduino daemon.info avahi-daemon[1463]: Registering new address record for 192.168.0.27 on eth1.IPv4.
Feb  6 18:24:01 Arduino daemon.notice netifd: Interface 'wan' is now up
Feb  6 18:24:02 Arduino user.info firewall: adding wan (eth1) to zone wan
Feb  6 18:24:04 Arduino kern.info kernel: [  217.320000] wlan0: authenticate with f4:ca:e5:c6:9f:bc
Feb  6 18:24:04 Arduino kern.info kernel: [  217.380000] wlan0: send auth to f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:24:04 Arduino kern.info kernel: [  217.390000] wlan0: authenticated
Feb  6 18:24:04 Arduino kern.info kernel: [  217.400000] wlan0: associate with f4:ca:e5:c6:9f:bc (try 1/3)
Feb  6 18:24:04 Arduino kern.info kernel: [  217.410000] wlan0: RX AssocResp from f4:ca:e5:c6:9f:bc (capab=0x411 status=0 aid=4)
Feb  6 18:24:04 Arduino kern.info kernel: [  217.420000] wlan0: associated
Feb  6 18:24:04 Arduino daemon.info dnsmasq[1457]: reading /tmp/resolv.conf.auto
Feb  6 18:24:04 Arduino daemon.info dnsmasq[1457]: using nameserver 192.168.0.138#53
Feb  6 18:24:04 Arduino daemon.info dnsmasq[1457]: using local addresses only for domain lan
Feb  6 18:24:05 Arduino daemon.notice netifd: lan (1205): Sending select for 192.168.0.86...
Feb  6 18:24:05 Arduino daemon.notice netifd: lan (1205): Lease of 192.168.0.86 obtained, lease time 43200
Feb  6 18:24:05 Arduino daemon.info avahi-daemon[1463]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.86.
Feb  6 18:24:05 Arduino daemon.info avahi-daemon[1463]: New relevant interface wlan0.IPv4 for mDNS.
Feb  6 18:24:05 Arduino daemon.info avahi-daemon[1463]: Registering new address record for 192.168.0.86 on wlan0.IPv4.
Feb  6 18:24:05 Arduino daemon.notice netifd: Interface 'lan' is now up
Feb  6 18:24:06 Arduino user.info firewall: adding lan (wlan0) to zone lan

And after that both the wifi and the ethernet connection stay up, if I disconnect the ethernet interface now the wifi also stays up.

And it gets even weirder: when it fails to connect to the wifi (or fails to stay connected), if I disconnect the usb and reconnect it back to my macbook it still won't come up until I connect the ethernet cable.

I am completely lost here, any ideas of what could be happening ?

Ps: After doing more tests the results is that when connected to my PC usb port the wifi sometimes goes up and sometimes not, I still have no idea what is going on as it makes no sense to me...

http://forum.arduino.cc/index.php?topic=188101.msg1594272#msg1594272

Thanks but that’s not my problem, the wifi network works fine.
I noticed this morning that the Yun seems to work better when not near my pc case… how good (or bad in my case) is the wifi reception since as far as i can see there is no antenna on the Yun ?

Just moving the Yun around seems to make a clear difference in whether it stays connected or not.

http://forum.arduino.cc/index.php?topic=188976.msg1580756#msg1580756

Thanks this one is far more useful ;) I guess I need to keep the yun far from anything which might create interference... At this price the Yun should have an antenna in its package.