Proxmark3 community

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.

Announcement

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.

#1 2013-08-26 19:13:39

jonor
Contributor
Registered: 2009-09-17
Posts: 97

optimization parameter with gcc

At this time I begin again to play with proxmark3. I download the latest version from svn.
Something was not working with ISO14443B. I was using yagarto gcc 4.6 in my linux box.
I tried to use a new version 4.7 2013q2 from launchpad and somethings start to work: reader, sim and snoop but the read sri and srix4k not was working.
It's a very simple code, with send and receive of data ISO14443B. It was a surprise for me! reader and sim use the same functions.
I see in revision 655 the change of optimization parameter in common/Makefile.common from -O2 to -Os.
I tried to set -O2 instead of -Os and now all is working with ISO1444B also sri and srix4k commands.
I tried to understand the problem without success, so -O2 for me is good solution.
I hope this is usefull for someone else which has problems with ISO14443B.

Offline

#2 2013-08-26 19:55:59

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: optimization parameter with gcc

Well, I just tested your "compile-mod" (r756) under Windows but I still cannot read ISO14443B... I always receive this answer on READ function:

proxmark3> #db# No response from tag                 
proxmark3> hf 14b srix4kread 

and, after sending the SNOOP command, I receive this:

proxmark3> hf 14b read
proxmark3> 
proxmark3> #db# 2 0 0                 
proxmark3> hf 14b read
proxmark3> 
proxmark3> #db# 2 0 0                 
proxmark3> hf 14b read
proxmark3> 
proxmark3> #db# 3 0 0                 
proxmark3> hf 14b read

and the red led remains on...

The tag is 1/3 - 1/4 the size of my antenna.

The read seems anyway to be working but VERY badly... 1 time on 50 the tag sends its UID and 1 or 2 blocks... maybe a size issue ?

The "hf 14b srix4kread" never shown a correct answer...

My antenna is 9.83 V

Any suggestion ?


EDIT: anyway the behaviour seems to be the same as the "non-mod" version...

Last edited by asper (2013-08-26 20:08:30)

Offline

#3 2013-08-26 20:14:07

jonor
Contributor
Registered: 2009-09-17
Posts: 97

Re: optimization parameter with gcc

The command hf 14b read is not snoop. It's a standard ISO14443B reader which send ATQB to your tag. SRIX4K is not standard ISO14443B it has proprietary protocol.
Which version of gcc have you used? For me gcc 4.6 has some problems.
I can send you, my osimage.elf if you want for test all functions with ISO14443B.

For size of antenna I have replied here http://www.proxmark.org/forum/viewtopic.php?id=1624
My antenna is good also with standard size of RFID tag

EDIT
after snoop command, for exit you should press button.
hf 14b snoop
is asyncronous command, it run in background. You can stop it only with button

Last edited by jonor (2013-08-26 20:16:50)

Offline

#4 2013-08-26 20:20:02

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: optimization parameter with gcc

Yes please send me your os image and i will test. Pressing the button doesn't turn the led off sad

My yagarto is: yagarto-bu-2.23.1_gcc-4.7.2-c-c++_nl-1.20.0_gdb-7.5.1_eabi_20121222.exe

EDIT: sorry probably I missed your answer to the antenna problem, thank you wink !

Last edited by asper (2013-08-26 20:24:16)

Offline

#5 2013-08-26 20:38:21

jonor
Contributor
Registered: 2009-09-17
Posts: 97

Re: optimization parameter with gcc

Ok you can download from here http://www.sendspace.com/file/ti0cmk
In this osimage, is already applied the patch with raw command ISO14443B but without the support in client is useless. The simulate tag has some changes for my current test.
I disabled Legic and ICLASS, I don't know if you has some tags.

Last edited by jonor (2013-08-26 20:44:51)

Offline

#6 2013-08-26 20:44:23

jonor
Contributor
Registered: 2009-09-17
Posts: 97

Re: optimization parameter with gcc

asper wrote:

Pressing the button doesn't turn the led off sad

When you press the button in snoop mode, it's should print in your client: "cancelled" and turn off all leds.

Offline

