Skip to content

Commit

Permalink
hw done
Browse files Browse the repository at this point in the history
  • Loading branch information
GameTec-live committed Aug 25, 2023
1 parent f5b32c7 commit 6ba03ee
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 5 deletions.
47 changes: 47 additions & 0 deletions docs/firmware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Firmware

The Chameleons firmware consists of 3 parts, the bootloader, the application and the settings

NOTE: If your developer searching for the building instructions, look into [How_to_use_Firmware.md](../How_to_use_Firmware.md)

## The Bootloader

The bootloader is the lowest level programm running on your Chameleon. It is read only and provides the DFU (**D**evice **F**irmware **U**pgrade) mode. The bootloader being read only also makes it really hard to brick your Chameleon. You enter DFU mode by:

- Holding down the `B` or `right` button for ~5s, plugging it into a PC while still holding the button, hold for another ~10s and release.

- Issuing `hw dfu` from the CLI

- Clicking on `Enter DFU mode` in a GUI

The device stays in dfu mode for ~30s. While in DFU mode, the LEDs 4 and 5 blink alternating green. While in DFU mode you can perform firmware upgrades either via a GUI or the command line:

1. Download NRF Util from the [NRF website](https://www.nordicsemi.com/Products/Development-tools/nrf-util)

2. Open a Command Line / Terminal on your PC

3. Install the "device" toolkit by running `nrfutil install device`

4. Download the firmware from [the github](https://github.com/RfidResearchGroup/ChameleonUltra/releases), you want the ultra-dfu-app.zip or lite-dfu-app.zip depending on your device (the Devkit in this case is a Ultra)

5. Put your Chameleon into dfu mode and install the firmware with the following command: `nrfutil device program --firmware ultra-dfu-app.zip --traits nordicDfu`(Keep in mind to change the filename to whatever device your using)

While flashing firmware the LEDs 4 and 5 should blink blue. Using DFU and performing a firmware update is also how you recover from most device related issues.

## The Application

The application is the piece of software being loaded by the bootloader. It communicates with the client, emulates, reads and writes cards, drives the LEDs, handles buttons and much more. The application is also writable, its the piece of software being updated via DFU.

The communication with the application is either done via the CLI or a GUI. Communication can be done over USB or BLE (**B**luetooth **L**ow **E**nergy), altough, at time of writing, only GUIs support BLE.

The communication with the application isnt the easiest but is structured as follows:

`MAGIC BYTE(0x11) LRC(Magic Byte) COMMAND STATUS(0x00) DATA LRC(COMMAND + STATUS + DATA)`

You build the Packet by first adding 0x11, this is the "Magic Byte" to say that theres something coming. This is followed by the LRC ([**L**ongitudinal **R**edundancy **C**heck](https://en.wikipedia.org/wiki/Longitudinal_redundancy_check) of the "Magic Byte". Then you put in the command in [Big Endian]([https://en.wikipedia.org/wiki/Endianness). Each command gets assigned a unique number (eg: `factoryReset(1020)`), this is what your sending to the device. Append the status, also in Big Endian. The status is always 0x00. Then you add your Data, this could be anything, for example sending the card keys when reading a block.

For recieving its the exact same in reverse.

## The Settings

The Chameleon has a reserved space of memory and flash where it stores settings. This are will not be overwritten by DFU updates and the settings will only be reset by either issuing `hw factory_reset --i-know-what-im-doing` in the CLI or clicking Factory reset in a GUI.
7 changes: 7 additions & 0 deletions docs/gui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GUIs

There are multiple GUIs to control your Chameleon, two are featured in this documentation:

- [Chameleon Ultra GUI](./chameleonultragui.md) ([github](https://github.com/GameTec-live/ChameleonUltraGUI))

- Mtools (No Info Yet)
26 changes: 21 additions & 5 deletions docs/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The Chameleon comes in 3 Hardware variants, the Ultra, the Lite and the Devkit.

The Chameleon Ultra comes in a black box with gold printing. This box has the dimensions: 9.5cm x 5.5cm x 3.5cm

![box.png](./images/box.jpg)
![box.png](./images/ultra-box.jpg)

The Box contains a foam pad, a USB cable that has a removable end to convert it to USB-C, a Proxgrind 3.5 hex screwdriver, 2 replacement screws and a keychain and the device itself.

![box-contents.jpg](./images/box-contents.jpg)
![box-contents.jpg](./images/ultra-box-contents.jpg)

The deivce itself features 4 screws holding it together, 2 Buttons labled `A` and `B`. The Device consists of 2 PCBs (**P**rinted **C**ircuit **B**oards) and a plastic spacer, one contains the Electronic and the HF (**H**igh **F**requency), 13.56 MHz, antenna as well as the 8 Leds indecating which is currently active and the other board contains the Chameleon Ultra Text, the screws and the LF (**L**ow **F**requency), 125KHz, antenna. The plastic spacer houses the battery as well as the ferrite pad which enables HF and LF emulation at the same time. It also has has the USB-C charging and data port and a hole for inserting the keychain loop. The Chameleon Ultras dimensions are: 2.4cm x 4cm x 8mm

Expand All @@ -24,12 +24,28 @@ The Chameleon Lite comes in a white box with blue printing. This box has the dim

The Box contains a foam pad, a USB cable that has a removable end to convert it to USB-C and the device itself.

![lite-box.-contents.jpg](./images/lite-box.-contents.jpg)
![lite-box.-contents.jpg](./images/lite-box-contents.jpg)

The deivce itself features 2 Buttons labled with arrows. The Device consists of one PCB in a blue plastic housing. This one PCB contains the Electronic and the HF, antenna as well as the 8 Leds indecating which is currently active and the USB-C port. The LF antenna is glued onto the back of the PCB and is visible through the housing. The Battery is soldered in place and the housing is hold together by thin fragile pins which are easy to snap, it is not designed to be disassembled. The Keychain Loop is also relatively fragile so be careful. The Chameleon Lites dimensions are: 3.6cm x 6.1cm x 8mm
The device itself features 2 Buttons labled with arrows. The Device consists of one PCB in a blue plastic housing. This one PCB contains the Electronic and the HF, antenna as well as the 8 Leds indecating which is currently active and the USB-C port. The LF antenna is glued onto the back of the PCB and is visible through the housing. The Battery is soldered in place and the housing is hold together by thin fragile pins which are easy to snap, it is not designed to be disassembled. The Keychain Loop is also relatively fragile so be careful. The Chameleon Lites dimensions are: 3.6cm x 6.1cm x 8mm

![lite.jpg](./images/lite.jpg)

## The Devkit

Just like the Chameleon Ultra, the Devkit comes in a black box with gold printing. This box has the dimensions:
Just like the Chameleon Ultra, the Devkit comes in a black box with gold printing. This box has the dimensions: 12cm x 8cm x 3.5cm

![devkit-box.jpg](./images/devkit-box.jpg)

Again, just like the lite, the box contains a foam pad, a USB cable that has a removable end to convert it to USB-C and the device itself.

![devkit-box-contents.jpg](./images/devkit-box-contents.jpg)

The deivce itself features 2 Buttons labled `A` and `B`. The Device is only one PCB without a case. At the bottom of this PCB both the HF and LF coil are found. Because its a Devkit, this Chameleon has its SWD (**S**ingle **W**ire **D**ebug) port and some testpoints exposed. (In the photos below a pinheader is already soldered into the SWD port, this is not the case from factory) The Chameleon Devkits dimensions are: 5.3cm x 8.5cm x 5mm (with rubber feet, 1.5mm without)

![devkit.jpg](./images/devkit.jpg)

## Whats the difference?

The Chameleon Ultra as well as the Dev Kit contain a second chip called [MFRC522 ](https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf) this chip allows the Chameleon to read and write. The Chameleon Lite does not contain this chip and therefore can not rea and write, only simulate. The Chameleon Lite also swaps the big LIPO (**LI**thium **PO**lymer) battery with a smaller buttoncell. The Devkit is a Chameleon Ultra on a bigger PCB and with a bigger battery.

#
Binary file added docs/images/devkit-box-contents.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/devkit-box.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/devkit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ba03ee

Please sign in to comment.