This Plugin for the Andino X1, provides a DualChannel UART to the Raspberry Pi or the Arduino Controller. The WAN version has an internal connection for using a Lora WAN or 2G, 4G modem
The Board based on the SPI Uart from NXP SC16IS752. The SPI Channel can be jumpered to the Raspberry Pi or the Arduino Controller. With the Arduino Controller time critical protocols can be implemented or a general pre processing of the data can be performed.
If the Jumper is closed the 2nd UARTs RxD is wired to the external screw terminal.
If the Jumper is open the 2nd UARTs RxD is wired to the internal connector.
To start sc16is752 on bootup, append this to the /boot/config.txt file. Run
sudo nano /boot/config.txt
And add the following lines to the end of the file:
dtoverlay=spi0-2cs,cs0_pin=8,cs1_pin=12,cs0_spidev=off,cs_1_spidev=off
dtoverlay=sc16is752-spi0,int_pin=7,xtal=11059200
Save the file and quit, then reboot. After that two new Devices are available: /dev/ttySC0 and /dev/ttySC1
To test device functionality, first install minicom:
sudo apt-get install minicom
For the initial setup, run
sudo minicom --setup
Enter Serial port setup
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
Here the modem connection can be set up. Set the serial device to either /dev/ttySC0 or /dev/ttySC1, depending on which device you want to test.
+-----------------------------------+
| A -Serial Device : /dev/ttySC0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E -Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
|Change which setting? |
+-----------------------------------+
After completing the configuration, press the Esc key to return to the main setup menu and exit. The configured device should now show up normally in minicom.