Online Store

Configure Raspbian for Raspberry Pi 3 to use Digital Logic shield with uFReader RS232

Configure Raspbian for Raspberry Pi 3 to use Digital Logic shield with uFReader RS232 #

Introduction #

Digital Logic shield with uFR Reader RS232 Shield is peace of hardware for simplified interconnection between uFReader RS232 devices, like uFR RS232 and Card size RS232, and all versions of RaspberryPi. DL shield uses pins 8 (GPIO14) and 10 (GPIO15) of the GPIO header for UART communication and pins 16 (GPIO23)  for reset uFR Reader. GPIO serial port (mini-UART) is disabled by default. You need to enable them for the correct operation of the device. uFCoder library version 4.2.7 and later support DL shields on Raspbian.

Caution

The Pi’s serial port (andallotherGPIO’s) workat3.3Vonly.Connectingthemtoa5Vsource will destroy your Pi.

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----1rootdialout4,64Nov2107:54/dev/ttyS0
$groups
piadmdialoutcdromsudoaudiovideoplugdevgamesusersinputnetdevgpioi2cspi
$sudo grep uart /boot/cmdline.txt
enable_uart=1
$ sudo cat /boot/cmdline.txt
dwc_otg.lpm_enable=0console=tty1root=PARTUUID (nomoreexistsconsole=ttyS0,115200)

Test µFR reader open #

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

$ git clone --recursive
https://www.d-logic.net/code/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://www.d-logic.net/code/nfc-rfid-reader-sdk/ufr-examples-reader_open-c