Giter Club home page Giter Club logo

controlvault2-nfc-enable's Introduction

Enable NFC on Dell ControlVault2 and ControlVault3

Introduction

Recent Dell laptops - i.e. E7470 - contain integrated Broadcom NFC (contactless), (contacted) chip card and fingerprint reader (USB 0a5c:5834 - Broadcom BCM5880 USH).

The contacted card reader works out of the box on Linux, yet NFC reader does not - no RF field is present.

Instructions from blog.g3rt.nl are not applicable: the ushdiag.exe does not recognize the device at all.

This project aims to enable Linux to read NFC cards the same way Windows does.

Usage

  1. Clone the repository.
  2. Install python3 and python3-usb.
  3. Run: ./nfc.py on (use sudo if necessary).
  4. Run pcsc_scan or whatever you prefer.
  5. Enjoy!

To disable the reader replace on with off.

Supported devices

Currently only the following devices were tested and are known to work:

  • 0a5c:5832 (ControlVault 2),
  • 0a5c:5834 (ControlVault 2),
  • 0a5c:5842 (ControlVault 3).
  • 0a5c:5843 (ControlVault 3).

Firmware update (done during driver installation on Windows) may be required.

Tested on

  • Dell Latitude 5310 2-in-1
  • Dell Latitude 5480
  • Dell Latitude 5491
  • Dell Latitude 7280
  • Dell Latitude 7290
  • Dell Latitude 7390
  • Dell Latitude 7400
  • Dell Latitude E5270
  • Dell Latitude E5570
  • Dell Latitude E7470
  • Dell Latitude E7490
  • Dell Latitude Rugged 5414
  • Dell Latitude Rugged 5420

How it works?

Python script sends the same sequence of commands the Windows driver does. The traffic was sniffed using USBPcap and Wireshark (kudos to ~jkramarz and ~lgarbarini and for that).

The data is sent as-is and responses are read, but no error-checking is done.

The semi-annotated traffic dumps are available as traffic_cv2.txt and traffic_cv3.txt - feel free to decode it further!

The communication protocol is based on NCI (NFC Controller Interface). Unfortunately the specs are not freely available and some proprietary extensions are used. libnfc-nci and kernel sources were used to decode vendor-independent structs.

References

controlvault2-nfc-enable's People

Contributors

alukichev avatar bjh21 avatar gazben avatar geragio avatar gompa avatar jacekkow avatar jkramarz avatar kangie avatar xabolcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

controlvault2-nfc-enable's Issues

Can only read one card

Hi there,

I'm using a Dell Latitude 5430 rugged with the CV3 reader: 0a5c:5843. The script does work and I am able to read an NFC device. However, I only seem to be able to read one device and then the reader will not read any more devices. I have to rerun the nfc.py script to read another device.

Is this the expected behavior or does enabling the device make this persistent across reading different devices for people?

Add support for 0a5c:5843

I have a 0a5c:5843 NFC readr on my Dell Latitude 5501 but I'm not able to use it on Ubuntu 20.04, could you add support for this chip?

Latitude e6440 support

It is possible to add support to Latitude e6440? I can not find any drivers and i would like to have it. I'm using Ubuntu 21

Dell Precision 7540 support

I've a 7540, and I get the following message:

