mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-03 22:31:50 +00:00
add some debuggers to help figure out why nfc-list doesn't see libusb devices
This commit is contained in:
@@ -144,7 +144,11 @@ acr122_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *p
|
||||
*pszDeviceFound = 0;
|
||||
|
||||
// Test if context succeeded
|
||||
if (!(pscc = acr122_get_scardcontext ())) return false;
|
||||
if (!(pscc = acr122_get_scardcontext ()))
|
||||
{
|
||||
DBG("%s","PCSC-LITE daemon not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Retrieve the string array of all available pcsc readers
|
||||
if (SCardListReaders(*pscc,NULL,acDeviceNames,(void*)&szDeviceNamesLen) != SCARD_S_SUCCESS) return false;
|
||||
|
||||
@@ -100,6 +100,7 @@ nfc_device_t* pn531_usb_connect(const nfc_device_desc_t* pndd)
|
||||
us.uiEndPointOut = 0;
|
||||
us.pudh = NULL;
|
||||
|
||||
DBG("%s", "Looking for PN531 device");
|
||||
usb_init();
|
||||
if (usb_find_busses() < 0) return NULL;
|
||||
if (usb_find_devices() < 0) return NULL;
|
||||
|
||||
@@ -98,6 +98,7 @@ nfc_device_t* pn533_usb_connect(const nfc_device_desc_t* pndd)
|
||||
us.uiEndPointOut = 0;
|
||||
us.pudh = NULL;
|
||||
|
||||
DBG("%s", "Looking for PN533 device");
|
||||
usb_init();
|
||||
if (usb_find_busses() < 0) return NULL;
|
||||
if (usb_find_devices() < 0) return NULL;
|
||||
|
||||
Reference in New Issue
Block a user