Had to punt on Yun Wifi for the moment

Trying to use the Yun as quick-and-dirty emulators of a hardware device for which I'm developing software. The "real" devices have a command line that is accessible over USB/CDC as well as TCP. The Yun seemed a perfect fit, and indeed I was able to cobble together a simple PHP script that is accessible via Bridge as well as incoming TCP connections.

But wow, I was having a nightmare of a time keeping them up and running (I have four on the air now). Couldn't figure out what the deal was---for quite awhile thought maybe it was power But even being powered via a 5V/1A wallwart on Vin they would just disappear, or worse, never show up at all once the white "ready" light was active. Quite often the ready light would go out and I'd have to hit the reset button for the Linux side to make it come back.

So my hail-mary pass was to disable Wifi and just go wired ethernet. Wow. Totally different. Even on SSH I would have stutters and stops, never mind my custom software, but all that went away when switched to CAT5.

I have two Cisco/Linksys WAP4410N access points using WPA2. One of which is in the room below this one, so it shouldn't be a signal issue. Pretty much every other wifi device I own doesn't have problems hold a signal anywhere in the house.

At the moment I'm in a frenzy trying to get my primary task accomplished, but thought if there was anything obvious that warrants comment I'd throw this post out there.

Two days now and still humming along on CAT5. Glad to be able to move past this to the "real" work, but still scratching my head as to why wifi was such a no-go in my environment.

sonnyyu:
To confirm wifi Signal level:
at linino console;-

/usr/bin/pretty-wifi-info.lua

where give you wifi info

Current WiFi configuration

SSID: TP-LINK_2.4GHz
Mode: Client
Signal: 100%
Encryption method: WPA PSK (CCMP)
Interface name: wlan0
Active for: 28 minutes
IP address: 192.168.0.103/255.255.255.0
MAC address: 90:A2:DA:F0:06:76
RX/TX: 914/268 KBs



or you could use Arduino IDE, at Example->Bridge->WiFiStatus upload Sketch then open serial monitor to view.

Signal: 100% will be perfect. if Signal is low you will have problem.

rfd_arduino:
...
Pretty much every other wifi device I own doesn't have problems hold a signal anywhere in the house.
...

sonnyyu:
On board chip antenna has average Gain -0.5 dBi v.s. typical antenna Gain of wifi device ~4 dBi
Yun's transmit power is only 17 dBm v.s. typical Gain wifi device transmit power 27~30 dBm
...

To find out best Channel to use you could use android phone/pad by play store download Application wifi Analyzer(put android device next to Yun for best result) .

from above the Channel 8 is best bet. (Ensure you select a correct country to conform local law. Incorrect settings may cause interference.)

sonnyyu:
FYI;-

People make 2 Openwrt base AR9331 with high gain antenna nodes on 1 mile distance wells communications.

Just Give Me Antenna and I'll Show You the World!

rfd_arduino does your project involve power hungry devices (motors for example). Is so, the yun may no be able to supply sufficient power to the wifi interface

The motors could be big trouble maker!

sonnyyu:
The RF interference can couple into other portions of the circuit and cause circuit malfunction and performance degradation. If your project uses RF data link for instance, the motor induced RF noise can significantly decrease the usable RF range.

A Short Guide On Motor Electrical Noise Reduction – Kerry D. Wong

A Short Guide On Motor Electrical Noise Reduction.

Solutions;-

  1. Put Yun into metal box, wire cable to directional antenna, point it to opposite of motor.

Mystery component on Yun board? - #11 by sonnyyu - Arduino Yún - Arduino Forum

  1. make have good low-pass filter to remove RF signal from power supply.

Again, Just Give Me Antenna and I'll Show You the World!

Nope, there's zero attached to it. The only use I'm getting out of the Arduino side of it is the fact that it supplies CDC out of the box which can be easily tunneled via Bridge to my PHP script which emulates a production device.

My bench supply measured between 220-300ma during bootup and steady-state operation. With a 5V/1A wallwart (and using CAT5) I'm able to supply three Yun's via Vin and they have been running stable all week.

got it. What is /usr/bin/pretty-wifi-info.lua's output? and channel spectrum?
The less neighbours, The better is.

sonnyyu:
got it. What is /usr/bin/pretty-wifi-info.lua's output? and channel spectrum?
The less neighbours, The better is.

Well, when I'm not under pressure to get the "actual" work done, I'll pursue the wifi difficulties. Until then I have wifi turned off and hence there are no diagnostics available right now.