NXP MIKROE-2540 USB NFC Dongle Python Module?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NXP MIKROE-2540 USB NFC Dongle Python Module?

2,012 Views
avelardo
Contributor I

All:

I am doing some prototyping work using the NXP MIKROE-2540 USB NFC Dongle attached to a Red Hat Linux system. I have looked through the sample application provided and can understand the basics of what the C source code is doing, but for the prototyping I am working on, something written in Perl or Python would be preferred as it has been a LONG time since I have done anything major in C. I have searched all over the Internet and cannot find any Python or Perl modules that support the chipset in the USB dongle. The closet I found was nfcpy, but it does not seem to support the chipset. I am hoping this community has something that may help me out.

Thanks,

Adam

0 Kudos
Reply
5 Replies

1,561 Views
enok
Contributor I

I just quickly implemented a Python code that communicates with this dongle. I'm able to perform CORE_RESET_CMD and CORE_INIT_CMD of the PN7150, and also NCI_PROPRIETARY_ACT_CMD. I can see the correct responses coming back from the 2540 dongle for all these commands. But when I try to do RF_DISCOVER_MAP_CMD or RF_DISCOVER_CMD I never get any response. Can someone help me guess what's wrong?

Also I don't understand how the *_NTF notification packets are suppose to be transported over the USB interface and /dev/hidraw? device? The communication between the USB host and the dongle seems to be strictly request/response based, i.e. I can't see any support for notifications initiated from the dongle side. So how is this supposed to work?

I may add that I tried to compile and build example C applications for this Microe-2540 dongle and this "lpcusb" communication protocol, and none of them worked. Is anyone actually using this dongle successfully for anything?

0 Kudos
Reply

1,549 Views
enok
Contributor I

There is a lpcusbsio Python package on pypi. Tried installing it

 

pip install libusbsio

 

But it doesn't seem to detect the Microe-2540.

 

>> from libusbsio import *
>> import logging
>> sio = LIBUSBSIO(logglevel=logging.DEBUG)
>> sio.GetNumPorts([(0x1fc9,0x0088)])
0
>>

 

the dongle is there (and I do have permissions to the associated /dev/hidraw*)

 

#> lsusb
Bus 003 Device 017: ID 1fc9:0088 NXP Semiconductors LPC I2C HID 
#>

 

So no clue why GetNumPorts doesn't work. Perhaps this python module doesn't work under Linux?

 

0 Kudos
Reply

1,481 Views
enok71
Contributor I

In case anyone is interested: I did manage to figure out the "lpcusb" protocol used to tunnel I2C messages and communicate with the PN7150 in the MIKROE 2540 dongle, via the /dev/hidraw* device under Linux, and I wrote a stand-alone Python module for it. If there is interest I could publish it on github or something.

0 Kudos
Reply

680 Views
vc
Contributor I

Hi, can I get the whole procedure and python module, please?

0 Kudos
Reply

1,998 Views
fangfang
NXP TechSupport
NXP TechSupport

Hello,

Unfortunately, There is no the information for it. The all document please refer to it as the link.

URL:https://www.mikroe.com/nfc-usb-dongle.

Hope it help you. Have a nice day.

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------

0 Kudos
Reply