#7 2013-08-26 20:53:00

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: optimization parameter with gcc

Unfortunately button doesn't stop snooping. Anyway you are right, without the executable there is no use for the osimage... is my yagarto similar to your one?

Offline

#8 2013-08-26 21:01:53

jonor
Contributor
Registered: 2009-09-17
Posts: 97

Re: optimization parameter with gcc

also with my osimage button don't stop snooping?
I have used this gcc https://launchpad.net/gcc-arm-embedded there is also windows version ( 4.7.4 20130613 ). I think yagarto applies some patchs, but I don't remember exactly.
With gcc from launchpad I have resolved all my old problems with ISO14443B. Everytime I have tried to use proxmark3 with tag ISO14443B, somethings was not working.
Little antenna and good firmware proxmark3 is becoming a good object. wink

Last edited by jonor (2013-08-26 21:02:39)

Offline

#9 2013-08-26 21:15:29

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: optimization parameter with gcc

Using only the osimage you provide now the SNOOP commands doesn't turn on the red led at all while the READ and SRIX4kREAD command make it always on (no off even pressing the button)... I am downloading this: https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-win32.exe I hope it is right because I cannot find 4.7.4 20130613
I will test as soon as I can with a new compiled client.

Last edited by asper (2013-08-26 21:26:19)

Offline

#10 2013-08-26 21:25:47

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: optimization parameter with gcc

Tryed with your osimage + gcc-arm-none-eabi-4_7-2013q2-20130614-win32.exe + my old client = not working (same problem as my previous post)
Tryed with your osimage + gcc-arm-none-eabi-4_7-2013q2-20130614-win32.exe + new recompiled client = not working (same problem as my previous post)
Tryed with my new recompiled osimage + gcc-arm-none-eabi-4_7-2013q2-20130614-win32.exe + new recompiled client = not working (same problem as my previous post)

I will try to build a smaller antenna and re-test (just bought the copper wire, waiting for it to arrive...); I suppose this is the real problem because VERY RARELY PM3 (1/50 and continuously changing the tag position in space) is able to get the srix4k UID using the read command...

EDIT:
A silly question: will the simple installation of gcc-arm-none-eabi-4_7-2013q2-20130614-win32.exe "overwrite" my old files or I should remove them ? I tryed to find them but I am not able to find an installation under Windows...

Last edited by asper (2013-08-26 21:37:29)

Offline

#11 2013-08-26 21:55:25

jonor
Contributor
Registered: 2009-09-17
Posts: 97

Re: optimization parameter with gcc

asper wrote:

EDIT:
A silly question: will the simple installation of gcc-arm-none-eabi-4_7-2013q2-20130614-win32.exe "overwrite" my old files or I should remove them ? I tryed to find them but I am not able to find an installation under Windows...

I don't know I use linux version, where I extract file in a directory and I can use the compiler without this doubt. Now I can't test it. The exe should be auto extracting file, but I don't know if it overwrite your old file.
I see in some your image attached in this forum you use cygwin, I don't if launchpad gcc using lib cygwin. Sure you can execute from cygwin, but I don't know is a good solution overwrite previous gcc.
You can extract in a directory and from cygwin execute:

export PATH=<your directory full path>:$PATH

example

export PATH=/opt/gcc-arm:$PATH

after this command when you run make for compile proxmark3 firmware the new gcc is used. Without change the PATH old gcc is used.

Offline

#12 2015-06-16 14:51:41

Dake
Contributor
Registered: 2015-06-16
Posts: 32

Re: optimization parameter with gcc

Hello everyone,

I have also this problem when I want snoop an iso14443B between a card and a NFC reader :

[== Undefined ==]
proxmark3> hf 14b snoop
#db# Snooping buffers initialized:                 
#db#   Trace: 39360 bytes                 
#db#   Reader -> tag: 256 bytes                 
#db#   tag -> Reader: 256 bytes                 
#db#   DMA: 128 bytes                 
#db# blew circular buffer! behindBy=0x74          
#db# Snoop statistics:                 
#db#   Max behind by: 116                 
#db#   Uart State: 0                 
#db#   Uart ByteCnt: 0                 
#db#   Uart ByteCntMax: 256                 
#db#   Trace length: 0                 

