Go Down

Topic: Seeing Yun in IDE Port menu (Read 64788 times) previous topic - next topic


Feb 07, 2014, 03:57 pm Last Edit: Feb 07, 2014, 04:01 pm by sonnyyu Reason: 1
First test the system with ethernet connection. If it works then wifi is the problem.
Second since Yun use Wifi 2.4 Ghz, it could be very crowd, use android phone/pad  by play store download application wifi Analyzer. Then find out unuse channel switch to. ( at your router)



To confirm wifi Signal level:
at linino console;-

Code: [Select]

where give you wifi info

Code: [Select]
Current WiFi configuration
Mode: Client
Signal: 100%
Encryption method: WPA PSK (CCMP)
Interface name: wlan0
Active for: 28 minutes
IP address:
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.


Sometime you will have difficulty to access Arduino via "http://arduino.local/" even Arduino is working fine at ip address.  in other word you could access Arduino via http://ipaddressofarduino/.  To find out ipaddressofarduino:

Using  android phone/pad  via play store download application Bonjour Browser. It will give you Arduino IP address.


Feb 14, 2014, 10:50 pm Last Edit: Feb 14, 2014, 10:56 pm by sonnyyu Reason: 1
An other way to get ip address of Ethernet via arduino ATmega32u4 sketch.

Arduino IDE->Examples->Bridge->YunSerialTernimal, upload it to ATmega32u4, open Arduino  IDE-> Tools->Serial Monitor, then type "~2" ( without quotation marks) , You will get Linino console. type "ifconfig"  ( without quotation marks) to get all the ip address.

To reset Yun back  to factory default,    type "/usr/bin/reset-to-factory-anyway" ( without quotation marks). at Serial Monitor


During Wifi setup stage the wifi Signal level might not be stabilize. Disable wifi-live-or-reset  might help.

Code: [Select]
nano /etc/rc.local

Code: [Select]
exit 0


Some 32u4 USB port is missing, here is the reason:
The 32u4 at Yun creates a serial instance whenever it runs its bootloader. The board is an instance of USB's Connected Device Class (CDC) driver. if bootloader is missing then USB port is gone.

Here is solution:

You need reflash correct bootloader.

nano /usr/bin/run-avrdude
Change the efuse value from FB to CB

Code: [Select]

echo 1 > /sys/class/gpio/gpio21/value
avrdude -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m -Uflash:w:$1:i $2
echo 0 > /sys/class/gpio/gpio21/value

1. flash bootloader only
Code: [Select]
/usr/bin/run-avrdude    /etc/arduino/Caterina-Yun.hex

2. flash  sketch only ( save memory)
Code: [Select]
/usr/bin/run-avrdude    /tmp/Blink.cpp.hex

3.  flash  sketch+bootloader  
Code: [Select]
cd /tmp
/usr/bin/merge-sketch-with-bootloader.lua  /tmp/Blink.cpp.hex
/usr/bin/run-avrdude    /tmp/Blink.cpp.hex

Blink.cpp.hex  's size is  14450, the new Blink.cpp.hex after merge is 25372. Blink.cpp.hex is from blink example.

1. flash bootloader only will do trick.


Can you please give more detailed instructions to flash bootloader only?
Thank you.


Plan A/Using linino:

Change the efuse value from FB to CB
Code: [Select]
nano /usr/bin/run-avrdude

Code: [Select]

echo 1 > /sys/class/gpio/gpio21/value
avrdude -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:[color=red][b]0xCB[/b][/color]:m -Uflash:w:$1:i $2
echo 0 > /sys/class/gpio/gpio21/value

flash bootloader only

Code: [Select]
/usr/bin/run-avrdude    /etc/arduino/Caterina-Yun.hex

Plan B/using an external programmer:



For new install system only! make sure Yun show up at COM & LPT.

If it is not there then install the driver.

i just looked it up on google
code 28 mean the drivers are not installed meaning the drivers did not install during setup
heres what you do

1.go to contorl panel -> system and secrity -> under system there is Device manager Click it
2. under other devices there maybe two or more devices without drivers for the arduino there is only one device
its a serual port i think i can't remember the name of it anyways
3. right click the device that you've want to install the driver -> properites -> driver tab -> update driver -> browse my computer manualy -> let me pick the driver -> click have disk -> browse
4. browse the install dir
for 64-bit it maybe in %systemdrive%/program files/arduino/drivers/arduino.inf or in %systemdrive%/program files(x86)/arduino/drivers/arduino.ini
5. click arduino.inf(arduino) and press ok and ok then chose your arduino type and then press next
6. it will install the driver without error
if it has an error post the error code to the forum
7.no error then your done!

Some time you might need disable windows driver signature enforcement at windows 8 or later.  I wish in future Arduino team sign the digital signature on driver. ;)


Understanding Wifi Signal Strength:
Wireless signal strength is traditionally measured in either percentile or dBm (the power ratio in decibels of the measured power referenced to one milliwatt.)  The level of 100% is equivalent to the signal level of -35 dBm and higher, e.g. both -25 dBm and -15 dBm will be shown as 100%, because this level of signal is very high. The level of 1% is equivalent to the signal level of -95 dBm. Between -95 dBm and -35 dBm, the percentage scale is linear, i.e. 50% is equivalent to -65 dBm.

Get Wireless signal strength in dBm at Yun:

Code: [Select]
iwconfig 2>&1 | grep 'Signal level'
Link Quality=70/70  Signal level=-37 dBm


A lot of unstable Wifi connection is related with Wifi Signal Strength, say Signal Strength is 50%/-65 dBm, to make Signal Strength -35 dBm all you need is either one  30 dBi antenna  at Yun or at Router, or even 15 dBi antenna  at Yun  plus 15 dBi antenna  at Router.

The reason external antenna is needed is:

  • On board chip antenna has average Gain  -0.5 dBi  

  • Yun's  transmit power is only 17 dBm.

  • Yun is siting at metal case.

  • The distance between Yun and WIFI router is far



The method  to boost  wifi signal strength:

  • Ethernet to Your Second Wifi Access Point

  • MoCA (Coaxial) to Ethernet conversion and Access Point

  • Powerline Ethernet and Access Point

  • Wi-Fi Extender/Reater





Thanks for your help but I think my Yún is broken...
It should detect something when I connect it to Windows, but no.
Probably is the Micro USB connector that doesnt work.

When I run:
Code: [Select]
The output is:
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
avrdude done.  Thank you.

Code: [Select]
-ash: /etc/arduino/Caterina-Yun.hex: Permission denied



Code: [Select]
/usr/bin/run-avrdude    /etc/arduino/Caterina-Yun.hex

in one line.


Yes, I tried it and gives the same error message

Go Up