diff --git a/Doc/Doxygen/html/_page_14443_a_reader.html b/Doc/Doxygen/html/_page_14443_a_reader.html new file mode 100644 index 0000000..3cb84e6 --- /dev/null +++ b/Doc/Doxygen/html/_page_14443_a_reader.html @@ -0,0 +1,158 @@ + + + + + + + +Chameleon-Mini: ISO14443A Reader Functionality + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ISO14443A Reader Functionality
+
+
+

The ChameleonMini is able to act as an ISO 14443A reader. This page describes how to use this configuration (See Configurations) correctly.

+

Supported Commands

+

Using the ISO 14443A reader configuration enables the usage of some commands that are only available within this configuration.

+
Note
Technically, the SEND and SEND_RAW commands are also timeout commands, but they end successfully (either with NO DATA or the response) nearly immediately on every call.
+
+Each of the following commands returns INVALID COMMAND USAGE on a non-reader configuration.
+
Warning
The reader field is only turned on if this is necessary. Some commands deactivate the reader field after they are done, some do not deactivate the reader field after finishing. Please be aware, that the reader field takes a massive amount of energy and thus the voltage of the battery can drop to a critical level fastly. If not mentioned differently, all of the commands below deactivate the reader field after work.
+

SEND <BYTEVALUE>

+

There are two cases what is done, depending on the parameter:

    +
  1. If the parameter is one byte, no parity bits are added, since this must be a short frame command. In this case the seven least significant bits are sent.
  2. +
  3. If the parameter consists of more than one byte, parity bits are added and afterwards the whole sequence is sent.
  4. +
+

After sending, the ChameleonMini waits for an answer and returns either

+

In each case, the ChameleonMini code 101:OK WITH TEXT is returned.

+

Examples

+ +
Warning
This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.
+

SEND <2-BYTEVALUE> <BYTEVALUE>

+

Does the same like the command with only one parameter, but the first parameter indicates the to-be-sent bit count.

+
Warning
If the bit count parameter is neither 7 or a multiple of 8, no parity bits will be appended, but the remaining functionality is the exact same!
+

Examples

+ +
Warning
This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.
+

SEND_RAW <BYTEVALUE>

+

Sends the given byte sequence. The ChameleonMini assumes that the parameter has the parity bits already appended and thus calculates the bit count itself:

+

After sending, the ChameleonMini waits for an answer and returns either

+

Examples

+ +
Warning
This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.
+

SEND_RAW <2-BYTEVALUE> <BYTEVALUE>

+

Does the same like the command with only one parameter, but the first parameter indicates the to-be-sent bit count.

+

Examples

+ +
Warning
This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.
+

GETUID

+

This is a timeout command. It tries to obtain the UID from a card that is in reader range and returns it.

+

If this command is called within the reader configuration, it either ends up returning 101:OK WITH TEXT and the UID or with a timeout (no matter if on setting/configuration change or on real timeout).

+

DUMP_MFU

+

This is a timeout command. It tries to read the whole content of a MiFare Ultralight card that is in reader range and returns the content.

+

If this command is called within the reader configuration, it either ends up returning 101:OK WITH TEXT and the card content in 4 lines (each line contains 16 bytes) or with a timeout (no matter if on setting/configuration change or on real timeout).

+

IDENTIFY

+

This is a timeout command. Tries to identify the type of a card in reader range and returns the type.

+

If this command is called within the reader configuration, it ends in one of three ways:

    +
  1. Return code 101:OK WITH TEXT, the card type and ATQA value, UID value and SAK value of the highest cascade level.
  2. +
  3. Return code 101:OK WITH TEXT, the information that this card type is unknown to the ChameleonMini ("Unknown card.") and ATQA value, UID value and SAK value of the highest cascade level.
  4. +
  5. Timeout (no matter if on setting/configuration change or on real timeout).
  6. +
+

AUTOCALIBRATE

+

This is a timeout command. Tries to select to a card with every threshold within a range with a specific step size and chooses the best threshold.

+

If this command is called within the reader configuration, it ends in one of the following ways:

    +
  1. Return code 101:OK WITH TEXT and a list of the tested thresholds with a + for every threshold where the select protocol was successful and a - if the select protocol was not successfully finished.
  2. +
  3. Timeout (no matter if on setting/configuration change or on real timeout).
  4. +
