summaryrefslogtreecommitdiff
path: root/downloader
diff options
context:
space:
mode:
Diffstat (limited to 'downloader')
-rwxr-xr-xdownloader/downloader.py8
-rw-r--r--downloader/proto.txt8
2 files changed, 8 insertions, 8 deletions
diff --git a/downloader/downloader.py b/downloader/downloader.py
index f0407e9..c0ce34f 100755
--- a/downloader/downloader.py
+++ b/downloader/downloader.py
@@ -158,8 +158,8 @@ def exec_command(dev, cmd, param, answer):
### Commands
def identify(dev):
- data = exec_command(dev, 1, '', '<BB10sHHBHBH')
- id = { 'ver_min': data[0], 'ver_maj': data[1], 'name': data[2], 'devid': data[3],
+ data = exec_command(dev, 1, '', '<BBHHHBHBH')
+ id = { 'ver_min': data[0], 'ver_maj': data[1], 'userid': data[2], 'devid': data[3],
'fs': data[4], 'fss': data[5], 'es': data[6], 'mess': data[7], 'supported': data[8] }
if id['ver_maj'] != VERSION_MAJ:
@@ -169,8 +169,8 @@ def identify(dev):
print "FSS value is 0 "
sys.exit(4)
- print "connected with Bootloader '%s' Version %d.%d, (ID=%04X, %d bytes Flash, FSS=%d, %d bytes EEPROM, MESS=%d)" % \
- (id['name'], id['ver_maj'], id['ver_min'], id['devid'], id['fs'], id['fss'], id['es'], id['mess'])
+ print "connected with Bootloader '%04X' Version %d.%d, (ID=%04X, %d bytes Flash, FSS=%d, %d bytes EEPROM, MESS=%d)" % \
+ (id['userid'], id['ver_maj'], id['ver_min'], id['devid'], id['fs'], id['fss'], id['es'], id['mess'])
return id
def boot(dev):
diff --git a/downloader/proto.txt b/downloader/proto.txt
index a53acc9..af32584 100644
--- a/downloader/proto.txt
+++ b/downloader/proto.txt
@@ -43,16 +43,16 @@ identify:
1 | len=3 | <csum>
answer:
- 1 | len=22 | <ret> | version | name | devid | fs | fss | es | mess | supported | <csum>
+ 1 | len=22 | <ret> | version | userid | devid | fs | fss | es | mess | supported | <csum>
version:
2bytes, protocol version
It is an error if the major version (MSB) is different (hence any
protocol update must change the major version of the bootloader).
- name:
- 10bytes, a descriptive name of the device.
- The downloader has to compare this name with the device name supplied
+ userid:
+ 2bytes, an id which determines the exact device
+ The downloader has to compare this with the device id supplied
via commandline and stop in case they don't match
devid: