Arduino blog

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 experiancesPosted by Jan 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 "http://arduino.cc/en/Guide/ArduinoYun#toc11" 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 http://playground.arduino.cc//Linux/All)
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



  • Comments(0)//blog.baeyens.it/#post10