The HF antenna is right :

[== Undefined ==]
# LF antenna:  0,00 V @   125.00 kHz          
# LF antenna:  0,00 V @   134.00 kHz          
# LF optimal:  0,00 V @ 12000,00 kHz          
# HF antenna: 17,83 V @    13.56 MHz          
# Your LF antenna is unusable.     

   

And I use the last bootom, fpga and osimage versions (download on the github):

[== Undefined ==]
#db# Prox/RFID mark3 RFID instrument                 
#db# bootrom: master/v2.0.0-131-g26fbe1f-suspect 2015-06-16 12:07:18                 
#db# os: master/v2.0.0-131-g26fbe1f-suspect 2015-06-16 12:07:20                 
#db# HF FPGA image built on 2015/03/09 at 08:41:42                 
uC: AT91SAM7S256 Rev B          
Embedded Processor: ARM7TDMI          
Nonvolatile Program Memory Size: 256K bytes          
Second Nonvolatile Program Memory Size: None          
Internal SRAM Size: 64K bytes          
Architecture Identifier: AT91SAM7Sxx Series          
Nonvolatile Program Memory Type: Embedded Flash Memory

I read that the problem could be the DMA buffer which is filled because a bad optimization of compilator, or bad version, or bad configuration of cross-compilation with devkitARM.

I work on Ubuntu 14.04LTS (with Kubuntu), the kernel linux version is 3.13.0-54-generic (buildd@aatxe) and my processor architecture is i686. The version of compiler is gcc version 4.8.2.

My proxmark folder is composed of :

[== Undefined ==]
thom@NFC:~/Documents/proxmark3$ ls -l
total 96
drwxrwxr-x 3 thom thom  4096 juin  16 11:05 armsrc
drwxrwxr-x 3 thom thom  4096 juin  16 11:05 bootrom
-rw-rw-r-- 1 thom thom  2275 juin  16 10:44 CHANGELOG.md
drwxrwxr-x 8 thom thom  4096 juin  16 11:08 client
drwxrwxr-x 2 thom thom  4096 juin  16 10:44 common
-rw-rw-r-- 1 thom thom  4294 juin  16 10:44 COMPILING.txt
drwxr-xr-x 8 thom thom  4096 juin  16 11:11 devkitARM
drwxrwxr-x 2 thom thom  4096 juin  16 10:44 doc
drwxrwxr-x 2 thom thom  4096 juin  16 10:44 driver
drwxrwxr-x 3 thom thom  4096 juin  16 10:44 fpga
-rw-rw-r-- 1 thom thom  7994 juin  16 10:44 HACKING.txt
drwxrwxr-x 2 thom thom  4096 juin  16 10:44 include
drwxrwxr-x 2 thom thom  4096 juin  16 11:06 liblua
-rw-rw-r-- 1 thom thom 15123 juin  16 10:44 LICENSE.txt
-rw-rw-r-- 1 thom thom  2170 juin  16 10:44 Makefile
-rw-rw-r-- 1 thom thom  2807 juin  16 10:44 README.txt
drwxrwxr-x 2 thom thom  4096 juin  16 14:10 recovery
drwxrwxr-x 4 thom thom  4096 juin  16 10:44 tools
drwxrwxr-x 2 thom thom  4096 juin  16 10:44 traces

The environment variable PATH contains :  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/thom/Documents/proxmark3//devkitARM/bin

The DevkitARM included arm-none-eabi-gcc-4.9.2

Someone has an idea of what could be the problem ?

Offline

#13 2015-06-16 18:11:41

marshmellow
Contributor
From: US
Registered: 2013-06-10
Posts: 2,302

Re: optimization parameter with gcc

there is a known issue with many base 14b commands especially snoop.  check github issues.
it is being worked on as our busy volunteer developers get time.

Offline

#14 2015-06-23 10:04:21

Dake
Contributor
Registered: 2015-06-16
Posts: 32

Re: optimization parameter with gcc

I read the github issue, thank you a lot for the revision !
Now 14b snoop works very well !

Offline

Board footer

Powered by FluxBB