Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm working on a project with an ATmega1280 (Atmel) board. I want to take a look at the stack, so I'm trying to do an OCD (On Chip Debugging). In the tutorial is written:

Use this AVRDUDE command to program the fuses on the ATMega1280 to enable OCD and JTAG:

avrdude -P <port> -c <programmer> -p m1280 -U hfuse:w:0x1a:m -v

Replace port with the port to which your programmer is connected, and programmer with the programmer type.

At this point, my question is: How can I know the port of the usb in kubuntu?

share|improve this question
    
usbview provides technical info on the usb controllers/hubs: see my answer for this question –  user76204 Feb 14 '13 at 18:02

1 Answer 1

I usually list the files in /dev, plug in the device, list the files in /dev again, and look to see which special file appeared. You could also redirect the output of each listing to two different files and use diff to show you which special file appeared when you plugged in the device:

ls /dev > notplugged
# plug in device
ls /dev > plugged
diff notplugged plugged

Once you know what file corresponds to the device (it's usually something like /dev/ttyUSB0), you just use that file in place of <port>.

Edit: Apparently dmesg can tell you which device file corresponds to your device. Run dmesg | grep tty after plugging in your device. The device file should be apparent in one of the lines.

share|improve this answer
    
Thank you for the answer it was useful! Yes, it is usually /dev/ttyusb0, but there isn't in my pc. When I do 'ls /dev' the file notplugged and plugged are the same. –  DarkCoffee Feb 14 '13 at 18:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.