+
Note
If no working threshold was found, the threshold is reset to the standard threshold.
+
+ + + + diff --git a/Doc/Doxygen/html/_page__buttons.html b/Doc/Doxygen/html/_page__buttons.html new file mode 100644 index 0000000..6679675 --- /dev/null +++ b/Doc/Doxygen/html/_page__buttons.html @@ -0,0 +1,116 @@ + + + + + + + +Chameleon-Mini: Buttons + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Buttons
+
+
+

For user interaction, ChameleonMini provides two configurable push buttons, i.e., LBUTTON on the left side and RBUTTON on the right side of Chameleon. Chameleon distinguishes between

    +
  1. a short (< ~1.28 s) press of the button and
  2. +
  3. a long (≥ ~1.28 s) press of the button.
  4. +
+

Thus, there are four different commands for configuring the buttons:

    +
  1. LBUTTON
  2. +
  3. RBUTTON
  4. +
  5. LBUTTON_LONG
  6. +
  7. RBUTTON_LONG
  8. +
+

Each of these commands can be used in the getting ("?"), setting ("=") and suggesting ("=?") version.

+

Supported Configurations

+

The following table describes all currently implemented options for the button configuration.

+ + + + + + + + + + + + + + + + + + + + + + + + +
Configuration name Description
NONE No function, the button is disabled
UID_RANDOM Sets a random UID for the current card slot.
UID_LEFT_INCREMENT Increments the UID for the current card slot. The UID is interpreted as little-endian.
UID_RIGHT_INCREMENTIncrements the UID for the current card slot. The UID is interpreted as big-endian.
UID_LEFT_DECREMENT Decrements the UID for the current card slot. The UID is interpreted as little-endian.
UID_RIGHT_DECREMENTDecrements the UID for the current card slot. The UID is interpreted as big-endian.
CYCLE_SETTINGS Cycles through the slots/settings. If the configuration of a slot is set to NONE, this slot is skipped. When the last slot is reached, the next button press selects the first slot, again.
STORE_MEM Stores the current setting into the permanent Flash memory. Equivalent to the STORE command.
RECALL_MEM Recalls a setting from the permanent Flash memory. Equivalent to the RECALL command.
TOGGLE_FIELD Activates the reader field if it was deactivated, deactivates the reader field if it was activated.
STORE_LOG Writes the current log from SRAM to FRAM and clears the SRAM log. Equivalent to the STORE_LOG command.
+

Note the UID commands have no effect when the slot is configured as reader.

+
+ + + + diff --git a/Doc/Doxygen/html/_page__command_line.html b/Doc/Doxygen/html/_page__command_line.html new file mode 100644 index 0000000..d1dfa6c --- /dev/null +++ b/Doc/Doxygen/html/_page__command_line.html @@ -0,0 +1,278 @@ + + + + + + + +Chameleon-Mini: The Chameleon Command Structure + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
The Chameleon Command Structure
+
+
+

After plugging in a USB cable, the ChameleonMini enumerates as a virtual serial interface. The settings of the serial interface, e.g. baudrate, stop and parity bits, are ignored by the Chameleon. For a high level of compatibility towards both humans and computers, Chameleon can be set up and controlled by means of a text-based command line interface, which can be accessed by using simple terminal software like hyper-terminal or teraterm. The command line is optimized to cooperate with script languages such as Python or TCL.

+
Note
Before reading this page, you may also wish to have a look at the Chameleon Android App, which is an external contribution to this project. Development and maintenance can be found here (please also ask questions regarding the app there).
+

Chameleon Command Structure

+

For communicating with the Chameleon via USB, there exist four different syntax types:

+

For example, CONFIG=? lists the available types of virtualized cards and other options to configure a slot, while CONFIG=MF_CLASSIC_1K sets the current slot to Mifare Classic 1k emulation. In consequence, CONFIG? will return MF_CLASSIC_1K. Examples for commands executing a function are CLEAR, RESET or UPLOAD.

+

The responses of Chameleon indicate whether an action was successful or whether (and why) an error occurred. Examples: In case of an invalid command, the Chameleon replies with 200:UNKNOWN COMMAND. In case of a known command, but a wrong syntax, the Chameleon replies with 201:INVALID COMMAND USAGE.

+

Note: Each command has to be followed by a carriage return (CR, 0D hexadecimal). The backspace (08 hexadecimal) and escape (1B hexadecimal) keys are supported. All other control characters of the ASCII character set are ignored. The Chameleon commands are not case-sensitive. There is no echo of entered characters by the Chameleon, thus remember to switch on the 'local echo' in your terminal program.

