FS#76524 - [avrdude] Build missing hidapi - unable to access HID programmers

Attached to Project: Community Packages
Opened by Shuyuan Liu (shuyuan_liu) - Friday, 11 November 2022, 11:49 GMT
Last edited by freswa (frederik) - Monday, 14 November 2022, 21:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
freswa (frederik)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The current avrdude package (1:7.0-2) is built without `hidapi`, which (at least on my system) means avrdude can't access certain programmers that it should. For example, the nEDBG programmer on the ATtiny3217 Curiosity Nano board fails to work when avrdude is built without `hidapi`, and works if I manually build the package with it installed. I don't have any other HID-based programmers to test, so I'm not sure how many programmers are affected.

Additional info:
* package version(s): probably all past versions, as `hidapi` has never been a dependency in the PKGBUILD.

Logs (without hidapi, current version):
```
> avrdude -c pkobn_updi -p t3217
avrdude: usbdev_open(): WARNING: failed to set configuration 1: Device or resource busy
avrdude: usbdev_send(): wrote -5 out of 912 bytes, err = Input/output error
avrdude: jtag3_edbg_prepare(): failed to send command to serial port
avrdude: opening programmer "pkobn_updi" on port "usb" failed

avrdude done. Thank you.
```

Logs (with hidapi, correct behavior):
```
> avrdude -c pkobn_updi -p t3217

Vtarget : 3.31 V
PDI/UPDI clock Xmega/megaAVR : 100 kHz
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9522 (probably t3217)

avrdude done. Thank you.
```

Steps to reproduce:
* Install avrdude with pacman
* Plug in the ATtiny3217 Curiosity Nano (or presumably any other HID-based programmer)
* Run `avrdude -c pkobn_updi -p t3217` (or as appropriate for a different board)
This task depends upon

Closed by  freswa (frederik)
Monday, 14 November 2022, 21:35 GMT
Reason for closing:  Implemented
Additional comments about closing:  hidapi support enabled with avrdude-1:7.0-3
Comment by Toolybird (Toolybird) - Sunday, 13 November 2022, 06:16 GMT
FWIW Fedora appear to enable hidapi support [1]

[1] https://src.fedoraproject.org/rpms/avrdude/blob/rawhide/f/avrdude.spec#_24

Loading...