3

I am trying to find the name of the second USB port in my computer in the director /dev/ since I am trying to find where my AVR micro-controller programmer location to execute this command: avrdude -p t85 -P directoryWhereProgrammerIs -c avrispmkII -e -U flash:w:src.hex. Any suggestions? Thanks!

0101011
  • 177
  • 1
    Disconnect the device, then run tail -f /var/log/kern.log and reconnect it and there should be some useful output. You could also use lsusb, which should give some information on the device. –  Apr 30 '13 at 00:45
  • 1
    A similar question here might help; the device node should be /dev/ttyUSB0 or similar; grepping dmesg or /var/log/kern.log will tell you. –  Apr 30 '13 at 10:21

3 Answers3

1

you can run mount to get the list of all attached devices and their mount locations.

USBs are put under /media/<username> folder.

Bhavin Doshi
  • 2,466
  • I plugged my USB device in and there were no folders or files in the directory /media/... – 0101011 Apr 29 '13 at 22:45
  • what about the "mount" output? I am assuming that all this is done once you CAN actually open the USB via nautilus and see its contents from nautilus (so that we are sure that its auto-mounted by the system). Output of mount should contain a line for /dev/sdc1 – Bhavin Doshi Apr 30 '13 at 02:39
  • 3
    The device won't be listed under /media, as it is not that kind of block device. You need to know how the kernel is handling it and what device node it is assigning to the device; this can be found by either grepping /var/log/kern.log or dmesg. –  Apr 30 '13 at 10:17
1

Your are almost done

as long as I know avrdude doesn't need programmer directory and specifying programmer name is sufficient (assume that you already set avr model)

but finding usb drive become handy in working with UART and other similar protocol

You could do that by go to /dev directory disconnect device use ls to list files and then connect it again and repeat ls, you can use diff or other tool to determine your device

*note: most usb programmer use ttyUSB** as node name

pazel1374
  • 659
  • 6
  • 16
-1

You need :

sudo apt-get install usbmount

sudo apt-get install mc

mc

up

up

/media

You will see all you USB ports in this folder . (It look like MS-DOS)

And
  • 791
  • -1: Unclear. Please make more clear your question, format the code as code, explain it well and then ping me. If all is near to perfection I'll upvote. ;-) Thanks for your patience. – 0x2b3bfa0 Jul 02 '15 at 09:46