+

Responses

+

Subsequent to any command sent, the Chameleon responds with a status number and a corresponding status message, separated by a colon and terminated with a carriage return and line feed (CR+LF, 0D+0A hexadecimal). Status numbers are of a three-digit decimal format with the first digit showing the severity of the answer. Status numbers beginning with a '1' denote an informational item and those beginning with a '2' denote an error.

+ + + + + + + + + + + + + + + + + + + + +
Response Description
100:OK The command has been successfully executed
101:OK WITH TEXT The command has been successfully executed and this response is appended with an additional line of information, terminated with CR+LF
110:WAITING FOR XMODEM The Chameleon is waiting for an XMODEM connection to be established
120:FALSE The request is answered with false
121:TRUE The request is answered with true
200:UNKNOWN COMMAND This command is unknown to the Chameleon
201:INVALID COMMAND USAGE This action is not supported by this command
202:INVALID PARAMETER The format or value of the given parameter value is invalid
203:TIMEOUT The timeout of the currently active command has expired
+

Chameleon Command Set

+

The current firmware supports the following global commands.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Command Description
CHARGING? Returns if the battery is currently being charged (TRUE) or not (FALSE)
HELP Returns a comma-separated list of all commands supported by the current firmware
RESET Reboots the Chameleon, i.e., power down and subsequent power-up. Note: A reset usually requires a new Terminal session.
RSSI? Returns the voltage measured at the antenna of the Chameleon, e.g., to detect the presence of an RF field or compare the field strength of different RFID readers.
SYSTICK? Returns the system tick value in ms. Note: An overflow occurs every 65,536 ms.
UPGRADE Sets the Chameleon into firmware upgrade mode (DFU). This command can be used instead of holding the RBUTTON while power-on to trigger the bootloader.
VERSION? Requests version information of the current firmware
Button CommandsSee also Buttons
RBUTTON=? Returns a comma-separated list of supported actions for pressing the right button shortly.
RBUTTON? Returns the currently set action for pressing the right button shortly. DEFAULT: SETTING_CHANGE
RBUTTON=<NAME> Sets the action for pressing the right button shortly.
LBUTTON=? Returns a comma-separated list of supported actions for pressing the left button shortly.
LBUTTON? Returns the currently set action for pressing the left button shortly. DEFAULT: RECALL_MEM
LBUTTON=<NAME> Sets the action for pressing the left button shortly.
RBUTTON_LONG=? Returns a comma-separated list of supported actions for pressing the right button a long time.
RBUTTON_LONG? Returns the currently set action for pressing the right button a long time. DEFAULT: SETTING_CHANGE
RBUTTON_LONG=<NAME> Sets the action for pressing the right button a long time.
LBUTTON_LONG=? Returns a comma-separated list of supported actions for pressing the left button a long time.
LBUTTON_LONG? Returns the currently set action for pressing the left button a long time. DEFAULT: RECALL_MEM
LBUTTON_LONG=<NAME> Sets the action for pressing the left button a long time.
LED Commands See also LED functionality
LEDGREEN=? Returns a comma-separated list of supported events for illuminating the green LED
LEDGREEN? Returns the currently set event for lighting the green LED
LEDGREEN=<NAME> Sets the event for which the green LED is lit. DEFAULT: POWERED
LEDRED=? Returns a comma-separated list of supported events for illuminating the red LED
LEDRED? Returns the currently set event for lighting the red LED
LEDRED=<NAME> Sets the event for which the green LED is lit. DEFAULT: SETTING_CHANGE
Log Commands See also Log functionality
LOGMODE=? Returns a comma-separated list of supported log modes
LOGMODE? Returns the current state of the log mode
LOGMODE=<NAME> Sets the current log mode. DEFAULT = OFF
LOGMEM? Returns the remaining free space for logging data to the SRAM (max. 2048 byte)
LOGDOWNLOAD Waits for an XModem connection and then downloads the binary log - including any log data in FRAM.
LOGCLEAR Clears the log memory (SRAM and FRAM)
LOGSTORE Writes the current log from SRAM to FRAM and clears the SRAM log.
Warning
If the FRAM is full, currently no error message is shown. If calling LOGMEM? after executing this command returns any other value than the maximum SRAM log size, there was not sufficient space in the FRAM and nothing has been done.
+
+

