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 #

DigitalLogicshieldwithuFReaderRS232

ShieldispeaceofhardwareforsimplifiedinterconnectionbetweenuFReaderRS232devices,

likenFRRS232 andCardsizeRS232,andallversionsofRaspberryPi. DLshieldusespins8

(GPIO14)and10(GPIO15)oftheGPIOheaderforUARTcommunicationandpin16 (GPIO23)

forresetuFReader. GPIOserialport(mini-uart)isdisabledbydefault.Youmustenablethem

forthecorrectoperationofthe device. uFCoderlibraryversion4.2.7andlatersupportDL

shieldsonRaspbian.

Caution

ThePi’sserialport(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

Scroll Up