Difference between revisions of "MOD-RFID1356MIFARE"

m (USB-CDC mode)
m (Operation)
Line 20: Line 20:
 
* Both '''green''' and '''red''' leds are blinking: UART mode
 
* Both '''green''' and '''red''' leds are blinking: UART mode
  
 +
=== Bootloader mode ===
 +
 +
To enter bootloader mode, hold button for 2 seconds during power-up. After that you'll see both leds blinking one after another.
 +
In this mode you can upload new firmware.
 +
 +
==== Uploading new firmware ====
 +
TODO....
  
 
=== USB-HID mode ===
 
=== USB-HID mode ===

Revision as of 04:00, 24 May 2016

MOD-RFID1356MIFARE

Description

Some description here!

Operation

The board can operate in the following modes:

  • USB-HID
  • USB-CDC
  • UART

Additionally there is another one:

  • Bootloader mode

Changing operation mode is done by holding the side button for 2 seconds. Depending on leds combination after that the modes are:

  • Only green led is blinking: USB-CDC mode
  • Only reg led is blinking: USB-HID mode
  • Both green and red leds are blinking: UART mode

Bootloader mode

To enter bootloader mode, hold button for 2 seconds during power-up. After that you'll see both leds blinking one after another. In this mode you can upload new firmware.

Uploading new firmware

TODO....

USB-HID mode

The device is shown as keyboard. On Linux machine you should see something like this:

# dmesg

usb 3-2: new full-speed USB device number 45 using uhci_hcd
usb 3-2: New USB device found, idVendor=15ba, idProduct=0039
usb 3-2: New USB device strings: Mfr=1, Product=3, SerialNumber=4
usb 3-2: Product: MOD-RFID1356MIFARE Tag Keyboard
usb 3-2: Manufacturer: Olimex Ltd.
usb 3-2: SerialNumber: xxxxxxxxxxxxxxx
input: Olimex Ltd. MOD-RFID1356MIFARE Tag Keyboard as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/0003:15BA:0039.000D/input/input16
hid-generic 0003:15BA:0039.000D: input,hidraw3: USB HID v1.11 Keyboard [Olimex Ltd. MOD-RFID1356MIFARE Tag Keyboard] on usb-0000:00:1d.1-2/input0

Open some text editor and you should see RFID-card UUID.

USB-CDC mode

When you switch to this mode, you'll see:

# dmesg

usb 3-2: new full-speed USB device number 46 using uhci_hcd
usb 3-2: New USB device found, idVendor=15ba, idProduct=003a
usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=4
usb 3-2: Product: MOD-RFID1356MIFARE
usb 3-2: Manufacturer: Olimex Ltd.
usb 3-2: SerialNumber: xxxxxxxxxxxxxxx
cdc_acm 3-2:1.0: ttyACM0: USB ACM device

As you can see a new device /dev/ttyACM0 was created. If can be opened by any terminal emulator such as putty, minicom, etc. Since the device is USB-CDC it supports various baud rates - up to 115200.

Open device:

# picocom -b 115200 /dev/ttyACM0

Press Enter and you'll see cursor marker:

>
>

To see help enter ?:

>?
MOD-RFID1356MIFARE
Brief command list and usage description:
 i - information.
 ? - this help.
 b - Switch to bootloader.

 erB - Read data in block B.
 ewB,X - Write data to block B. X must be hex, maximum 16 bytes.
 e0 - Disable eeprom read.
 e1 - Enable eeprom read.
 mlE - Set led mode to disabled (E=0) or enabled (E=1)
 mtF - Set scan interval. Values between 1 and 30000 are accepted.

Usage if the commands is as follow:

  • i - information - Prints current firmware release:

    >i
    MOD-RFID1356MIFARE
    Firmware revision: 01.00
    http://www.olimex.com
  • ? - this help - Print help commands
  • b - Switch to bootloader. Go into bootloader mode:

    >b
    Device is entering boot loader mode...
    FATAL: term closed
    After this terminal will close and board will go to bootloader mode.
  • erB - Read data in block B. This will read 16 bytes from block B. Usually card have up to 64 blocks. For example to read what is stored in block 10 type:

    >er9

    Next time when you check card this will pop:

    -74BC3EB72
    00000000000000000000000000000000

    or this:

    -621D31482
    AUTHENTICATION ERROR
    IMPORTANT NOTE: MIFARE cards have keys, used to access build-in EEPROM. The firmware use default key FF:FF:FF:FF:FF:FF:FF:FF. If your card is locked, then you cannot read/write from the EEPROM.
  • eWB,X - Write data to block B. X must be hex, maximum 16 bytes. This will write hex number to EEPROM. Again your card should NOT be locked. To write 0x1234 to block 9:

    >ew9,1234

    Write will be executed only once. When you check card:

    -74BC3EB72
    1234FFFFFFFFFFFFFFFFFFFFFFFFFFFF
    The remaining unused bytes are replaced with F.
  • e0 - Disable eeprom read.

    -74BC3EB72
    1234FFFFFFFFFFFFFFFFFFFFFFFFFFFF
    >e0
    >
    -74BC3EB7
    -74BC3EB7
    -74BC3EB7
  • e1 - Enable eeprom read.

    >e1
    >
    -74BC3EB72
    1234FFFFFFFFFFFFFFFFFFFFFFFFFFFF
    -74BC3EB72
    1234FFFFFFFFFFFFFFFFFFFFFFFFFFFF
  • mlE - Set led mode to disabled (E=0) or enabled (E=1) To enable leds:

    >ml1

    To disable leds:

    >ml0
  • mtF - Set scan interval. Values between 1 and 30000 are accepted Defines scanning interval for near cards. If you want 1 second between scans:

    >mt1000
    

UART mode

The commands are the same as in USB-CDC mode. The difference is connection method and fixed baud-rate.

Connect some serial convertor as follows:

  • UEXT pin 2 (GND) -> GND
  • UEXT pin 3 (RX) -> Convertor TX
  • UEXT pin 4 (TX) -> Convertor RX

Open serial port at baud-rate 19200:

# picocom -b 19200 /dev/ttyUSB0

>?
MOD-RFID1356MIFARE
Brief command list and usage description:
 i - information.
 ? - this help.
 b - Switch to bootloader.

 erB - Read data in block B.
 ewB,X - Write data to block B. X must be hex, maximum 16 bytes.
 e0 - Disable eeprom read.
 e1 - Enable eeprom write.
 mlE - Set led mode to disabled (E=0) or enabled (E=1)
 mtF - Set scan interval. Values between 1 and 30000 are accepted.

Changelog

1.0.0 (24 MAY 2016)

  • Initial release