ChameleonMini provides eight 'slots' that can be configured to store different virtualized cards, or as active NFC reader, or as completely passive device for sniffing purposes. Each slot stores its configuration and, if applicable, card content. To select a particular slot, use the following command (or configure a button accordingly):

+ + + + + + +
Command Description
SETTING? Returns the currently activated slot
SETTING=<NUMBER> Sets the active slot, where <NUMBER> is a number between 1 and 8 (see Settings)
+

The following commands have an effect on the currently selected slot only:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Command Description
CONFIG=? Returns a comma-separated list of all supported configurations
CONFIG? Returns the configuration of the current slot
CONFIG=<NAME> Sets the configuration of the surrent slot to <NAME> (See Configurations)
UIDSIZE? Returns the UID size of the currently selected card type in Byte
UID? Returns the UID of a card in the current slot
UID=<UID> Sets a new UID, passed in hexadecimal notation.
READONLY? Returns the current state of the read-only mode
READONLY=[0;1] Activates (1) or deactivates (0) the read-only mode (Any writing to the memory is silently ignored)
MEMSIZE? Returns the memory size occupied by the current configuration in Byte
UPLOAD Waits for an XModem connection in order to upload a new virtualized card into the currently selected slot, with a size up to the current memory size
DOWNLOAD Waits for an XModem connection in order to download a virtualized card with the current memory size
CLEAR Clears the content of the current slot
STORE Stores the content of the current slot from FRAM into the Flash memory
RECALL Recalls/restores the content of the current slot from the Flash memory into the FRAM
TIMEOUT=? Returns the possible number range for timeouts. See also Timeout commands.
TIMEOUT=<NUMBER> Sets the timeout for the current slot in multiples of 128 ms. If set to zero, there is no timeout. See also Timeout commands.
TIMEOUT? Returns the timeout for the current slot. See also Timeout commands.
Reader CommandsUsing these commands only makes sense, if the slot is configured as reader. See also ISO14443A Reader Functionality
SEND <BYTEVALUE> Adds parity bits, sends the given byte string <BYTEVALUE>, and returns the cards answer
SEND_RAW <BYTEVALUE>Does NOT add parity bits, sends the given byte string <BYTEVALUE> and returns the cards answer
GETUID Obtains the UID of a card that is in the range of the antenna and returns it. This command is a Timeout command.
DUMP_MFU Reads the whole content of a Mifare Ultralight card that is in the range of the antenna and returns it. This command is a Timeout command.
IDENTIFY Identifies the type of a card in the range of the antenna and returns it. This command is a Timeout command.
THRESHOLD=? Returns the possible number range for the reader threshold.
THRESHOLD=<NUMBER> Globally sets the reader threshold. The <NUMBER> influences the reader function and range. Setting a wrong value may result in malfunctioning of the reader. DEFAULT: 400
THRESHOLD? Returns the current reader threshold.
AUTOCALIBRATE Automatically finds a good threshold for communicating with the card that currently is on top of the Chameleon. This command is a Timeout command.
FIELD? Returns whether (1) or not (0) the reader field is active.
FIELD=[0;1] Enables/disables the reader field.
+

Timeout Commands

+

Some commands start a process with an unpredictable termination time. In these cases, ChameleonMini waits with its response, until the result of this process is obtained. In order to prevent an infinite waiting time, an individual timeout value can be set for each slot, in multiples of roughly 100 ms up to 60,000 ms. When a timeout occurs or if a respective command is aborted by means of a setting change, the return code 203:TIMEOUT is sent and a command-specific shutdown function is called, which terminates the timeout process gracefully.

+
Warning
Any terminal input is completely ignored during the waiting period.
+
+When setting the timeout to zero, there is no timeout and thus a process may continue forever. Such a process can only be terminated by changing the setting, if a button is configured accordingly, or by restarting the ChameleonMini (power off, power on).
+

Accessing the command-line using a terminal software

+

In order to have quick access to the Chameleon's command-line without using any complicated software, we suggest using the TeraTerm terminal emulation software available for windows based operating systems.

+

Connecting and setting up

+

For establishing a connection to the Chameleon's command line, select File -> New Connection, choose the virtual serial port of the Chameleon and hit the "OK" button. TeraTerm now tries to open the serial port and should succeed without any error.

+

For easier use of the command-line using a terminal software the local-echo functionality should be activated, to be able to see what is typed into the chameleon. When using TeraTerm, this can be achieved by selecting Setup -> Terminal and check "Local Echo".

+

