NXP MIKROE-2540 USB NFC Dongle Python Module?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NXP MIKROE-2540 USB NFC Dongle Python Module?

2,018 次查看
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 项奖励
回复
5 回复数

1,567 次查看
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 项奖励
回复

1,555 次查看
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 项奖励
回复

1,487 次查看
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 项奖励
回复

686 次查看
vc
Contributor I

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

0 项奖励
回复

2,004 次查看
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 项奖励
回复