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.
Hi all,
I'm trying to add a new command which should read a german transportation card (application is called VDV-Kernapplikation ) using APDUs, called eTicket. I tried keeping close to the command and functionality of 'epa'. My code compiles ok and I can see the new command in the proxmark3 Linux client using 'help'. Problem is, that now if I call any command either the client or my Proxmark3 firmware screws up, not sure which. For example:
-----------
proxmark3> hf 14a list
unrecognized command 00000000
unrecognized command 00000000
unrecognized command 00000000
--------
Even flashing with 'flasher' fails causing:
-------------
Dec 6 23:19:07 ubuntu kernel: [10909.355433] usb 1-1.2: usbfs: USBDEVFS_CONTROL failed cmd flasher rqt 128 rq 6 len 255 ret -110
-------------
Here is my svn diff: http://pastebin.com/y568FJt9
I guess it's simply something stupid I missed or didn't figure out correctly.
I would appreciate any hint.
Thanks,
rrookie
Offline
hmmm....
This seems do be a compiler issue. When I run the 'proxmark3' executable in a debugger (gdb), it looks like the variable 'i' has been optimized out (at least) in this function:
---------
void CmdsParse(const command_t Commands[], const char *Cmd)
{
char cmd_name[32];
int len = 0;
memset(cmd_name, 0, 32);
sscanf(Cmd, "%31s%n", cmd_name, &len);
int i = 0;
while (Commands[i].Name && strcmp(Commands[i].Name, cmd_name))
++i;
/* try to find exactly one prefix-match */
if(!Commands[i].Name) {
.......
-----------------
(gdb) graph display /s Commands[i].Name
(gdb) 5: x/s Commands[i].Name <error: value has been optimized out>
(gdb) graph display /s Commands[0].Name
6: x/s Commands[0].Name 0x420ba2: "help"
-----------------
I'm using gcc version 4.4.1 (Sourcery G++ Lite 2009q3-68).
Has anybody else run across this kind of issue yet ?
Offline
Sorry. Of course the client is not compiled with the arm-compiler.
My Linux GCC is: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Offline