Uploading and Downloading dump files

+

In some configurations of the Chameleon, it is necessary to upload a card dump before it can be accessed by a reader. For doing so, the relatively simple and widely known XMODEM protocol is used.

+

To upload a dump file using TeraTerm, follow these steps.

    +
  1. Enter UPLOAD and wait for the 110:WAITING FOR XMODEM response
  2. +
  3. Select File -> Transfer -> XMODEM -> Send
  4. +
  5. In the dialog choose the binary dumpfile to be uploaded and make sure the option "Checksum" is checked in the lower left corner
  6. +
  7. Hitting the "Open" button will start the transfer. If no error is given to the user, the file has been uploaded sucessfully.
  8. +
+

To download the Chameleon's memory again, follow the instructions above except for using DOWNLOAD instead of UPLOAD and the Receive function of TeraTerm

+

Note that there is a 10 second timeout after entering UPLOAD respectively DOWNLOAD after which the standard command-line is activated again. So try again if the timeout is already over when the XMODEM transfer is about to start.

+
+ + + + diff --git a/Doc/Doxygen/html/_page__configurations.html b/Doc/Doxygen/html/_page__configurations.html new file mode 100644 index 0000000..55f921c --- /dev/null +++ b/Doc/Doxygen/html/_page__configurations.html @@ -0,0 +1,112 @@ + + + + + + + +Chameleon-Mini: Configurations + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Configurations
+
+
+

Each setting of the Chameleon-Mini has an active configuration, which defines the behavior of the Chameleon-Mini. A detailed description of what defines a configuration can be found at ConfigurationType.

+

Supported Codecs

+

A Configuration basically is defined by the codec it uses and by the application functions that use this codec. Currently there are two different codecs implemented:

    +
  1. The ISO14443A codec for emulation.
  2. +
  3. The ISO14443A codec for the reader function.
  4. +
+

Supported Configurations

+

The following table shows which configurations are available currently.

+ + + + + + + + + + + + + + + + + + +
Configuration name Codec Description
NONE None No functionality, Chameleon-Mini does nothing, the current setting is skipped when cycling through the settings
MF_ULTRALIGHT ISO14443A emulation Emulates a MiFare Ultralight card
MF_CLASSIC_1K ISO14443A emulation Emulates a MiFare Classic 1k card
MF_CLASSIC_4K ISO14443A emulation Emulates a MiFare Classic 4k card
MF_CLASSIC_1K_7B ISO14443A emulation Emulates a MiFare Classic 1k card with 7-byte UID.
MF_CLASSIC_4K_7B ISO14443A emulation Emulates a MiFare Classic 4k card with 7-byte UID.
ISO14443A_SNIFF ISO14443A emulation Currently incomplete. Sniffs ISO14443A communication between a reader and a card.
ISO14443A_READER ISO14443A reader The Chameleon-Mini works as a reader and can process different procedures in order to obtain a cards UID etc.
+

Configuration Changing procedure

+

When the configuration is changed, no matter whether by command line or during a setting change, the following steps are done:

    +
  1. The codec deinitialization function of the currently active configuration is called.
  2. +
  3. Possibly pending timeout commands are aborted.
  4. +
  5. The configuration struct (ConfigurationType) for the currently active configuration is overwritten with the new configuration struct.
  6. +
  7. The codec initialization function of the new configuration is called.
  8. +
  9. The application initialization function of the new configuration is called.
  10. +
+
+ + + + diff --git a/Doc/Doxygen/html/_page__getting_started.html b/Doc/Doxygen/html/_page__getting_started.html new file mode 100644 index 0000000..1759cfe --- /dev/null +++ b/Doc/Doxygen/html/_page__getting_started.html @@ -0,0 +1,104 @@ + + + + + + + +Chameleon-Mini: Getting Started + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Getting Started
+
+
+

Finally, you hold your brand-new ChameleonMini RevG in your hands! What to do now?! In the factory, a test firmware including a USB bootloader has been programmed into the microcontroller of the Chameleon. This page describes the next steps in order to upload the current firmware, as developed in this project, via the USB bootloader. After having done that, you may want to have a look at the The Chameleon Command Structure page or explore the Chameleon Android App, which is an external contribution to this project. Development and maintenance can be found here (please also ask questions regarding the app there).

+

Step 1: Trigger the USB Bootloader

+

