Online Store

将 Raspbian 用于 Raspberry Pi 3 以将数字逻辑扩展板与 uFReader RS232 配合使用

将 Raspbian 用于 Raspberry Pi 3 以将数字逻辑扩展板与 uFReader RS232 配合使用 #

介绍 #

带有 uFR 读卡器 RS232 扩展板的数字逻辑扩展板是简化 uFReader RS232 设备(如 uFR RS232 和卡尺寸 RS232)与所有版本的树莓派之间的互连的硬件。 DL 扩展板使用 GPIO 接头的引脚 8 (GPIO14) 和 10 (GPIO15) 进行 UART 通信,并使用引脚 16 (GPIO23) 重置 uFR 读取器。 GPIO 串行端口(迷你 UART)默认处于禁用状态。 您需要启用它们才能正确操作设备。uFCoder 库版本 4.2.7 及更高版本支持 Raspbian 上的 DL 防护。

注意Pi的串行端口(和所有其他GPIO)在3.3Vonly.Connectingthemtoa5Vsource会破坏你的Pi。

启用 GPIO 串行端口

$sudo rspi-config

  • 更改密码
  • 启用 SSH(SSH >接口选项)
  • 启用 串行端口(接口选项>串行)
  • 禁用 串行控制台(接口选项>串行)
  • 重新启动 

测试

测试Linux配置

$ ls -l /dev/serial* lrwxrwxrwx 1 根根 5 十一月 21 07:54 /dev/serial0 -> ttyS0 lrwxrwxrwx 1 根根根 7 十一月 21 07:54 /dev/serial1 -> ttyAMA0 $ ls - l /dev/ttyS0 crw-rw----1rootdialout4,64Nov2107:54/dev/ttyS0$groupspiadmdialoutcdromsudoaudiovideoplugdevgamesusersinputnetdevgpioi2cspi$sudo grep uart /boot/cmdline.txt enable_uart=1$ sudo cat /boot/cmdline.txt dwc_otg.lpm_enable=0console=tty1root=PARTUUID (nomoreexistsconsole=ttyS0,115200)

测试μFR读取器打开 #

有一个简单的示例代码,用于在 GIT 的 DL-GIT 克隆上打开的阅读器

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

使可执行文件
$make 阿姆夫


$ ./ufr-reader-openReferences: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 – 下载

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

测试源代码:

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