FT817OS Advanced options Debugger

FT817COMM has a robust built-in Debugger, and FT817OS can enable it. Just type debug on


[FT817]@/dev/ttyUSB0/:# debug on
DEBUGGER IS ON


[FT817]@/dev/ttyUSB0/:# 


The debugger has pre formatted output from the system subroutines of FT817COMM. We will show a few examples below


A Basic Cat Command


[FT817]@/dev/ttyUSB0/:# cat getmode

(sendCat:DEBUG) - DATA OUT ------> 00 00 00 00 03

(sendCat:DEBUG) - BUILT PACKET --> 0000000003

(sendCat:DEBUG) - DATA IN <------- 1471205001="" font="">

Mode is USB

[FT817]@/dev/ttyUSB0/:# 

This shows the DATA being formatted, the  CAT command going out and the response coming in


An EEPROM Get Command


[FT817]@/dev/ttyUSB0/:# get agc

(eepromDecode:DEBUG) - READING FROM ------> [0057]

(eepromDecode:DEBUG) - PACKET BUILT ------> [00570000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [20]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [00100000]

AGC is AUTO


[FT817]@/dev/ttyUSB0/:# 


This shows the DATA being formatted by eepromdecode, command going out and the response coming in



An EEprom Set Command (single bit modification)



[FT817]@/dev/ttyUSB0/:# set dsp on  

(eepromDecode:DEBUG) - READING FROM ------> [0057]

(eepromDecode:DEBUG) - PACKET BUILT ------> [00570000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [20]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [00100000]


(writeEeprom:DEBUG) - OUTPUT FROM [0057]

(writeEeprom:DEBUG) - PACKET BUILT ------> [00570000BB]

(writeEeprom:DEBUG) - BYTE1 (20) BYTE2 (00) from [0057]

(writeEeprom:DEBUG) - BYTE1 BINARY IS [00100000]

(writeEeprom:DEBUG) - CHANGING BIT(5) to (1)

(writeEeprom:DEBUG) - BYTE1: BINARY IS [00100100] AFTER CHANGE

(writeEeprom:DEBUG) - CHECKING IF [24] needs padding

(writeEeprom:DEBUG) - No padding of [24] needed

(writeEeprom:DEBUG) - BYTE1 (24) BYTE2 (00) to [0057]

(writeEeprom:DEBUG) - WRITING  ----------> (24) (00)

(writeEeprom:DEBUG) - PACKET BUILT ------> [00572400BC]

(writeEeprom:DEBUG) - VALUES WRITTEN, CHECKING...

(writeEeprom:DEBUG) - SHOULD BE: (24) (00)

(writeEeprom:DEBUG) - IS: -----> (24) (00)

(writeEeprom:DEBUG) - VALUES MATCH!!!

DSP set to ON sucessfull!


[FT817]@/dev/ttyUSB0/:# 


This shows the module checking the current status of DSP, checking if the DSP bit is on.  If it is off (which it is) it calls writeEeprom to set the bit to 1 , building the byte, converting it to hex, pad the hex value, get the next memory address, write both bytes  and then recheck the values to see if they are correct




An EEprom Set Command (Multi bit modification)



[FT817]@/dev/ttyUSB0/:# set agc fast

(eepromDecode:DEBUG) - READING FROM ------> [0057]

(eepromDecode:DEBUG) - PACKET BUILT ------> [00570000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [20]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [00100000]


(eepromDecode:DEBUG) - READING FROM ------> [0057]

(eepromDecode:DEBUG) - PACKET BUILT ------> [00570000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [20]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [00100000]


(writeBlock:DEBUG) - OUTPUT FROM [0057]

(writeBlock:DEBUG) - PACKET BUILT ------> [00570000BB]

(writeBlock:DEBUG) - BYTE2 (00) from [0057]

(writeBlock:DEBUG) - BYTE1 (21) BYTE2 (00) to   [0057]

(writeBlock:DEBUG) - CHECKING IF [21] needs padding

(writeBlock:DEBUG) - No padding of [21] needed

(writeBlock:DEBUG) - WRITING  ----------> [21] [00]

(writeBlock:DEBUG) - PACKET BUILT ------> [00572100BC]

(writeBlock:DEBUG) - VALUES WRITTEN, CHECKING...

(writeBlock:DEBUG) - SHOULD BE: (21) (00)

(writeBlock:DEBUG) - IS: -----> (21) (00)

(writeBlock:DEBUG) - VALUES MATCH!!!

AGC Set to FAST sucessfull!


[FT817]@/dev/ttyUSB0/:# 



This shows the first eepromDecode being called to see if age is set to fast (which it isnt) writeBlock calls eeprom decode once more to grab the byte value, change several bits and repackage it.  It then checks if the Hex value needs padding, get the next byte and writes both to the memory address.  It then revalidates both bytes written


An EEprom Set Command (Single bit modification with memory offsets)


[FT817]@/dev/ttyUSB0/MEMORY[MEM:1]:# att on

(eepromDecode:DEBUG) - READING FROM ------> [0055]

(eepromDecode:DEBUG) - PACKET BUILT ------> [00550000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [00]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [00000000]


(hexAdder:DEBUG) - RECEIVED BASE [0484] AND OFFSET [0]

(hexAdder:DEBUG) - CONVERT  BASE [0x0484]

(hexAdder:DEBUG) - OCT   BASEHEX [1156]

(hexAdder:DEBUG) - ADDED OFFSET [0484]

(hexAdder:DEBUG) - PRODUCED [0484]


(eepromDecode:DEBUG) - READING FROM ------> [0484]

(eepromDecode:DEBUG) - PACKET BUILT ------> [04840000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [85]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [10000101]


(hexAdder:DEBUG) - RECEIVED BASE [0484] AND OFFSET [2]

(hexAdder:DEBUG) - CONVERT  BASE [0x0484]

(hexAdder:DEBUG) - OCT   BASEHEX [1156]

(hexAdder:DEBUG) - ADDED OFFSET [0486]

(hexAdder:DEBUG) - PRODUCED [0486]


(eepromDecode:DEBUG) - READING FROM ------> [0486]

(eepromDecode:DEBUG) - PACKET BUILT ------> [04860000BB]

(eepromDecode:DEBUG) - OUTPUT HEX  -------> [00]

(eepromDecode:DEBUG) - OUTPUT BIN  -------> [00000000]


(hexAdder:DEBUG) - RECEIVED BASE [0484] AND OFFSET [2]

(hexAdder:DEBUG) - CONVERT  BASE [0x0484]

(hexAdder:DEBUG) - OCT   BASEHEX [1156]

(hexAdder:DEBUG) - ADDED OFFSET [0486]

(hexAdder:DEBUG) - PRODUCED [0486]


(writeEeprom:DEBUG) - OUTPUT FROM [0486]

(writeEeprom:DEBUG) - PACKET BUILT ------> [04860000BB]

(writeEeprom:DEBUG) - BYTE1 (00) BYTE2 (48) from [0486]

(writeEeprom:DEBUG) - BYTE1 BINARY IS [00000000]

(writeEeprom:DEBUG) - CHANGING BIT(3) to (1)

(writeEeprom:DEBUG) - BYTE1: BINARY IS [00010000] AFTER CHANGE

(writeEeprom:DEBUG) - CHECKING IF [10] needs padding

(writeEeprom:DEBUG) - No padding of [10] needed

(writeEeprom:DEBUG) - BYTE1 (10) BYTE2 (48) to [0486]

(writeEeprom:DEBUG) - WRITING  ----------> (10) (48)

(writeEeprom:DEBUG) - PACKET BUILT ------> [04861048BC]

(writeEeprom:DEBUG) - VALUES WRITTEN, CHECKING...

(writeEeprom:DEBUG) - SHOULD BE: (10) (48)

(writeEeprom:DEBUG) - IS: -----> (10) (48)

(writeEeprom:DEBUG) - VALUES MATCH!!!

ATT set to ON sucessfull!

[FT817]@/dev/ttyUSB0/MEMORY[MEM:1]:# 

This is the same as the first example but uses hexAdder to read memory offsets from the memory location hash to move the bits to the correct locations

No comments:

Post a Comment