Go Down

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

sonnyyu

#15
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)

http://forum.arduino.cc/index.php?topic=203676.msg1503265#msg1503265





sonnyyu

To confirm wifi Signal level:
at linino console;-

Code: [Select]
/usr/bin/pretty-wifi-info.lua

where give you wifi info

Code: [Select]
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.




sonnyyu

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.





sonnyyu

#18
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

sonnyyu

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]
#wifi-live-or-reset
exit 0






sonnyyu

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]
#!/bin/sh

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.

anjoze

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

sonnyyu

Plan A/Using linino:

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

Code: [Select]
#!/bin/sh

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:

https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/what-is-a-bootloader

sonnyyu

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. ;)


sonnyyu

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

sonnyyu

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



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

sonnyyu

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



http://en.wikipedia.org/wiki/Wireless_access_point

http://thewirecutter.com/reviews/best-wi-fi-extender/

http://wi-fi-booster-review.toptenreviews.com/







anjoze

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]
/usr/bin/run-avrdude
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]
/etc/arduino/Caterina-Yun.hex
-ash: /etc/arduino/Caterina-Yun.hex: Permission denied

sonnyyu

run

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

in one line.

anjoze

Yes, I tried it and gives the same error message

Go Up