Author Topic: How to Select USB Port for AVRDUDESS in Linux  (Read 6343 times)

0 Members and 1 Guest are viewing this topic.

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: How to Select USB Port for AVRDUDESS in Linux
« Reply #25 on: July 29, 2021, 12:33:40 pm »
I have a programmer gizmo in hands still trying to figure what sort of driver I will need to enable COM with it...

IT DOES ENUMERATE .. fine as any USB gizmo XHCI can provide at least device IDs.

Code: [Select]
usb 1-1.2.4: new full-speed USB device number 9 using xhci_hcd
 usb 1-1.2.4: New USB device found, idVendor=1fc8, idProduct=310b, bcdDevice=
 usb 1-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 usb 1-1.2.4: Product: WinUSBComm
 usb 1-1.2.4: Manufacturer: [url=http://www.zhifengsoft.com]www.zhifengsoft.com[/url]

Nevertheless that crappy WinUSBComm is whatever it is.. no driver ready so far.

So even being enumerated I can not access the chip  :palm:

Paul
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7765
  • Country: de
  • A qualified hobbyist ;)
Re: How to Select USB Port for AVRDUDESS in Linux
« Reply #26 on: July 29, 2021, 01:57:44 pm »
To automatically set specific access rights create/edit /etc/udev/rules.d/99-local.rules and add something like:
Code: [Select]
# AVR Programmer directly
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", MODE="0660", GROUP="plugdev"
or
Code: [Select]
# AVR Programmer as tty
ACTION=="add", SUBSYSTEM=="tty", ATTR{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", MODE="0660", GROUP="plugdev"

The user should be a member of group 'plugdev' in this case. And replace xxxx and yyyy with the correct IDs.

If you like to create an alias device add:
Code: [Select]
... , SYMLINK+="My-AVR-Programmer"

That will create also /dev/My-AVR-Programmer each time the programmer is plugged in.


 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: How to Select USB Port for AVRDUDESS in Linux
« Reply #27 on: July 29, 2021, 11:50:47 pm »
Quote
your programmer is a USBASP-style programmer that enumerates as a HID device, If you select the correct programmer inf the "programmer" field  you should have a "usb" option in the PORT field
Well, that was an interesting theory I had, and describes the way that things work on Windows, but it doesn't seem to apply to linux.
I loaded up Mono and dudess on an Ubuntu system, and sure enough:  no choices other than the inappropriate serial ports.I'm not sure that I'd expect libusb raw access to HID devices to work through an emulator like Mono :-(

I think your best bet is to figure out how to use avrdude from the command line.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1209
  • Country: pl
Re: How to Select USB Port for AVRDUDESS in Linux
« Reply #28 on: July 30, 2021, 06:09:00 am »
I think your best bet is to figure out how to use avrdude from the command line.
Indeed, but three days after I suggested an avrdude invocation we still received no response. ¯\_(ツ)_/¯
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: How to Select USB Port for AVRDUDESS in Linux
« Reply #29 on: July 30, 2021, 01:05:59 pm »
Quote
your programmer is a USBASP-style programmer that enumerates as a HID device, If you select the correct programmer inf the "programmer" field  you should have a "usb" option in the PORT field
Well, that was an interesting theory I had, and describes the way that things work on Windows, but it doesn't seem to apply to linux.
I loaded up Mono and dudess on an Ubuntu system, and sure enough:  no choices other than the inappropriate serial ports.I'm not sure that I'd expect libusb raw access to HID devices to work through an emulator like Mono :-(

I think your best bet is to figure out how to use avrdude from the command line.


There seems to be 2 "classes" of different "invocations" for avrdude (attach)

The first most common one is the UART terminal related in which the proper driver "should" be automatic attached to the proper terminal (being ttyUSB or other)

The chipset driver should be loaded.. and ..NOT EVERY DISTRO out there uses UDEV...
All busybox images are free from UDEV..  so does Slackware and some others..

So rules are useless and the device should be carefully checked.

The other type of INVOCATION  related no UART chipset..
And that type is the type used by these programmer I am testing..

it is only attached to libusb and any appler should use libusb directly...

It "seems" that avrdude "could" do that one the address is recognized.

So far I have gone this far but still trying to read data...

Code: [Select]

 usb 1-1.2.4: new full-speed USB device number 9 using xhci_hcd
 usb 1-1.2.4: New USB device found, idVendor=1fc8, idProduct=310b, bcdDevice=
 usb 1-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 usb 1-1.2.4: Product: WinUSBComm
 usb 1-1.2.4: Manufacturer: [url=http://www.zhifengsoft.com]www.zhifengsoft.com[/url]

found USB  (vendor=0x1fc8 [www.zhifengsoft.com], product=0x310b [WinUSBComm]) at libusb:001:008


INVOCATION on this type relates port to the usb keyword.. and proper address..

The trick here is to find the libusb addr

Paul
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf