I'm trying to set up everything to make some projects using Atmega microcontroller. The problem starts when I'm trying to flash compiled program to microcontroller because I need to specify port on which my USBasp is connected. The command goes like this, for example.
avrdude -c usbasp -p m32 -P /dev/ttyUSB0 -b 19200 -U flash:w:led.hex
This -P
parameter which is port should look something like this /dev/ttyUSB0
, but there is nothing like that in the /dev
directory.

What is even worse is that when I plug in or unplug my USBasp programmer nothing at all changes when I list everything in /dev
using ls
command. If I unplug my mouse for example and plug it in again every time ls
command reacts to changes, but nothing at all with my USBasp programmer.

I don't think that its broken coz other commands do recognize it for example lsusb

I have tried everything Google throws at me, but I just cant seem to find this port to specify when writing data using programmer. I'm using Ubuntu 22.04.
When I run sudo journalctl --follow
device is getting recognized and I'm getting this information, but it doesn't do anything good because it doesn't give me this path /dev/ttyUSB*
or something similar.

When I run ls -1 /dev >dev.before
and ls -1 /dev >dev.after
there were absolutely 0 difference between those files.
When I'm running this command udevadm monitor --property
and adding programmer I'm getting this text that repeats itself with little differences 3 times.
UDEV [1624.578178] add
/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0 (usb) ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0
SUBSYSTEM=usb DEVTYPE=usb_interface PRODUCT=16c0/5dc/102 TYPE=255/0/0
INTERFACE=0/0/0
MODALIAS=usb:v16C0p05DCd0102dcFFdsc00dp00ic00isc00ip00in00 SEQNUM=3937
USEC_INITIALIZED=1624577910 ID_USB_CLASS_FROM_DATABASE=Vendor Specific
Class ID_VENDOR_FROM_DATABASE=Van Ooijen Technische Informatica
ID_MODEL_FROM_DATABASE=shared ID for use with libusb
ID_PATH=pci-0000:00:14.0-usb-0:2:1.0
ID_PATH_TAG=pci-0000_00_14_0-usb-0_2_1_0
UDEV [1624.585799] bind /devices/pci0000:00/0000:00:14.0/usb1/1-2
(usb) ACTION=bind DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-2
SUBSYSTEM=usb DEVNAME=/dev/bus/usb/001/021 DEVTYPE=usb_device
DRIVER=usb PRODUCT=16c0/5dc/102 TYPE=255/0/0 BUSNUM=001 DEVNUM=021
SEQNUM=3938 USEC_INITIALIZED=1624574304 ID_VENDOR=www.fischl.de
ID_VENDOR_ENC=www.fischl.de ID_VENDOR_ID=16c0 ID_MODEL=USBasp
ID_MODEL_ENC=USBasp ID_MODEL_ID=05dc ID_REVISION=0102
ID_SERIAL=www.fischl.de_USBasp ID_BUS=usb ID_VENDOR_FROM_DATABASE=Van
Ooijen Technische Informatica ID_MODEL_FROM_DATABASE=shared ID for use
with libusb ID_PATH=pci-0000:00:14.0-usb-0:2
ID_PATH_TAG=pci-0000_00_14_0-usb-0_2
ID_FOR_SEAT=usb-pci-0000_00_14_0-usb-0_2 MAJOR=189 MINOR=20
TAGS=:uaccess:seat: CURRENT_TAGS=:seat:
I was hoping that DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0
this could be the "port", but there is no such a thing as , /devices
directory.
I used avrdude -P usb
to specify port and it worked. I'm glad it does, but still would be interesting to know why I couldn't find the port path for this controller. I found the answer in this question.