Pages: [1]   Go Down
Author Topic: Yun serial port via USB?  (Read 1011 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I have an Arduino and having a very hard time to make the Serial interface (to my computer) work. From what I read, it should be a trifle, or obvious: just "upload your sketch via USB (not over WiFi)", or "select the proper port (COM or /dev/tty...) from the Port menu" and you're done. My problem is that I don't have listed any serial port on the ARduino IDE Tools | Port, just the <MyArduino> at 192.168.1.86 .... No /dev/tty.. I am using Linux (Ubuntu 13.04). What is wrong?
From the hardware point of view, I suppose it is enough to connect the Yun to my laptop through a micro-USB cable (thus powering it as well). This is what I get written in syslog:

Dec 28 11:54:29 zsoltpad kernel: [15720.679966] usb 3-2: new full-speed USB device number 25 using xhci_hcd
Dec 28 11:54:29 zsoltpad kernel: [15720.698877] usb 3-2: New USB device found, idVendor=2341, idProduct=8041
Dec 28 11:54:29 zsoltpad kernel: [15720.698889] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 28 11:54:29 zsoltpad kernel: [15720.698895] usb 3-2: Product: Arduino Yun
Dec 28 11:54:29 zsoltpad kernel: [15720.698899] usb 3-2: Manufacturer: Arduino LLC
Dec 28 11:54:29 zsoltpad kernel: [15720.699648] cdc_acm 3-2:1.0: This device cannot do calls on its own. It is not a modem.
Dec 28 11:54:29 zsoltpad kernel: [15720.699733] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
Dec 28 11:54:29 zsoltpad kernel: [15720.702501] input: Arduino LLC Arduino Yun as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2/input/input32
Dec 28 11:54:29 zsoltpad kernel: [15720.702799] hid-generic 0003:2341:8041.0017: input,hidraw4: USB HID v1.01 Mouse [Arduino LLC Arduino Yun] on usb-0000:00:14.0-2/input2
Dec 28 11:54:29 zsoltpad mtp-probe: checking bus 3, device 25: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Dec 28 11:54:29 zsoltpad mtp-probe: bus: 3, device: 25 was not an MTP device

Any help will be much appreciated. Thanks!

Zsolt
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Finally I found a solution to the problem. First of all, the permissions for /dev/ttyACM0 were not all right. The system created them with 'crw-rw---- 1 root dialout', which is all right if you are in the 'dialout' group. I was not, so I had to add my user to that group.

After this, /dev/ttyACM0 appeared under Ports in the IDE, but still could not upload the sketch through it. Now it seems that the Linino hadn't got the required drivers. This could be installed by running

opkg install kmod-usb-acm

in an ssh session. This solved the problem, and the sketch in 'Yún Serial Terminal' started working.

Hopefully this will help others who want to use the Serial interface on Yun. It might be useful to signal the developers the missing package - maybe it's in the distribution already, just I am not sure how to update it.

Cheers,

Zsolt
Logged

Nashville Tennessee, USA
Offline Offline
Sr. Member
****
Karma: 15
Posts: 366
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the permissions on /dev/tty* are a gotcha on Ubuntu, I think it is buried somewhere in the instructions, it has been a while, I didn't remember it until you pointed it out.

 Installing kmod-usb-acm should let linino see another arduino or other  ACM device plugged into the USB host port on the Yun but shouldn't have anything to do with your Ubuntu host finding it. Did you reboot your Ubuntu box in there somewhere?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You were right, after a reboot the Yun was found and the Serial things worked with the sketches and the IDE, even without the kmod-usb-acm package.

Cheers,
Zsolt
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1139
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, when you add yourself to a group, that change won't take effect until you login again. On Ubuntu, instead of rebooting, you can "end current session" (or something like that) and log in again
Logged

Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

Pages: [1]   Go Up
Jump to: