Blog Image

Arduino blog

Arduino thinkering

This blog is about things I come by related to Arduino which I feel are inspiring/important/funny enough to write about.

A second look at the yun.

Arduino sketch experiances Posted on Tue, September 17, 2013 15:14:29

In my previous post I stated I had to plug the yun in and out a couple of times on windows to get it to work. I didn’t go into the details and I guess I should. So here I go.

I plugged in the yun and then started to download the arduino ide. Because I had plugged in the yun Windows wanted to install drivers.
I opted to keep the driver installation window open until the arduino IDE installation was done because I need 1.5.4 installed for the yun drivers. I started the Arduino IDE installation as soon as it had downloaded.
The installation halted at some point (I mean there was no more progress) which made me suspect that there was a conflict with the driver installation window being open. I opted to close the driver installation window. This means I canceled the windows new hardware installation.
At this point the Arduino IDE installation progressed and finished a while later.
To restart the driver installation of the yun I had to unplug the yun and replug.
This restarted the found new hardware and installed the yun driver. I use yun driver in contrast to the yun bootloader driver. Just like the leonardo there are 2 com ports. In contrast to the leonardo a cold start of the yun does not activate the yun bootloader com port and as such the cold start does not install the yun bootloader driver.
So when I wanted to upload my sketch the yun is reset and windows finds new hardware and wants to install the yun bootloader drivers.
Not really aware of what was going on I selected to cancel the driver installation. I don’t exactly remember what avr dude did at that time but I decided to unplug the yun to get back to normal behavior.
Then I tried to upload again. Again I got a “new hardware found” and this time I decided to install the drivers. However avrdude didn’t take this good as well. So after the driver installation I had to unplug the yun again to get back to normal.
But then all was fine.
In the yun guide at “” it states that the drivers should be installed but apparently in my case they were not. I’m not blaming anyone I just noticed they were not.
The yun doc also states that the bootloader is started when pressing the reset button next to the ethernet connection. I could not try whether this works as I already installed the drivers.

In my previous post I also noted that minicom package was not available for the yun. However it is available. After selecting “update list” from the web interface I could install minicom.

2 yuns at the same time.
Todays first challenge is to get the 2 yuns working at the same time.
Eager to connect 2 yuns I start looking for a usb cable which I know I have. After looking for a long time I come across a mobile phone charger and I think: “He; this should do”.
So I power the yun with a mobile phone charger with mini USB. Remove all network connections from my system. Connect to the yun access point. and go to arduino.local. And it all works :-). After configuring the yun and reconnecting to my network I can access my yun with [myYunName].local.
No connection problems and 2 com IP ports for the 2 yuns in the arduino IDE.
I upload blinkwithout delay with a 5 second interval. It all magically works. This is the first Arduino I upload a sketch to which I never connected to a PC.
Great work Arduino team 🙂

Connect an arduino mega to the yun.

The second challenge is to connect an extra arduino to the yun. This is what i would call advanced usage.
I took a duemilenove that has the uno bootloader for the first trial. (Read the duemilenove was lying next to me.)
I connected it to the usb port of the yun and it powered up. So far so good.
However dmesg reveils there is no com port associated with the arduino.
[ 2325.260000] usb 1-1.1: new full-speed USB device number 5 using ehci-platform
[ 2325.390000] usb 1-1.1: New USB device found, idVendor=0403, idProduct=6001
[ 2325.390000] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2325.400000] usb 1-1.1: Product: FT232R USB UART
[ 2325.400000] usb 1-1.1: Manufacturer: FTDI
[ 2325.400000] usb 1-1.1: SerialNumber: A9007TX5

Trying to add a udev rule shows there is no udev folder in etc. So I installed the udev package (I used the web interface).
Reconnecting the duemilenove and dmesg gives the same result.
I created the file /etc/udev/rules.d/46-arduino.rules with following content (as described on the playground
BUS==”usb”, SYSFS{idVendor}==”1b4f”, SYSFS{idProduct}==”9204″, RUN+=”/sbin/modprobe cdc_acm”
BUS==”usb”, SYSFS{idVendor}==”1b4f”, SYSFS{idProduct}==”9204″, RUN+=”/bin/sh -c ‘echo 0x1b4f 0x9204 > /sys/bus/usb/drivers/cdc_acm/new_id'”

i disconnect and reconnect the duemilenove but nothing changes.
I check the file /sys/bus/usb/drivers/cdc_acm/new_id and see it does not exist.
even the folder cdc_acm does not exist. When I try to create it I get
root@testyun:/etc/udev/rules.d# mkdir /sys/bus/usb/drivers/cdc_acm
mkdir: can’t create directory ‘/sys/bus/usb/drivers/cdc_acm’: No such file or directory

I think I’m out of my depth and need forum help smiley.
To be continued

A first look at the yun

Arduino sketch experiances Posted on Tue, September 17, 2013 01:05:49

Today my yuns arrived. It is late but I want to get it a feel of it. So this will be a short first impression.

I downloaded and installed Arduino IDE 1.5.4 on my system beforehand so I start with plugging in the yun and …. no com port.
OK; I never got the leonardo to work on my linux (redhat 6.4 ) so I can’t blame the yun for that.
Switching to windows XP virtual machine means downloading the 1.5.4 (again). I picked the uninstallable package.
During the download I can read up from

I read that starting the yun for the first time makes it work like a wireless access-point. So I try this; I could not connect the first time. The second time It worked. Once connected nothing happens. What url to use when I fire up a browser?
The description (till now?) didn’t show a url or ip adress. running ifconfig in a terminal (ipconfig for windows people) showed my ipadress. Changing the last number to 1 and we can point the browser to the yun using

And there; I am requested to enter a password. I don’t have a clue.
More reading to be done 🙁 (Advice to arduino team: move the connection stuff more to the top of the article)
And more reading reveals the url should be http://arduino.local but the ip is fine as well. The password is arduino (why didn’t I guess this?).

The yun needs a really long time after I pressed login.
Which is normal as I disconnected the yun as the installation on my windows VM seemed to be blocked (and it did continue after unplugging) 🙁

So plugging the yun back in; reconnected to the yun wireless interface.
Configured the yun and hurray!!! I can access the yun remotely 🙂
After pressing configure there is an advanced configuration that is powered by luci. This means LUA is running on the yun smiley. I have some LUA scripts so this is good news for me.

In the advanced configuration I can see that avrdude is installed 🙂 and there is still 7.14MB free. This together with the sd card makes a whole lot of storage. It looks like yun will meet my expectations 🙂
Looking through the packages I see that minicom is not one of the installed packages and also not in the available list.
I’m used to running minicom (a serial monitor) on openwrt but that package is not available. There is probably something else.

Lets try to connect to the yun in linux over the network (overcoming that Leonardo is not working on my linux)
But this one fails.
The port is visible on my windows VM though.
After unplugging the yun a couple of times trying to get the 2 drivers properly installed I can upload using the local com port on my windows xp vm. Uploading through the networks works immediately. smiley
Looking at the yun forum at I see that UDP remote port 5353 is needed. Adding this rule to my firewall on my Linux system makes I can upload to the yun remotely from my Linux system.

The first impressions are really good. I say : Very well done Arduino team.
Tomorrow I want to try
2 yuns at the same time
Connect an arduino mega to a yun
Upload my robot scripts and make it work
Lets hope it all works.