iceman1001 / ChameleonMini-rebootedGUI

Windows based GUI for Chameleon Mini, the contactless smartcard emulator (NFC/RFID)
GNU General Public License v3.0
290 stars 72 forks source link

To implement xmodem download in the serial tab #88

Closed iceman1001 closed 5 years ago

iceman1001 commented 5 years ago

When sending download command in serial tab, the client crashes. Since it waits for xmodem download and thats not supported yet.

Vrumfondel commented 5 years ago

Anybody on this one yet? Otherwise I will have a look tomorrow ...

iceman1001 commented 5 years ago

all yours, bro!

iceman1001 commented 5 years ago

I suggest printing the downloaded bytes as ascii-hex.. [00 AA BB CC]

bogiton commented 5 years ago

I was thinking of popping up a dialog to select the file to load/save just before the xmodem upload/download takes place. What do you think?

Vrumfondel commented 5 years ago

Hm. In my opinion the serial tab is for more "lowlevel" work, so just sending and receiving plain information is what I would expect (like to quickly check the content without the need afterwards to open the dump again) If someone wants to save the data there is still the "Download Dump" function in tab "Operation".

But what in deed is needed is to change the font for this window to a fixed size one ....

bogiton commented 5 years ago

It sure is low-level, but then again why would someone use the GUI for serial commands? :P Let's say that the print of the actual bytes when we issue the download command would suffice. But what should happen with upload? Write the bytes one-by-one in the textbox? Those two commands should be complementary. And since it is part of a GUI, there should be some easiness in it.

iceman1001 commented 5 years ago

No popup. We have tab operations for GUI communications with the device.
The serial tab is for sending text commands, and if you send download, you don't want it to crash. I suggest we return a hex-string (32bytes in a row) and print in the output window.

Yes, fixed sized font is needed. I have also another idea with different colors from when sending vs receiving texts. I will push it..

Vrumfondel commented 5 years ago

@bogiton: I frequently use the serial tab instead of some serial-terminal. Having the available commands clickable makes it quite easy to use. In addition it is quite "generic". It can be used for any function the connected chameleon might support - independent from a specific implementation in the GUI. Example: The chamaeleon sends more data in xmodem then needed (at least for this command), so saving this to a file would only make sense when reading out the memsize aswell - ending up in duplicating the allready existing function. In my current PR, whenever the chameleon answered with an request to send data via XMODEM, this is done and printed to screen, no matter which command triggered that.

@iceman: Just sent the PR, currently the format is 8-byte wise, but changing it to 32 is surely an option. I mainly want to avoid the need for horizontal scrolling in this case. What about making this depending from the actual tb-width - at least in steps like 8, 16, 32 bytes?

iceman1001 commented 5 years ago

NOOOO.. I just pushed my changes... Have a look at the colors :)

Vrumfondel commented 5 years ago

No problem.

I'll merge this with my changes and create a new PR. No big deal.

iceman1001 commented 5 years ago

Regarding byte width, doesn't current output textbox window fit 32hex with spaces in a row?
We have space to make box larger, now that the help text is to the left.

iceman1001 commented 5 years ago

Merged! Looks better, I will push some minor adaptations to it...

strange thing, my helpmy doesn't show the DETECTMY ...

bogiton commented 5 years ago

I get what you say about the DOWNLOAD, but what about the UPLOAD cmd? :) It also crashes the GUI. @iceman1001 I get DETECTIONMY in mine. As far as I remember, there used to be an issue in the firmware, where the declaration of the command was below the other ones, so the helpmy wasn't returning it.

iceman1001 commented 5 years ago

I say we disable UPLOAD in the serial tab. I don't want that functionality in there.

Aha, I may have the original RevE rebooted firmware installed. :)

iceman1001 commented 5 years ago

ok, I pushed a fix where UPLOAD is blocked in tab serial. Also Tab serial prints the DETECTIONMY output in hex string. That will take care of some crashes.

bogiton commented 5 years ago

That's great! It is really coming out very nicely :) If only we could get those timings in the firmware fixed :P