Go Down

Topic: [SOLVED] Arduino UNO, Gentoo Linux AMD64, "Inappropriate ioctl for device" (Read 2503 times) previous topic - next topic

Hello,
I have just received my Arduino today, and I almost have it all working.
I am not using the Java IDE since I like using Makefiles instead to keep things more organized.
I've build the AVR toolchain using crossdev, and I have a Makefile building the hex file without any errors.
My only problem is when uploading the hex file.

The parameters being passed to avrdude during upload.
Code: [Select]

/usr/bin/avrdude -q -V -p atmega328p -C /etc/avrdude.conf -c stk500v1 -b 19200 -P /dev/bus/usb/004/001 \
                       -U flash:w:build-cli/helloworld.hex:i
avrdude: ser_open(): can't set attributes for device "/dev/bus/usb/004/001": Inappropriate ioctl for device
make: *** [raw_upload] Error 1


dmesg output when connecting the UNO.
Code: [Select]

[ 2395.594907] hub 1-0:1.0: state 7 ports 8 chg 0000 evt 0020
[ 2395.594926] ehci_hcd 0000:00:1d.7: GetStatus port 5 status 001803 POWER sig=j CSC CONNECT
[ 2395.594942] hub 1-0:1.0: port 5, status 0501, change 0001, 480 Mb/s
[ 2395.698024] hub 1-0:1.0: debounce: port 5: total 100ms stable 100ms status 0x501
[ 2395.749295] ehci_hcd 0000:00:1d.7: port 5 full speed --> companion
[ 2395.749305] ehci_hcd 0000:00:1d.7: GetStatus port 5 status 003801 POWER OWNER sig=j CONNECT
[ 2395.749316] hub 1-0:1.0: port 5 not reset yet, waiting 50ms
[ 2395.749325] usb usb4: wakeup_rh (auto-start)
[ 2395.800024] ehci_hcd 0000:00:1d.7: GetStatus port 5 status 003002 POWER OWNER sig=se0 CSC
[ 2395.800055] hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0002
[ 2395.800067] uhci_hcd 0000:00:1d.2: port 1 portsc 0093,00
[ 2395.800078] hub 4-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
[ 2395.904030] hub 4-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
[ 2396.007024] usb 4-1: new full speed USB device using uhci_hcd and address 5
[ 2396.128020] usb 4-1: ep0 maxpacket = 8
[ 2396.152228] usb 4-1: skipped 3 descriptors after interface
[ 2396.158214] usb 4-1: default language 0x0409
[ 2396.190206] usb 4-1: udev 5, busnum 4, minor = 388
[ 2396.190213] usb 4-1: New USB device found, idVendor=2341, idProduct=0001
[ 2396.190219] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 2396.190225] usb 4-1: Product: Arduino Uno
[ 2396.190230] usb 4-1: Manufacturer: Arduino (www.arduino.cc)
[ 2396.190235] usb 4-1: SerialNumber: 74839373933351409071
[ 2396.190398] usb 4-1: usb_probe_device
[ 2396.190408] usb 4-1: configuration #1 chosen from 1 choice
[ 2396.193224] usb 4-1: adding 4-1:1.0 (config #1, interface 0)
[ 2396.193384] usb 4-1: adding 4-1:1.1 (config #1, interface 1)
[ 2396.193564] drivers/usb/core/inode.c: creating file '005'
[ 2396.193624] hub 1-0:1.0: state 7 ports 8 chg 0000 evt 0020


I have a feeling I need to do something with udev, but I'm not sure what.
Has anyone else experienced this same error?

madworm

There doesn't seem to be a driver associated with the usb port, and you're trying to have avrdude talk to the raw usb device. As I don't have an uno, I unfortunately can't tell you what the kernel should spit out.

http://arduino.cc/playground/Linux/All
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

erichax

On my Ubuntu system, the Arduino Uno is listed as /dev/ttyACM0, think this should apply for all distros. Have you tried using -P /dev/ttyACM0 ?

That was the issue! I just compiled the right driver and it made a /dev/ttyACM0 for me. Everything works now. Thanks!


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy