You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,17 @@ file per device in a nfc/devices.d directory:
102
102
printf 'name = "My first device"\nconnstring = "pn532_uart:/dev/ttyACM0"\n' | sudo tee /etc/nfc/devices.d/first.conf
103
103
printf 'name = "My second device"\nconnstring = "pn532_uart:/dev/ttyACM1"\n' | sudo tee /etc/nfc/devices.d/second.conf
104
104
105
+
Environment Variables
106
+
=====================
107
+
You can override certain configuration options at runtime using the following environment variables:
108
+
+`LIBNFC_DEFAULT_DEVICE=<connstring>`: `LIBNFC_DEFAULT_DEVICE=pn532_uart:/dev/ttyACM0` will use pn532 on /dev/ttyACM0 as default device
109
+
+`LIBNFC_DEVICE=<connstring>` will ignore all devices in the config files and use only the one defined in the variable
110
+
+`LIBNFC_AUTO_SCAN=<true|false>` overrides `allow_autoscan` option in the config file
111
+
+`LIBNFC_INTRUSIVE_SCAN=<true|false>` overrides `allow_intrusive_scan` option in the config file
112
+
+`LIBNFC_LOG_LEVEL=<0|1|2|3>` overrides `log_level` option in the config file
113
+
114
+
To obtain the connstring of a recognized device, you can use `nfc-scan-device`: `LIBNFC_AUTO_SCAN=true nfc-scan-device` will show the names & connstrings of all found devices.
0 commit comments