The bootloader can be executed in two different ways:

    +
  1. Make sure the Chameleon is switched off (power switch on the side is in the position OFF). Now, hold down the right button (RBUTTON) and keep it pressed while connecting the Chameleon to a PC via a USB cable.
  2. +
  3. OR: Plug your Chameleon via USB to a PC and use your favorite terminal application to connect with the test firmware of the ChameleonMini. Type upgrade and hit Enter.
  4. +
+

In either way, the ChameleonMini now jumps to the bootloader and waits patiently for a firmware upgrade.

+

Step 2: Upgrade the Firmware

+

Once the ChameleonMini is in the bootloader, you can flash a new firmware, i.e., the files Chameleon-Mini.hex and the Chameleon-Mini.eep, into the microcontroller. The source code directory contains these files precompiled but you can of course also compile the code yourself. Create a new folder and copy the two files into it. The following depends on your operating system:

+

Upgrade Procedure for Linux Users

+

In order to upgrade the firmware under Linux you first have to install avrdude, e.g. under Ubuntu with the command sudo apt-get install avra avrdude. Then change to the directory where you have saved the hex and eep files and run sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i.

+

You also can use sudo make program in the source code directory, which basically does the same.

+

After running this command you need to restart your Chameleon, e.g. by reattaching the Chameleon to the PC.

+
Note
If you are using Ubuntu 14.04, avrdude may not support flip2. In this case, you can run add-apt-repository ppa:pmjdebruijn/avrdude-release, then apt-get update and finally apt-get install avrdude to upgrade to a version of avrdude that supports flip2.
+

Optionally copy Drivers/98-ChameleonMini.rules to /etc/udev/rules.d/, to allow non-root users to open the chameleon serial port at /dev/chameleon. sudo cp (Path to Chameleon Repo)/Drivers/98-ChameleonMini.rules /etc/udev/rules.d/ Remember to restart the udev daemon, or reboot to activate the rule. 'sudo udevadm control –reload'

+

Upgrade Procedure for Mac OS Users

+

When running Homebrew you can install avrdude with brew install avrdude. After this, change to the directory where you have saved the hex and eep files and run sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i.

+

Upgrade Procedure for Windows Users

+

For upgrading the firmware under Windows please

    +
  1. download https://sourceforge.net/projects/dfu-programmer/files/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip/download and extract to an arbitrary directory. Make sure to use the DFU programmer Version 0.7.2!
  2. +
  3. Go to the extraction directory and then open the folder dfu-prog-usb-1.2.2. Install the atmel_usb_dfu.inf driver (right click -> install).
  4. +
  5. Copy dfu-programmer.exe from the extraction directory to the directory where you have saved the hex and eep files.
  6. +
  7. Save the ChameleonFirmwareUpgrade.bat in the same directory as the hex and eep files.
  8. +
  9. Run the ChameleonFirmwareUpgrade.bat as Administrator (right click -> run as Administrator) and wait for the firmware upgrade to terminate. Upon success, the green LED of the ChameleonMini should light up.
  10. +
+

Finally, install the driver for Chameleon: Download both ChameleonDriver.inf and ChameleonDriver.cat from the Drivers directory and install the INF file (right click -> install).

Note
If you have problems with the driver installation, try the instructions in sections 6.2.1 and 6.2.2 from this Atmel document.
+

Now, Chameleon should appear in the Windows device manager and you should be able to open a terminal program such as TeraTerm and connect to the Chameleon-Mini via the COM port shown in the device manager. On Mac or Linux you can use screen (screen /dev/tty.usbmodem1421, please replace your device path with the appropriate one) to communicate with your Chameleon. Further information about how to "talk" to the Chameleon can be found here: The Chameleon Command Structure.

+
+ + + + diff --git a/Doc/Doxygen/html/_page__l_e_d.html b/Doc/Doxygen/html/_page__l_e_d.html new file mode 100644 index 0000000..6ed25e4 --- /dev/null +++ b/Doc/Doxygen/html/_page__l_e_d.html @@ -0,0 +1,100 @@ + + + + + + + +Chameleon-Mini: LED functionality + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
LED functionality
+
+
+

The Chameleon-Mini has two fully configurable LEDs: one red LED and one green LED. The configuration is done with the commands LEDRED and LEDGREEN, which both can be called as the getting ("?"), setting ("=") and suggesting ("=?") version.

+

The following table shows which LED functions are currently available.

