Open ndyer opened 9 years ago
Only way is to verify that the checksum of the file matches that of the device.
Thanks
Michael Gong Sr Staff Applications Engineer Microchip Technology 450 Holger Way San Jose, CA 95134 C: (408) 316-2145 D: (408) 720-6501 E: Michael.Gong@microchip.com
From: Michael John notifications@github.com Sent: Friday, January 18, 2019 8:47 AM To: atmel-maxtouch/mxt-app mxt-app@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [atmel-maxtouch/mxt-app] Display configuration checksums, NVRAM and in-memory (#14)
Is there anyway currently to verify that a configuration file matches what is loaded in NVRAM?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/atmel-maxtouch/mxt-app/issues/14#issuecomment-455611924, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABq_bcoyykHkInLacL6RksIbgqk3Hshaks5vEfqagaJpZM4E88aI.
Thanks Michael, I can read the checksum for the .xcfg file but how can I read it from the device?
Hi. If you have the .xcfg file in the same location, then you can issue the following command.
./mxt-app –checksum Filename.xcfg
This will display if the checksums are the same.
Michael Gong Sr Staff Applications Engineer Microchip Technology 450 Holger Way San Jose, CA 95134 C: (408) 316-2145 D: (408) 720-6501 E: Michael.Gong@microchip.com
From: Michael John notifications@github.com Sent: Friday, January 18, 2019 12:56 PM To: atmel-maxtouch/mxt-app mxt-app@noreply.github.com Cc: Michael Gong - C40415 Michael.Gong@microchip.com; Comment comment@noreply.github.com Subject: Re: [atmel-maxtouch/mxt-app] Display configuration checksums, NVRAM and in-memory (#14)
Thanks Michael, I can read the checksum for the .xcfg file but how can I read it from the device?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/atmel-maxtouch/mxt-app/issues/14#issuecomment-455684744, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABq_bYdH-pBiKjr3x7XP1q7bbA6qdibbks5vEjTXgaJpZM4E88aI.
Hi Michael,
That doesn't appear to work as expected. I have three configuration files and they all report a verified checksum, but the first one is the one loaded. (First and third one are the same file but different name/location)
# mxt-app --checksum /lib/firmware/maxtouch.xcfg
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /lib/firmware/maxtouch.xcfg in XCFG format
File checksum verified: 3519951
# mxt-app --checksum /root/Rev03.xcfg
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /root/Rev03.xcfg in XCFG format
File checksum verified: 7810530
# mxt-app --checksum /root/Rev04.xcfg
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /root/Rev04.xcfg in XCFG format
File checksum verified: 3519951
Can you send over your configs. Let me double check.
Thanks
Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message -------- From: Michael John notifications@github.com Date: 1/21/19 11:37 AM (GMT-08:00) To: atmel-maxtouch/mxt-app mxt-app@noreply.github.com Cc: Michael Gong - C40415 Michael.Gong@microchip.com, Comment comment@noreply.github.com Subject: Re: [atmel-maxtouch/mxt-app] Display configuration checksums, NVRAM and in-memory (#14)
Hi Michael,
That doesn't appear to work as expected. I have three configuration files and they all report a verified checksum, but the first one is the one loaded. (First and third one are the same file but different name/location)
Version:1.28 Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a Configuration read from /lib/firmware/maxtouch.xcfg in XCFG format File checksum verified: 3519951
Version:1.28 Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a Configuration read from /root/Rev03.xcfg in XCFG format File checksum verified: 7810530
Version:1.28 Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a Configuration read from /root/Rev04.xcfg in XCFG format File checksum verified: 3519951
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/atmel-maxtouch/mxt-app/issues/14#issuecomment-456179821, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABq_bey6NG53yUcahLvv8JDs8XabehP8ks5vFhbcgaJpZM4E88aI.
Attached is a zip file containing the three files I mentioned above. tpk-touchscreen.zip
Hi Michael. I have duplicated the error. We will work on fixing this.
The –checksum parameter is supposed to print out verified if the file and chip content is the same.
If the content is not the same, the printout is supposed to be what is in the file and what is in the chip.
The calculated checksum from the chip is not working.
The verified printout is also printing in decimal format.
Thanks
Michael Gong Sr Staff Applications Engineer Microchip Technology 450 Holger Way San Jose, CA 95134 C: (408) 316-2145 D: (408) 720-6501 E: Michael.Gong@microchip.com
From: Michael John notifications@github.com Sent: Monday, January 21, 2019 11:37 AM To: atmel-maxtouch/mxt-app mxt-app@noreply.github.com Cc: Michael Gong - C40415 Michael.Gong@microchip.com; Comment comment@noreply.github.com Subject: Re: [atmel-maxtouch/mxt-app] Display configuration checksums, NVRAM and in-memory (#14)
Hi Michael,
That doesn't appear to work as expected. I have three configuration files and they all report a verified checksum, but the first one is the one loaded. (First and third one are the same file but different name/location)
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /lib/firmware/maxtouch.xcfg in XCFG format
File checksum verified: 3519951
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /root/Rev03.xcfg in XCFG format
File checksum verified: 7810530
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /root/Rev04.xcfg in XCFG format
File checksum verified: 3519951
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/atmel-maxtouch/mxt-app/issues/14#issuecomment-456179821, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABq_bey6NG53yUcahLvv8JDs8XabehP8ks5vFhbcgaJpZM4E88aI.
Hi, Michael. Sorry, I was mistaken regarding the –checksum parameter.
After reviewing the code, it appears the –checksum parameter is used to recalculate the checksum and compare it to the file checksum.
The calculated checksum is not done on the content of the chip, so the results you received were correct.
The only way to get the device checksum using mxt-app is to save a configuration and verify the value at the head of the .xcfg file (CHECKSUM=0xAABBCC).
We can add a parameter that reads from the chip directly on a later release of the tool.
Sorry for the confusion.
Let me know if you have questions.
From: Michael John notifications@github.com Sent: Monday, January 21, 2019 11:37 AM To: atmel-maxtouch/mxt-app mxt-app@noreply.github.com Cc: Michael Gong - C40415 Michael.Gong@microchip.com; Comment comment@noreply.github.com Subject: Re: [atmel-maxtouch/mxt-app] Display configuration checksums, NVRAM and in-memory (#14)
Hi Michael,
That doesn't appear to work as expected. I have three configuration files and they all report a verified checksum, but the first one is the one loaded. (First and third one are the same file but different name/location)
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /lib/firmware/maxtouch.xcfg in XCFG format
File checksum verified: 3519951
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /root/Rev03.xcfg in XCFG format
File checksum verified: 7810530
Version:1.28
Registered sysfs path:/sys/bus/i2c/drivers/atmel_mxt_ts/1-004a
Configuration read from /root/Rev04.xcfg in XCFG format
File checksum verified: 3519951
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/atmel-maxtouch/mxt-app/issues/14#issuecomment-456179821, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABq_bey6NG53yUcahLvv8JDs8XabehP8ks5vFhbcgaJpZM4E88aI.
We posted an updated for the checksum.
You can use the (I) command to read out the Information Block CRC and the configuration CRC.
Thanks
Michael Gong Sr Staff Applications Engineer Microchip Technology 450 Holger Way San Jose, CA 95134 C: (408) 316-2145 D: (408) 720-6501 E: Michael.Gong@microchip.com
From: Michael John notifications@github.com Sent: Tuesday, January 22, 2019 6:11 AM To: atmel-maxtouch/mxt-app mxt-app@noreply.github.com Cc: Michael Gong - C40415 Michael.Gong@microchip.com; Comment comment@noreply.github.com Subject: Re: [atmel-maxtouch/mxt-app] Display configuration checksums, NVRAM and in-memory (#14)
Attached is a zip file containing the three files I mentioned above. tpk-touchscreen.ziphttps://github.com/atmel-maxtouch/mxt-app/files/2783064/tpk-touchscreen.zip
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/atmel-maxtouch/mxt-app/issues/14#issuecomment-456412693, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABq_bXriZj_Jvll1N3NduP9gmq_QmQqYks5vFxwMgaJpZM4E88aI.
Is there anyway currently to verify that a configuration file matches what is loaded in NVRAM?