Research, development and trades concerning the powerful Proxmark3 device.
Remember; sharing is caring. Bring something back to the community.
"Learn the tools of the trade the hard way." +Fravia
You are not logged in.
Time changes and with it the technology
Proxmark3 @ discord
Users of this forum, please be aware that information stored on this site is not private.
Hello.
I have a problem for Host to Proxmark USB communication.
One week ago, I made a Java for my Proxmark device, using libusb (native lib).
I can easily communicate with my Proxmark, with "bulkTransfer" function (0x01 and 0x82 endpoints) and 64 bytes packets.
Now, I want to try to communicate with an Android Smartphone device. I'm using an USB OTG cable, which allow me to connect the PM3 to my Xperia Pro (updated to ICS last week). The proxmark seems to be correctly powered (standalone mode works with Smartphone power, and LEDs switches on correctly).
I'm also able to read serial number and productId, and detect the Proxmark from my Android application.
Now, the problem is " Which USB interface is used to communicate with the PM3 ? ". When I worked on my Java PC app, with libusb, it seems it use xfer bulk endpoints. (64 bytes packets)
However, when I scan interfaces from the Smartphone application, it found only 2 IN/OUT INTERRUPT endpoints (not bulk ?) limited to 8 bytes per packet (instead of 64).
Any bulkTransfer from Android app fails, and returns "-1". (errCode)
Moreover, the phone seems to not correctly claims the interface.
EDIT : The problem seems to be here --> The device is not claimed correctly. I tried to change "HID" (0x03) type to "generic" (0xff) in the device source, without success
I was hoping that the USB host functionality of android would work, because the tool used (libusb) by google API seems to be the same as my PC application.
But the operation may be more complicated, and I don't know if I missed something, or if "hardware" constraints make operation impossible.
Thanks for help (and sorry for my egnlsih)
Last edited by PM (2012-06-06 21:20:45)
Offline
Hi, can you please show me how to use the "bulkTransfer" function or write down some piece of source code ? I would like to communicate with PM3 using Visual Basic but I had no luck until now...
Offline
Hello.
Try this sample : http://zone.ni.com/devzone/cda/epd/p/id/3624
Offline
Hello.
Try this sample : http://zone.ni.com/devzone/cda/epd/p/id/3624
Many thanks for the link ! Can you please show some raw command to send to the PM3 in order to get info and, for example, read/write data ? I am now able to send commands through USB but I need exact command syntax because I try to find it in PM3 manual and source but with no examples is too difficult !
Last edited by asper (2012-06-13 07:14:25)
Offline
In usb_cmd.h, you have the list of command codes ( http://pastebin.com/26tR5nym ).
So, normally, you just send raw bytes begining with one of these codes, and Proxmark3 will interpret it, and send you responses.
In order to receive responses, it seems we need to create a dedicated thread which always listen for incoming data. (ie, when you send "0x0000" - device info - you will receive 4 commands containing String response.)
Some commands needs arguments ( a not only the 0x---- code ). Normally, you just have to add raw bytes after the command code. Look at C source code of Proxmark3, and you will see argument format for each command.
(but, before, you can easily try to send "0x0000" or "0x0400" - antenna tunning - which don't need args)
Offline
So probably my problem is in libusb under Visual Basic... it seems not to answer to my commands... I really don't know why... can you give me some suggestions/other libs to use with Visual Basic and PM3 ? You can also try to send me a piece of your java code in order for me to understand how it works...
Last edited by asper (2012-06-13 10:49:43)
Offline
PM, I wanted to know if you had continue your work ? If yes, have you been able to communicate with the proxmark via android phone ?
thx
Offline
Hello.
Try this sample : http://zone.ni.com/devzone/cda/epd/p/id/3624
I tryed also this way (dunno why I was missing the full instruction inside that link) but PM3 cannot be recognized by the Devices and Interfaces ov National Instruments software bundle so I am not able to use it at all... I desperately need an example (source code) for the libusb0.dll and libusb0.sys, can PLEASE someone provide few line of VB code in order for me to work with PM3 under Windows environment ? PLEASE !
Edit: should I try to use latest libusb-win32 ?
Last edited by asper (2012-11-13 12:08:16)
Offline
So probably my problem is in libusb under Visual Basic... it seems not to answer to my commands... I really don't know why... can you give me some suggestions/other libs to use with Visual Basic and PM3 ? You can also try to send me a piece of your java code in order for me to understand how it works...
Have you tried to install a filter with utility in libusbwin32 for PM3 in windows? UsbOpen return a correct handle?
Offline
The problem probably is under libusb that is NOT a windows library and must be "redirected" through libusbvb0 library (custom lubrary built by a developer); the custom library will then "talk" with the original libusb library sendin correct commands; I will try to test this redirections in the near future (I hope).
Offline
The new branch I just created uses a different USB interface and should solve such issues. Please check out this post.
Offline