Topic: How to enumerate over attached and available devices

Hi,

How do you enumerate over all the attached and available devices?

The nfc_device_desc_t struct does not contain the information to enumerate over multiple types of device, especially multiple USB types of devices.

Thanks,

snapdev

Re: How to enumerate over attached and available devices

Hi snapdev,

snapdev wrote:

How do you enumerate over all the attached and available devices?

The nfc_device_desc_t struct does not contain the information to enumerate over multiple types of device, especially multiple USB types of devices.

Since libnfc@trunk r208, you can use nfc_list_devices() to enumerate devices. ATM, only acr122 devices are listed: PN531 USB and PN532 USB can be enhanced to support device listing but some drivers can't do it "natively" like UART based one due the "probing" capabilities of used bus. BTW, you can locally patch libnfc to add the requiered listing function. i.e. if your hardware is fixed (e.g.  handheld with internal UART PN532 module), you would like to see it in list. To do that, you need to create the pn532_uart_list_devices() and add its reference to the drivers structure (see in drivers.h)

Sorry for long time without reply... Work was in progress ;-)

Romuald Conty