Increase space, fix zerofill in emem_print, disable DEBUG, dumper util
Note: emem_print output format has been changedserial
parent
e04883e09f
commit
dc3227a7cb
|
@ -2,3 +2,4 @@
|
|||
*~
|
||||
*.swp
|
||||
arduino/eeprom.bin
|
||||
arduino/.build
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env python2
|
||||
|
||||
from sys import argv
|
||||
|
||||
from lib.actions import scan
|
||||
from lib.proto import Proto
|
||||
from lib.storage import get_card
|
||||
from lib.password import get_token
|
||||
from lib.command import signed_command
|
||||
import options
|
||||
|
||||
if __name__ == '__main__':
|
||||
url = argv[1] if len(argv) > 1 else options.url
|
||||
token = get_token()
|
||||
proto = Proto(url)
|
||||
proto.send(signed_command(command='P', hash=options.empty_hash, uid=0, token=token))
|
||||
while True:
|
||||
print proto.fd.readline(),
|
|
@ -1,4 +1,4 @@
|
|||
url = '/dev/ttyACM1'
|
||||
url = '/dev/ttyACM0'
|
||||
serial = dict(
|
||||
baudrate = 19200,
|
||||
timeout = 60,
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
/** First record ID. */
|
||||
#define ENEM_MIN_ADR (1)
|
||||
/** Last record ID. */
|
||||
#define EMEM_MAX_ADR (100)
|
||||
#define EMEM_MAX_ADR (140)
|
||||
/** Invalid record ID. */
|
||||
#define EMEM_INV_ADR (0)
|
||||
/** Size of stored hash. */
|
||||
#define EMEM_HASH_SIZE (32)
|
||||
/** Flag that indicates (if defined) verbose mode (for diagnostic) */
|
||||
#define DEBUG 1
|
||||
// #define DEBUG 1
|
||||
/**
|
||||
* Flag that indicates (if defined) keyboard simulation mode (for diagnostic).
|
||||
* In this mode keyboard always return pin.
|
||||
|
|
|
@ -128,8 +128,10 @@ void emem_print() {
|
|||
Serial.print(ii,HEX);
|
||||
Serial.print(',');
|
||||
Serial.print(id,HEX);
|
||||
Serial.print(',');
|
||||
for (int jj=0;jj<EMEM_HASH_SIZE;jj++){
|
||||
Serial.print(',');
|
||||
if(*(g_Hash+jj) < 16)
|
||||
Serial.print('0');
|
||||
Serial.print(*(g_Hash+jj),HEX);
|
||||
}
|
||||
Serial.println();
|
||||
|
|
Loading…
Reference in New Issue