$ ./nfc.py on
INFO:__main__:Looking for supported device...
INFO:__main__:Found 0A5C:5843
DEBUG:cvcomm:Enumerating interfaces...
DEBUG:cvcomm:Interface found: INTERFACE 3: Vendor Specific
DEBUG:cvcomm:Enumerating endpoints...
DEBUG:cvcomm:BULK IN found: ENDPOINT 0x84: Bulk IN
DEBUG:cvcomm:BULK OUT found: ENDPOINT 0x4: Bulk OUT
DEBUG:cvcomm:Endpoint discovery successful.
INFO:__main__:Handler ControlVault3 (Broadcom ControlVault 3)
INFO:__main__:Turning NFC on...
DEBUG:cvcomm:Control: (65, 1, 0, 3) {}
Traceback (most recent call last):
  File "/tmp/controlvault2-nfc-enable/./nfc.py", line 66, in <module>
    handler.turn_on()
  File "/tmp/controlvault2-nfc-enable/cv3.py", line 29, in turn_on
    self.communicator.ctrl_transfer(0x41, 1, 0, 3)
  File "/tmp/controlvault2-nfc-enable/cvcomm.py", line 22, in ctrl_transfer
    return self.device.ctrl_transfer(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/usb/core.py", line 1082, in ctrl_transfer
    ret = self._ctx.backend.ctrl_transfer(
  File "/usr/lib/python3.10/site-packages/usb/backend/libusb1.py", line 893, in ctrl_transfer
    ret = _check(self.lib.libusb_control_transfer(
  File "/usr/lib/python3.10/site-packages/usb/backend/libusb1.py", line 602, in _check
    raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out

I've got an icon on the right of the touchpad which should be the symbol of NFC.
lsusb reports device 0a5c:5843.

From pkcs11-tool -L I see:

$ pkcs11-tool -L
Available slots:
Slot 0 (0x0): Virtual PCD 00 00
  (empty)
Slot 1 (0x4): Virtual PCD 00 01
  (empty)
Slot 2 (0x8): Broadcom Corp 58200 [Contacted SmartCard] (0123456789ABCD) 00 00
  (empty)
Slot 3 (0xc): Broadcom Corp 58200 [Contactless SmartCard] (0123456789ABCD) ...
  (empty)

However, pcsc_scan does not detect any NFC card.

Hope this helps. Let me know if you need further information to better diagnose the problem.

lsusb.txt

Error with Latitude 7410

Latitude 7410 gives:

INFO:__main__:Looking for supported device...
INFO:__main__:Found 0A5C:5843
DEBUG:cvcomm:Enumerating interfaces...
Traceback (most recent call last):
  File "./nfc.py", line 62, in <module>
    handler = UsbDeviceFinder.find()
  File "./nfc.py", line 49, in find
    handler = cls._cls_matcher(device)
  File "./nfc.py", line 36, in _cls_matcher
    return matcher.handler(device)
  File "./nfc.py", line 22, in <lambda>
    UsbDeviceMatcher({'idVendor': 0x0A5C, 'idProduct': 0x5843}, lambda device: __import__('cv3').ControlVault3(device)),
  File "/home/ashley/Downloads/controlvault2-nfc-enable/cv3.py", line 26, in __init__
    self.communicator = cvcomm.ControlVaultCommunicator(device)
  File "/home/ashley/Downloads/controlvault2-nfc-enable/cvcomm.py", line 13, in __init__
    self.bulk_in, self.bulk_out = self._find_endpoints()
  File "/home/ashley/Downloads/controlvault2-nfc-enable/cvcomm.py", line 68, in _find_endpoints
    raise Exception('Cannot find vendor-specific interface')
Exception: Cannot find vendor-specific interface

Thing is, it not actually clear whether the 7410 even has a NFC reader built in.

Latitude 7212

I am trying to get PCSC scanning working on a Latitude 7212. It has a 0a5c:5832 but the script errors/times out.

Screenshot from 2019-12-31 16-47-24

Check for python dependencies

It would be great if the script would check for dependencies. I had to install pyusb for instance.
Perhaps a quick check for the dependencies would be useful, even a prompt to run pip install?

can't use NFC on Latitude E7270

Hello,
I have some problems to use the NFC on my Dell Latitude E7270 (with ID 0a5c:5834 Broadcom Corp. 5880).
I have ubuntu 22.04 on it.
When I try to enable the NFC using your python script, there is a communication between your python script and the device

nuliel@nuliel-Latitude-E7270:~/controlvault2-nfc-enable$ ./nfc.py on
INFO:__main__:Looking for supported device...
INFO:__main__:Found 0A5C:5834
DEBUG:cvcomm:Enumerating interfaces...
DEBUG:cvcomm:Interface found: INTERFACE 3: Vendor Specific
DEBUG:cvcomm:Enumerating endpoints...
DEBUG:cvcomm:BULK IN found: ENDPOINT 0x84: Bulk IN
DEBUG:cvcomm:BULK OUT found: ENDPOINT 0x4: Bulk OUT
DEBUG:cvcomm:Endpoint discovery successful.
INFO:__main__:Handler ControlVault2 (Broadcom ControlVault 2)
INFO:__main__:Turning NFC on...
DEBUG:cvcomm:Control: (65, 0, 1, 3) {}
DEBUG:cvcomm:Put: 01 00 00 04 10 2f 04 00
DEBUG:cvcomm:Got: 00 00 00 06 10 60 00 02 00 01
DEBUG:cvcomm:Put: 01 00 00 07 10 2f 1d 03 05 90 65
DEBUG:cvcomm:Got: 00 00 00 28 10 4f 04 24 00 44 65 63 20 31 33 20 32 30 31 33 32 32 3a 30 35 3a 30 36 00 01 0c 22 a1 95 07 02 07 32 30 37 39 35 41 31
DEBUG:cvcomm:Put: 01 00 00 04 10 2f 2d 00
DEBUG:cvcomm:Got: 00 00 00 05 10 4f 1d 01 00
DEBUG:cvcomm:Put: 01 00 00 05 10 2f 11 01 f7
DEBUG:cvcomm:Got: 00 00 00 27 10 4f 2d 23 00 00 00 07 32 30 37 39 35 41 31 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00 e4 47 00 00 00 00 00 00 00
DEBUG:cvcomm:Put: 01 00 00 10 01 27 fc 0c 08 00 01 00 01 00 00 00 00 00 00 00
DEBUG:cvcomm:Got: 00 00 00 05 10 4f 11 01 00
DEBUG:cvcomm:Control: (65, 1, 0, 3) {}
DEBUG:cvcomm:Put: 01 00 00 05 10 20 00 01 01
DEBUG:cvcomm:Got: 00 00 00 07 10 40 00 03 00 11 01
DEBUG:cvcomm:Put: 01 00 00 06 10 20 01 02 01 00
DEBUG:cvcomm:Got: 00 00 00 1e 10 40 01 1a 00 03 0e 03 01 09 00 01 02 03 81 84 83 04 82 0a 00 02 f7 3d 00 2e 02 01 0c 22
DEBUG:cvcomm:Put: 01 00 00 6b 10 20 02 67 01 b9 64 01 00 ff ff 50 00 8b 13 00 10 00 06 00 00 00 00 00 ff 00 00 00 ff 00 00 04 00 00 00 00 03 00 00 00 03 00 0c 00 00 0d 00 00 00 00 00 00 00 00 00 00 33 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 02 53 3b 0f 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 94 10 20 02 90 0a ca 05 00 00 00 00 2c 80 01 01 b0 05 01 03 03 03 08 b5 03 01 03 ff c9 0d 24 00 00 00 01 00 bb 00 e4 00 0a 01 02 d6 0d 01 02 00 00 00 00 00 01 00 01 5a 00 8a b2 02 e8 03 c8 1e 06 1f 00 0a 00 30 00 04 24 00 1c 00 75 00 77 00 76 00 1c 00 03 00 0a 00 56 01 00 00 40 04 d7 01 07 dd 32 00 00 00 29 16 08 08 06 04 00 00 00 1f 27 0a 6d 20 00 52 20 00 00 00 01 85 00 00 32 1f 00 00 02 0a 16 00 02 55 55 55 55 55 55 55 55 55 55 55 55 55 1e
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 0a 10 20 02 06 01 b7 03 02 00 01
DEBUG:cvcomm:Got: 00 00 00 05 10 61 07 01 00
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 05 10 2f 06 01 01
DEBUG:cvcomm:Got: 00 00 00 05 10 4f 06 01 00
DEBUG:cvcomm:Put: 01 00 00 12 10 20 02 0e 02 51 08 20 79 ff ff ff ff ff ff 58 01 07
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 0b 10 21 00 07 02 04 03 02 05 03 03
DEBUG:cvcomm:Got: 00 00 00 05 10 41 00 01 00
DEBUG:cvcomm:Put: 01 00 00 1b 10 20 02 17 01 29 14 46 66 6d 01 01 11 02 02 07 ff 03 02 00 13 04 01 64 07 01 03
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 1e 10 20 02 1a 02 61 14 46 66 6d 01 01 11 02 02 07 ff 03 02 00 13 04 01 64 07 01 03 60 01 07
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 14 10 20 02 10 05 30 01 04 31 01 00 32 01 40 38 01 00 50 01 02
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 09 10 20 02 05 01 00 02 fa 00
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 0f 10 20 02 0b 01 c2 08 01 08 00 04 80 c3 c9 01
DEBUG:cvcomm:Got: 00 00 00 06 10 40 02 02 00 00
DEBUG:cvcomm:Put: 01 00 00 11 10 21 03 0d 06 00 01 01 01 02 01 80 01 82 01 06 01
DEBUG:cvcomm:Got: 00 00 00 05 10 41 03 01 00
DEBUG:cvcomm:Control: (65, 1, 1, 3) {}
INFO:__main__:NFC should be turned on now!

But when I run pcsc_scan, I can't see any NFC card:

nuliel@nuliel-Latitude-E7270:~/controlvault2-nfc-enable$ pcsc_scan 
Using reader plug'n play mechanism
Scanning present readers...
0: Broadcom Corp 5880 [Contacted SmartCard] (0123456789ABCD) 00 00
1: Broadcom Corp 5880 [Contactless SmartCard] (0123456789ABCD) 01 00
 
Sun Oct 29 09:29:51 2023
 Reader 0: Broadcom Corp 5880 [Contacted SmartCard] (0123456789ABCD) 00 00
  Event number: 0
  Card state: Card removed, 
 Reader 1: Broadcom Corp 5880 [Contactless SmartCard] (0123456789ABCD) 01 00
  Event number: 0
  Card state: Card removed,

Note that I have not changed the identifier of the device: 0123456789ABCD seems to be set by default.
I already installed the driver (Dell-ControlVault2-Driver-and-Firmware_N23KC_WIN64_4.12.5.8_A21_01.EXE) on a windows 10 vm with the Broadcom 5880 given to the vm. So the controlvault2 device should be updated. Note that I never succeeded to use the fingerprint reader on the windows vm, but maybe it's not link with my problem with NFC.
I installed freeDOS on a usb key to run ushdiag, but this program can't see anything on USB... (maybe a problem with freeDOS or the program is too old, I don't know).
My goal is to use my yubikey with this NFC reader. For the tests, I try with a random smartcard (a smartcard for transport that is recognized with the smartcard reader of my laptop (ATR received), but not recognized by the NFC reader), and with my yubikey.
Do you know why I can't use NFC? Is the sequence sent by your script always ok with this firmware? Is there another requirement that I've not done?

usb.core.USBTimeoutError: [Errno 110] Operation timed out

I have tested the script on my latitude e7270

./nfc.py off: works great every single time
./nfc.py on: works great when coming from an off state. But if the feature is already on it gives some grief:

> ./nfc.py on
INFO:__main__:Looking for supported device...
INFO:__main__:Found 0A5C:5834
DEBUG:cvcomm:Enumerating interfaces...
DEBUG:cvcomm:Interface found: INTERFACE 3: Vendor Specific
DEBUG:cvcomm:Enumerating endpoints...
DEBUG:cvcomm:BULK IN found: ENDPOINT 0x84: Bulk IN
DEBUG:cvcomm:BULK OUT found: ENDPOINT 0x4: Bulk OUT
DEBUG:cvcomm:Endpoint discovery successful.
INFO:__main__:Handler ControlVault2 (Broadcom ControlVault 2)
INFO:__main__:Turning NFC on...
DEBUG:cvcomm:Control: (65, 0, 1, 3) {}
DEBUG:cvcomm:Put: 01 00 00 04 10 2f 04 00
Traceback (most recent call last):
  File "/home/gon/repos/controlvault2-nfc-enable/./nfc.py", line 66, in <module>
    handler.turn_on()
  File "/home/gon/repos/controlvault2-nfc-enable/cv2.py", line 36, in turn_on
    self.communicator.talk(self.turn_on_seq1)
  File "/home/gon/repos/controlvault2-nfc-enable/cvcomm.py", line 53, in talk
    data = self.recv_packet()
  File "/home/gon/repos/controlvault2-nfc-enable/cvcomm.py", line 37, in recv_packet
    packet = self.read(64, timeout=5000).tobytes()
  File "/home/gon/repos/controlvault2-nfc-enable/cvcomm.py", line 28, in read
    return self.bulk_in.read(*args, **kwargs)
  File "/home/gon/.local/lib/python3.10/site-packages/usb/core.py", line 423, in read
    return self.device.read(self, size_or_buffer, timeout)
  File "/home/gon/.local/lib/python3.10/site-packages/usb/core.py", line 1029, in read
    ret = fn(
  File "/home/gon/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
  File "/home/gon/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 954, in __read
    _check(retval)
  File "/home/gon/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 602, in _check
    raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out

./nfc.py reset: Also fails if it is already on in the same way. So I guess it seems to do what it is supposed to do?

Anyway, hope this is of any help. I would suggest adding an exception or a check to contain the tracebacks.

Ubuntu 22.10 on Latitude E7470 crashing

Hello,
I've been using the plugin in an older version some time with older Ubuntu versions for the German identity card. I always had to enable the python script and disable it afterwards, because a removal of the card wasn't detected. That wasn't perfect, but it worked.
I installed a newer system on a fresh hard drive and wanted to get the NFC reader working again, but this time I can't get it working at all. Using pcsc_scan shows me a German identity card and I have to turn the reader off and on to recognize a card as before. But using an app "AusweisApp2" for authentication with the NFC card, the reader seems to crash. It looks working but nothing happens.
I'm not able to interact by the python script anymore, before I interrupt the waiting process. And the ready gets really warm. After some waiting I'm able to turn it off again using the python script.

Is there any possibility to debug this behaviour? Is there a specific firmware recommend?

This is lspci of my reader:
Bus 001 Device 032: ID 0a5c:5834 Broadcom Corp. 5880

Thank you!

Card reader 0a5c:5842 on a dell Precision 7540

Hello
I have a card reader 0a5c:5842 on a dell Precision 7540. I try the script nfc.py but it does not works, I got the following message:
Exception: Cannot find vendor-specific interface.
I modified the file cvcomm.py by changing at line 66 0xff with 0xfe in accord with the info from the output of the command self.logger.debug(configuration) inserted at line 63.
With this change the script nfc.py performs some more steps but at the end it stop with the following messages:

INFO:main:Handler ControlVault3 (Broadcom ControlVault 3)
INFO:main:Turning NFC on...
DEBUG:cvcomm:Control: (65, 1, 0, 3) {}
Traceback (most recent call last):
File "./nfc.py", line 59, in
handler.turn_on()
File "/home/andrea/software/controlvault2-nfc-enable/cv3.py", line 29, in turn_on
self.communicator.ctrl_transfer(0x41, 1, 0, 3)
File "/home/andrea/software/controlvault2-nfc-enable/cvcomm.py", line 23, in ctrl_transfer
return self.device.ctrl_transfer(*args, **kwargs)
File "/usr/lib/python3/dist-packages/usb/core.py", line 1043, in ctrl_transfer
self.__get_timeout(timeout))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer
timeout))
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out

in the following the output of the command self.logger.debug(configuration):

DEBUG:cvcomm:DEVICE ID 0a5c:5842 on Bus 001 Address 002 =================
bLength : 0x12 (18 bytes)
bDescriptorType : 0x1 Device
bcdUSB : 0x200 USB 2.0
bDeviceClass : 0x0 Specified at interface
bDeviceSubClass : 0x0
bDeviceProtocol : 0x0
bMaxPacketSize0 : 0x40 (64 bytes)
idVendor : 0x0a5c
idProduct : 0x5842
bcdDevice : 0x101 Device 1.01
iManufacturer : 0x1 Broadcom Corp
iProduct : 0x2 58200
iSerialNumber : 0x3 0123456789ABCD
bNumConfigurations : 0x1
CONFIGURATION 1: 100 mA ==================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x2 Configuration
wTotalLength : 0x8b (139 bytes)
bNumInterfaces : 0x2
bConfigurationValue : 0x1
iConfiguration : 0x0
bmAttributes : 0xe0 Self Powered, Remote Wakeup
bMaxPower : 0x32 (100 mA)
INTERFACE 0: Application Specific ======================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x0
bAlternateSetting : 0x0
bNumEndpoints : 0x3
bInterfaceClass : 0xfe Application Specific
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x4 Broadcom ControlVault 3
ENDPOINT 0x81: Bulk IN ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x81 IN
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x200 (512 bytes)
bInterval : 0x0
ENDPOINT 0x1: Bulk OUT ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x1 OUT
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x200 (512 bytes)
bInterval : 0x0
ENDPOINT 0x85: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x85 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x400 (1024 bytes)
bInterval : 0x1
INTERFACE 1: Smart Card ================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x1
bAlternateSetting : 0x0
bNumEndpoints : 0x3
bInterfaceClass : 0xb Smart Card
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x5 Contacted SmartCard
ENDPOINT 0x82: Bulk IN ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x82 IN
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x200 (512 bytes)
bInterval : 0x0
ENDPOINT 0x2: Bulk OUT ===============================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x2 OUT
bmAttributes : 0x2 Bulk
wMaxPacketSize : 0x200 (512 bytes)
bInterval : 0x0
ENDPOINT 0x86: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x86 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x400 (1024 bytes)
bInterval : 0x1

and the output of lsusb -d 0a5c:5842 -v:

Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0a5c Broadcom Corp.
idProduct 0x5842
bcdDevice 1.01
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x008b
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 4
** UNRECOGNIZED: 10 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 11 Chip/SmartCard
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 5
ChipCard Interface Descriptor:
bLength 54
bDescriptorType 33
bcdCCID 1.00
nMaxSlotIndex 0
bVoltageSupport 7 5.0V 3.0V 1.8V
dwProtocols 3 T=0 T=1
dwDefaultClock 4000
dwMaxiumumClock 4000
bNumClockSupported 0
dwDataRate 9600 bps
dwMaxDataRate 250000 bps
bNumDataRatesSupp. 0
dwMaxIFSD 247
dwSyncProtocols 00000000
dwMechanical 00000000
dwFeatures 000102BA
Auto configuration based on ATR
Auto voltage selection
Auto clock change
Auto baud rate change
Auto PPS made by CCID
NAD value other than 0x00 accepted
TPDU level exchange
dwMaxCCIDMsgLen 271
bClassGetResponse 00
bClassEnvelope 00
wlcdLayout none
bPINSupport 0
bMaxCCIDBusySlots 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1

Have you some suggestions for this problem?

Writing NFC driver for linux

Don't you maybe want to just write nfc driver for linux for this bcm?
You seem to know chip and every user would benefit from this.
We wouldn't need to do workarounds like this script ;/

There are some docs:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/nfc
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/networking/nfc.rst

AAAnd other drivers:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nfc

And some wiki:
https://elinux.org/NFC_driver_notes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.