iceman1001 / proxmark3

[Deprecated] Iceman Fork, the most totally wicked fork around if you are into proxmark3
http://www.icedev.se/pm3.aspx
GNU General Public License v2.0
465 stars 116 forks source link

Fix USB device descriptor issue, set serial number to "iceman1001". #243

Closed micolous closed 6 years ago

micolous commented 6 years ago

This is a port of upstream PR 565, which addresses USB enumeration issues on some Android devices, described in https://github.com/Proxmark/proxmark3/pull/565#issuecomment-366430026. Still don't know why this is a problem, but this patch seems to fix things.

I also took the liberty of changing the serial number of the device to iceman1001, which should make it pretty obvious in dmesg and similar tools when someone is running this firmware:

[42548.700691] usb 3-13.2.2: new full-speed USB device number 28 using xhci_hcd
[42554.165609] usb 3-13.2.2: New USB device found, idVendor=9ac4, idProduct=4b8f, bcdDevice= 1.00
[42554.165614] usb 3-13.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[42554.165617] usb 3-13.2.2: Product: proxmark3
[42554.165620] usb 3-13.2.2: Manufacturer: proxmark.org
[42554.165623] usb 3-13.2.2: SerialNumber: iceman1001
[42554.173866] cdc_acm 3-13.2.2:1.0: ttyACM0: USB ACM device
iceman1001 commented 6 years ago

Strange that the iProduct string has anything to do with the identification, I only thought it was the iManufacturer string which was matched. Dunno why you change serialnumber, I thought it had to be a numberstring (not with letters inside)

micolous commented 6 years ago

iManufacturer is the only thing that is used for the udev rules (on Linux). I use the USB device ID for Android stuff, because some versions of Android don't have the strings easily available :(

iProduct is not used by anything, and I don't match it by anything. However, there are strange enumeration issues with some Android devices (per the upstream PR). This cleans that up.

iSerialNumber was more a "while I'm here..." thing. It doesn't get set by the upstream PM3 firmware. I don't see any strict requirements on what it is (ie: must be a number), other than it being "manufacturer determined". Happy to drop that if it bothers you greatly, as it's not critical. It's just a little more meaningful than "888".

iceman1001 commented 6 years ago

Drop the "1001" part of the iSerialNumber and I'll be happy to merge.

iceman1001 commented 6 years ago

TeamWalrus was doing something similar, luckily you changed the iSeralnumber :) https://github.com/TeamWalrus/proxmark3/commit/1be25f9125385ffff958450fd8461a435e49001f

micolous commented 6 years ago

Done. I also note @cjbrigato's comments in https://github.com/RfidResearchGroup/proxmark3/commit/ff16cbb4dba558909fc72494b1e351ac73ea5626#commitcomment-30407117

That is, the device path will change between the bootrom and flasher on OSX, and one will need to flash the bootrom before the flasher.

iceman1001 commented 6 years ago

I will revert back to the 888 ish after this one, but making sure it is not a % 8 tuple