+ + + + + + + + + + + + + + + + + + + + + + + + +
Function name Description
NONE No function, the LED is deactivated.
POWERED The LED lights up if the Chameleon-Mini is powered, regardless whether powered by USB or by battery.
TERMINAL_CONN The LED is turned on when the Chameleon-Mini is connected via USB and is turned off when no USB connection is established.
TERMINAL_RXTX The according LED blinks shortly when sending or receiving data via the USB interface.
SETTING_CHANGE The LED blinks one time if the new setting is setting 1, two times for setting 2, ..., eight times for setting 8.
MEMORY_STORED The LED flashes everytime when a setting is stored to the permanent flash. This is currently the case when calling the command STORE, the button event STORE_MEM occurs or the setting is changed.
MEMORY_CHANGED The LED turns on when the FRAM is changed and is turned off when the currently active setting is written to the permanent flash. Thus, this function indicates when the current setting is changed.
CODEC_RX The LED flashes when the currently active codec (e.g. ISO14443A emulation) receives data. Note that this is implemented on codec layer and the flashing is triggered before the received data are interpreted by the application.
CODEC_TX The LED flashes when the currently active codec sends data. This function also is implemented on codec layer.
FIELD_DETECTED The LED is turned on if and only if a reader field is detected, which is recognized by the RSSI module (when the RSSI value hits a hardcoded threshold, it is assumed that there is a reader field). It is irrelevant whether the field comes from another reader or from the Chameleon-Mini itself.
LOGMEM_FULL Lights up the LED, if the SRAM log memory is full.
+
+ + + + diff --git a/Doc/Doxygen/html/_page__l_e_ds.html b/Doc/Doxygen/html/_page__l_e_ds.html new file mode 100644 index 0000000..9f476e9 --- /dev/null +++ b/Doc/Doxygen/html/_page__l_e_ds.html @@ -0,0 +1,104 @@ + + + + + + + +Chameleon-Mini: LED functionality + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
LED functionality
+
+
+

For giving user feedback, ChameleonMini provides two LEDs that can be configured to indicate various conditions, events, or internal state changes of ChameleonMini: a red LED and a green LED. Their individual configuration is controlled with the commands LEDRED and LEDGREEN, which can be called in the getting ("?"), setting ("=") and suggesting ("=?") variants.

+

The following table shows the currently supported LED functions.

+ + + + + + + + + + + + + + + + + + + + + + + + +
Condition/Event Description
NONE Nothing happens, the LED remains dark.
POWERED The LED lights up, if the ChameleonMini is powered by USB or by battery.
TERMINAL_CONN The LED is turned on when the ChameleonMini is connected via USB and is turned off when no USB connection is established.
TERMINAL_RXTX The LED blinks shortly when sending or receiving data via the USB interface.
SETTING_CHANGE The LED blinks one time if the new setting is setting 1, two times for setting 2, ..., eight times for setting 8.
MEMORY_STORED The LED flashes everytime when a setting is stored to the permanent flash. This is currently the case when calling the command STORE, the button event STORE_MEM occurs or the setting is changed.
MEMORY_CHANGED The LED turns on when the content of the FRAM has been modified and is turned off when the currently active setting is written to the permanent Flash memory. Thus, this function indicates when the current content has been changed.
CODEC_RX The LED flashes when the currently active codec (e.g. ISO14443A emulation) receives data via the RFID interface. Note that this is implemented on the codec layer and the flashing is triggered before the received data is interpreted by the application.
CODEC_TX The LED flashes when the currently active codec sends data via the RFID interface. This function is also implemented on the codec layer.
FIELD_DETECTED The LED is turned on, if a reader field is detected via the RSSI module (when the RSSI value hits a hardcoded threshold, it is assumed that there is a reader field). It is irrelevant whether the field comes from another reader or from the ChameleonMini itself.
LOGMEM_FULL Lights up the LED, if the SRAM log memory is full.
+
+ + + + diff --git a/Doc/Doxygen/html/_page__log.html b/Doc/Doxygen/html/_page__log.html new file mode 100644 index 0000000..2423668 --- /dev/null +++ b/Doc/Doxygen/html/_page__log.html @@ -0,0 +1,103 @@ + + + + + + + +Chameleon-Mini: Log functionality + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Log functionality
+
+
+

The ChameleonMini provides a configurable log functionality. This page describes how to use it.

+

Log Entry Format

+

The log entries use a TLV (Type Length Value)-like format:

