]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: "hf legic write" with these I managed to get one byte written. Its a start.
authoriceman1001 <iceman@iuse.se>
Fri, 7 Oct 2016 20:16:38 +0000 (22:16 +0200)
committericeman1001 <iceman@iuse.se>
Fri, 7 Oct 2016 20:16:38 +0000 (22:16 +0200)
armsrc/legicrf.c

index a92e76713783ca55ce2bdfc3b700c9d3b3719aef..ae24f007f1801ea43e0d1c386ad0cb47815f7709 100644 (file)
@@ -426,10 +426,9 @@ bool legic_write_byte(uint16_t index, uint8_t byte, uint8_t addr_sz) {
        cmd     |= (crc & 0xF ) << (addr_sz+1+8);       // CRC
 
        /* Bitbang the response */
-       AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;
+       //AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;
        
-       legic_prng_forward(2);
-       WaitTicks(330);
+       WaitTicks(240);
        
        frame_sendAsReader(cmd, cmd_sz);
        
@@ -466,8 +465,6 @@ bool legic_write_byte(uint16_t index, uint8_t byte, uint8_t addr_sz) {
                        goto OUT;
         }
     }
-
-       Dbprintf("ice: i == %d",i);
                
 OUT: ;
        // log
@@ -541,7 +538,7 @@ void LegicRfWriter(uint16_t offset, uint16_t len, uint8_t iv, uint8_t *data) {
        while( len > 0 ) {
                --len;          
                if ( !legic_write_byte( len + offset, data[len], card.addrsize) ) {
-                       Dbprintf("operation failed | %d | %d | %d", len + offset, len, data[len] );
+                       Dbprintf("operation failed | %02X | %02X | %02X", len + offset, len, data[len] );
                        isOK = 0;
                        goto OUT;
                }
Impressum, Datenschutz