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.
Pages: 1
So after changing the pm3's USB descriptor to not be a HID device I was able to successfully prevent OSX from grabbing it so that libusb can talk to the pm3 without having to run the detach command. I know doing this creates other issues, so I'm only doing it temporarily until a solution is decided upon.
The proxmark3 client can see the pm3, but it hangs when a command is entered because usb_bulk_read in the reader pthread does not appear to honor the timeout value and hangs indefinitely. If you then do something to get the device to transmit data (like unplug it and plug it back in, or enter standalone mode) it does receive the data.
Can anybody else try to replicate this? Any ideas for a workaround?
Offline
After playing with it a bit more, I ended up compiling libusb myself rather than installing the one from darwinports, and it works. So if anyone runs into this problem and is using darwinports, try compiling libusb from scratch.
Next step will be to test qtgui support.
Offline
It should be possible to create a "codeless kext" that prevents com.apple.iokit.IOUSBHIDDriver from grabbing the Proxmark3 ... but I tried, and couldn't get it to work. I'll try to modify the USB descriptor like you describe...
Offline
Okay, I made some more progress. Something is really wrong with the event handling -- I can't really figure out how this code can work under Linux. This patch made it start running:
Index: proxmark3.c
===================================================================
--- proxmark3.c (revision 252)
+++ proxmark3.c (working copy)
@@ -46,21 +46,24 @@
{
struct main_loop_arg *arg = (struct main_loop_arg*)targ;
char *cmd = NULL;
+ pthread_t reader_thread;
- while(1) {
+ if (arg->usb_present == 1) {
struct usb_receiver_arg rarg;
- pthread_t reader_thread;
+ rarg.run=1;
+ printf("******* spawning reader thread\n");
+ pthread_create(&reader_thread, NULL, &usb_receiver, &rarg);
+ }
- rarg.run=1;
- if (arg->usb_present == 1) {
- pthread_create(&reader_thread, NULL, &usb_receiver, &rarg);
- }
+ while(1) {
+
cmd = readline(PROXPROMPT);
- rarg.run=0;
- if (arg->usb_present == 1) {
- pthread_join(reader_thread, NULL);
- }
-
+ printf("cmd = %s\n", cmd);
+// rarg.run=0;
+// if (arg->usb_present == 1) {
+// printf("******* joining reader thread\n");
+// pthread_join(reader_thread, NULL);
+// }
if (cmd) {
if (cmd[0] != 0x00) {
CommandReceived(cmd);
Why was the reader thread constantly being created and torn down?
Offline
So after changing the pm3's USB descriptor to not be a HID device I was able to successfully prevent OSX from grabbing it so that libusb can talk to the pm3 without having to run the detach command. I know doing this creates other issues, so I'm only doing it temporarily until a solution is decided upon.
The proxmark3 client can see the pm3, but it hangs when a command is entered because usb_bulk_read in the reader pthread does not appear to honor the timeout value and hangs indefinitely. If you then do something to get the device to transmit data (like unplug it and plug it back in, or enter standalone mode) it does receive the data.
Can anybody else try to replicate this? Any ideas for a workaround?
How do you change pm3's USB descriptor?
Offline
Pages: 1