+ + + + + + + + + + +
Name Size Description
Entry type 1 byte See LogEntryEnum
Data length 1 byte This is the length of the appended data.
Timestamp 2 bytes This is the current systick value.
Data Data length bytes It is also possible that no data is appended, then the Data length field is zero.
+

Entry Types

+

See LogEntryEnum.

+

Log Modes

+

Currently there exist three log modes:

+
Note
If there is not enough log memory, the log mode is automatically set to OFF.
+
Warning
Since the MEMORY log mode writes to SRAM, the log memory is cleared by power off or restarting the Chameleon.
+

Related Commands, Button event and LED functions

+

There are various commands to configure the log functionality. See Page Command Line. Equivalently to the LOGSTORE command, the buttons are configurable to STORE_LOG, which does the same. Also, there exists a LOGMEM_FULL function for the LEDs, which lights up the LED if the SRAM log memory is full. See also the Pages Buttons and LED functionality. The 'chamlog' Python script in the project (Software folder) automatizes the process of downloading the binary log data, e.g., sending the following command under Windows with a ChameleonMini connected on port COM6 results in downloading the binary log file, clearing the log memory, and setting the log mode to MEMORY: chamlog -p COM6 -c -m MEMORY -v. Repeatedly executing this command always outputs the recently logged commands in user-readable form. Make sure that no other program, e.g., terminal software, is blocking the serial port.

+
+ + + + diff --git a/Doc/Doxygen/html/_page__settings.html b/Doc/Doxygen/html/_page__settings.html new file mode 100644 index 0000000..fca5b83 --- /dev/null +++ b/Doc/Doxygen/html/_page__settings.html @@ -0,0 +1,91 @@ + + + + + + + +Chameleon-Mini: Settings + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Settings
+
+
+

The ChameleonMini can act in different ways, the behavior is defined by configurations. But also, the ChameleonMini has slots, which are a layer above the configurations. With the slots, it is possible to switch between different configurations and respective content, e.g., a card dump together with the configuration as Mifare Classic 1k card.

+

Properties

+

A slot is defined by settings: SettingsEntryType.

+

Slot Changing Procedure

+

When the current slot is changed, the following procedure is applied:

    +
  1. Break potentially pending timeout commands.
  2. +
  3. Store the memory of the setting to the Flash.
  4. +
  5. Set the slot number of the currently active slot to the number of the new slot.
  6. +
  7. Set the slot pointer of the currently active slot to the pointer of the new slot.
  8. +
  9. Since the slot also contains the configuration, apply the configuration changing procedure with the new configuration for the new slot.
  10. +
  11. Log the slot change.
  12. +
  13. Recall the new content of the slot from the permanent Flash.
  14. +
  15. Signalize the slot change with an LED, if an LED is configured to SETTING_CHANGE.
  16. +
+
+ + + + diff --git a/Doc/Doxygen/html/_page__uploading_downloading.html b/Doc/Doxygen/html/_page__uploading_downloading.html new file mode 100644 index 0000000..9a72625 --- /dev/null +++ b/Doc/Doxygen/html/_page__uploading_downloading.html @@ -0,0 +1,82 @@ + + + + + + + +Chameleon-Mini: Uploading and Downloading Memory dumps + + + + + + + + + +
+
+ + + + + + +
+
Chameleon-Mini +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Uploading and Downloading Memory dumps
+
+
+

In order to be able to emulate different cards, one can upload or download the content used for the emulation.

+

The layout of the memory dump depends on the chosen configuration and is usually the same as the memory layout of the currently chosen card emulation. The size of the memory dump also depends on the currently chosen configuration and can be requested with a specific command on the command-line.

+

In order to upload or download a memory dump, the user has to send the corresponding command on the command-line first and the Chameleon responds with a status message indicating that it is waiting for an X-MODEM connection. Depending on whether upload or download is chosen, the Chameleon then waits for 10 seconds to initiate an X-MODEM receive or send connection.

+

When waiting for a receiving X-MODEM connection, the X-MODEM NAK byte is sent upto 20 times with a delay of 500ms in order to establish a standard 128 byte frame-size X-MODEM connection with the simple checksum scheme. Within this time, the user has to get his X-MODEM client ready and choose the binary file to be uploaded into the memory.

+

In case of waiting for an X-MODEM send connection to establish, a wait time of 10 seconds is performed to receive the X-MODEM NAK byte. Within this time, the user has to start the X-MODEM receiver and set it to the standard 128 byte frame using the simple checksum scheme in order to receive the binary memory dump.

+
+ + + +