Configure Raspbian for Raspberry Pi 3 to use Digital Logic shield with µFR Reader RS232
View Categories

Configure Raspbian for Raspberry Pi 3 to use Digital Logic shield with µFR Reader RS232

Configure Raspbian for Raspberry Pi 3 to use Digital Logic shield with µFR Reader RS232 #

Preface

Digital Logic shield with µFR Reader RS232

The Shield ​is​​ peace​​ of​​ hardware​​ for ​​simplified ​​interconnection ​​between ​​µFR Reader RS232 devices,​ such as the µFR Nano RS232 and µFR Classic CS RS232 reader model, ​​and any ​​Raspberry​ ​Pi ​​version​. 

DL​shield ​​uses​ ​pins ​​8 (GPIO14) ​​and ​​10​ ​(GPIO15)​​ of​​ the ​​GPIO ​​header ​​for ​​UART​ ​communication ​​and pins ​​16​ (GPIO23)​ for​​ resetting​​ the ​​µFR Reader. GPIO​ serial ​​port ​​(​mini​-UART)​ is ​​​disabled ​​by ​​default​. It has to be ​​enabled for ​​the device’s full functionality. uFCoder ​library ​​version ​​4​.2.7 ​and ​​later ​​support ​​DL​​ Shields ​​on ​​Raspbian​.

Caution

The RPi’s serial port (and all other GPIO’s) operate at 3.3V power only. Connecting them to a 5V source will damage your RPi.

Enable GPIO serial port

$sudo rspi-config
  • Change password
  • Enable SSH (Interfacing Option > SSH)
  • Enable Serial port (Interfacing Option > Serial)
  • Disable Serial Console (Interfacing Option > Serial) 
  • Reboot  

Test

Test Linux configuration

$ ls -l /dev/serial*

lrwxrwxrwx​ ​1​ ​root​ ​root​ ​5​ ​Nov​ ​21​ ​07:54​ ​/dev/​​serial0​ ​->​ ​ttyS0 lrwxrwxrwx​ ​1​ ​root​ ​root​ ​7​ ​Nov​ ​21​ ​07:54​ ​/dev/serial1​ ​->​ ​ttyAMA0 $ ls - l /dev/ttyS0

crw-rw​----​​1​​root​​dialout​​4,​​64​​Nov​​21​​07:54​​/dev/ttyS0​

$groups

pi​adm​​dialout​​​​cdrom​​​sudo​​audio​​video​​plugdev​​games​​users​​input​​netdev​​gpio​​​​i2c​​​spi​

$sudo grep uart /boot/cmdline.txt

enable_uart=1

$ sudo cat /boot/cmdline.txt

dwc_otg.lpm_enable=0​console=tty1​​​​​​root=PARTUUID (no​more​​exists​​console=ttyS0,115200)​

Test the µFR Reader Open function

There is a simple example code for reader open on the DL-GIT Clone from GIT

$​ ​git​ ​clone​ ​--recursive
https://code.d-logic.com/nfc-rfid-reader-sdk/ufr-examples-reader_open-c

Make executable

$make armhf

Run

$ ./ufr-reader-open

References:

https://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/

https://www.raspberrypi.org/forums/viewtopic.php?t=151454

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144858&p=955297#p955236

https://raspberrypi.stackexchange.com/a/54766

Raspbian OS – download

https://www.raspberrypi.org/downloads/raspbian/

Test source code:

https://code.d-logic.com/nfc-rfid-reader-sdk/ufr-examples-reader_open-c