<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RTP</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RTP"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/RTP"/>
	<updated>2026-04-09T03:19:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=18895</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=18895"/>
		<updated>2023-03-24T18:18:30Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1303, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1303 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK5146 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK5146 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled, available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_02-05-2023.img.xz [Linux Kernel 5.15.89-sunxi])&lt;br /&gt;
&lt;br /&gt;
    SHA256: cdb9bd528981c47b68f121b4819ee870631c67dd5d125fb0ea3d79cae7ce4ac1&lt;br /&gt;
    SHA512: dde9123542329dd37d29ebab695ddd8a0fe1a52e7c05f51ff7554d5a70224c30bd4a28d31526e84c89c78cd76f351487499dd8a1ab83baec2e8d00a6ff00874f&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
📁 '''DOWNLOAD LOCATION:''' https://mega.nz/file/hLVAWLDT#DMFOugfIHaVj3dI30YPHug-duKow4nGUt6uakEc_xmY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Check ttn-gateway&lt;br /&gt;
&lt;br /&gt;
    journalctl -u ttn-gateway&lt;br /&gt;
&lt;br /&gt;
 -- Journal begins at Fri 2023-03-24 04:53:25 PDT, ends at Fri 2023-03-24 11:10:25 PDT. --&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # SX1302 counter (PPS):  933424896&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # BEACON queued: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # BEACON sent so far: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # BEACON rejected: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: ### [JIT] ###&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: #--------&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: ##### END #####&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: JSON up: {&amp;quot;stat&amp;quot;:{&amp;quot;time&amp;quot;:&amp;quot;2023-03-24 11:51:55 GMT&amp;quot;,&amp;quot;rxnb&amp;quot;:0,&amp;quot;rxok&amp;quot;:0,&amp;quot;rxfw&amp;quot;:0,&amp;quot;ackr&amp;quot;:0.0,&amp;quot;dwnb&amp;quot;:0,&amp;quot;txnb&amp;quot;:0,&amp;quot;temp&amp;quot;:0.0}}&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: INFO: [down] PULL_ACK received in 76 ms&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: INFO: [down] PULL_ACK received in 77 ms&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: INFO: [down] PULL_ACK received in 77 ms&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: ##### 2023-03-24 11:52:25 GMT #####&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: ### [UPSTREAM] ###&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # RF packets received by concentrator: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # RF packets forwarded: 0 (0 bytes)&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # PUSH_DATA datagrams sent: 1 (122 bytes)&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # PUSH_DATA acknowledged: 0.00%&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: ### [DOWNSTREAM] ###&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # PULL_DATA sent: 3 (100.00% acknowledged)&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # RF packets sent to concentrator: 0 (0 bytes)&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # TX errors: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: ### SX1302 Status ###&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # SX1302 counter (INST): 4026531840&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # SX1302 counter (PPS):  939524096&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # BEACON queued: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # BEACON sent so far: 0&lt;br /&gt;
 Mar 24 04:53:25 pine-gateway ttn-gateway[1992]: # BEACON rejected: 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
(edit EUI file above if you wish change it, and run: sudo systemctl restart ttn-gateway)&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
==== Kernels 5.14 and older ====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Kernel 5.15 and newer ====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000Hlli/Te0cB6.fNWAPfxRfoFz38R6LOTf3sLAJhD4CpS2RwFc SX1303 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK5146/Datasheet/#overview RAK5146 datasheets and resources]&lt;br /&gt;
* [[File:PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf|Pine64 LoRa Gateway module adapter schematic]]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic: [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/touch NuttX Touch Panel Driver for PineDio Stack BL604]&lt;br /&gt;
* [https://www.robertlipe.com/buttons-on-bl602-nuttx/ Buttons on BL602 NuttX]&lt;br /&gt;
* [https://lupyuen.github.io/articles/expander NuttX GPIO Expander for PineDio Stack BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/auto2 (Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/zig Zig on RISC-V BL602: Quick Peek with Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/iot Build an IoT App with Zig and LoRaWAN]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lvgl Build an LVGL Touchscreen App with Zig]&lt;br /&gt;
* [https://youtu.be/_vADRu939sI Apache NuttX RTOS on a RISC-V IoT Gadget: PineDio Stack BL604 (Video)]&lt;br /&gt;
* [https://youtu.be/-2OIHur8X1E Simpler, safer LVGL Touchscreen Apps with Zig and Apache NuttX RTOS (Video)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Pinedio]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=16364</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=16364"/>
		<updated>2023-02-06T17:09:47Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1303, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1303 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK5146 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK5146 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled, available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_02-05-2023.img.xz [Linux Kernel 5.15.89-sunxi])&lt;br /&gt;
&lt;br /&gt;
    SHA256: cdb9bd528981c47b68f121b4819ee870631c67dd5d125fb0ea3d79cae7ce4ac1&lt;br /&gt;
    SHA512: dde9123542329dd37d29ebab695ddd8a0fe1a52e7c05f51ff7554d5a70224c30bd4a28d31526e84c89c78cd76f351487499dd8a1ab83baec2e8d00a6ff00874f&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
📁 '''DOWNLOAD LOCATION:''' https://mega.nz/file/hLVAWLDT#DMFOugfIHaVj3dI30YPHug-duKow4nGUt6uakEc_xmY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
(edit EUI file above if you wish change it, and run: sudo systemctl restart ttn-gateway)&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000Hlli/Te0cB6.fNWAPfxRfoFz38R6LOTf3sLAJhD4CpS2RwFc SX1303 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK5146/Datasheet/#overview RAK5146 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/touch NuttX Touch Panel Driver for PineDio Stack BL604]&lt;br /&gt;
* [https://www.robertlipe.com/buttons-on-bl602-nuttx/ Buttons on BL602 NuttX]&lt;br /&gt;
* [https://lupyuen.github.io/articles/expander NuttX GPIO Expander for PineDio Stack BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/auto2 (Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/zig Zig on RISC-V BL602: Quick Peek with Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/iot Build an IoT App with Zig and LoRaWAN]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lvgl Build an LVGL Touchscreen App with Zig]&lt;br /&gt;
* [https://youtu.be/_vADRu939sI Apache NuttX RTOS on a RISC-V IoT Gadget: PineDio Stack BL604 (Video)]&lt;br /&gt;
* [https://youtu.be/-2OIHur8X1E Simpler, safer LVGL Touchscreen Apps with Zig and Apache NuttX RTOS (Video)]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=14885</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=14885"/>
		<updated>2022-11-30T20:45:21Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1303, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1303 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK5146 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK5146 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled, available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_11-30-2022.img.xz [Linux Kernel 5.15.74-sunxi64])&lt;br /&gt;
&lt;br /&gt;
    SHA256: b3cbb7d135e814c9de231fa8bb3fa5c770b26235c8173b5381239ed3dfe2824b&lt;br /&gt;
    SHA512: a133d020c9590bc731039f294bd497921e7cd24918153fead46c35aa457e37700ec6576e24c726809c5a7ebe9929ae4962c04631fed318efe136b9a833214b03&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
📁 '''DOWNLOAD LOCATION:''' https://mega.nz/file/1GVi0TaK#Y8J2CybSPB4tDKtkkydRI3LBFtDZ-WXWqSB1dMiAthc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
(edit EUI file above if you wish change it, and run: sudo systemctl restart ttn-gateway)&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000Hlli/Te0cB6.fNWAPfxRfoFz38R6LOTf3sLAJhD4CpS2RwFc SX1303 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK5146/Datasheet/#overview RAK5146 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/touch NuttX Touch Panel Driver for PineDio Stack BL604]&lt;br /&gt;
* [https://www.robertlipe.com/buttons-on-bl602-nuttx/ Buttons on BL602 NuttX]&lt;br /&gt;
* [https://lupyuen.github.io/articles/expander NuttX GPIO Expander for PineDio Stack BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/auto2 (Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/zig Zig on RISC-V BL602: Quick Peek with Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/iot Build an IoT App with Zig and LoRaWAN]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lvgl Build an LVGL Touchscreen App with Zig]&lt;br /&gt;
* [https://youtu.be/_vADRu939sI Apache NuttX RTOS on a RISC-V IoT Gadget: PineDio Stack BL604 (Video)]&lt;br /&gt;
* [https://youtu.be/-2OIHur8X1E Simpler, safer LVGL Touchscreen Apps with Zig and Apache NuttX RTOS (Video)]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=14884</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=14884"/>
		<updated>2022-11-30T20:43:19Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1303, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1303 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK5146 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1303 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK5146 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled, available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_11-30-2022.img.xz [Linux Kernel 5.15.74-sunxi64])&lt;br /&gt;
&lt;br /&gt;
    SHA256: b3cbb7d135e814c9de231fa8bb3fa5c770b26235c8173b5381239ed3dfe2824b&lt;br /&gt;
    SHA512: a133d020c9590bc731039f294bd497921e7cd24918153fead46c35aa457e37700ec6576e24c726809c5a7ebe9929ae4962c04631fed318efe136b9a833214b03&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION: https://mega.nz/file/1GVi0TaK#Y8J2CybSPB4tDKtkkydRI3LBFtDZ-WXWqSB1dMiAthc&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
(edit EUI file above if you wish change it, and run: sudo systemctl restart ttn-gateway)&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000Hlli/Te0cB6.fNWAPfxRfoFz38R6LOTf3sLAJhD4CpS2RwFc SX1303 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK5146/Datasheet/#overview RAK5146 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/touch NuttX Touch Panel Driver for PineDio Stack BL604]&lt;br /&gt;
* [https://www.robertlipe.com/buttons-on-bl602-nuttx/ Buttons on BL602 NuttX]&lt;br /&gt;
* [https://lupyuen.github.io/articles/expander NuttX GPIO Expander for PineDio Stack BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/auto2 (Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/zig Zig on RISC-V BL602: Quick Peek with Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/iot Build an IoT App with Zig and LoRaWAN]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lvgl Build an LVGL Touchscreen App with Zig]&lt;br /&gt;
* [https://youtu.be/_vADRu939sI Apache NuttX RTOS on a RISC-V IoT Gadget: PineDio Stack BL604 (Video)]&lt;br /&gt;
* [https://youtu.be/-2OIHur8X1E Simpler, safer LVGL Touchscreen Apps with Zig and Apache NuttX RTOS (Video)]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=14225</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=14225"/>
		<updated>2022-09-25T22:01:17Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK2287 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled, available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_09-25-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA256: 487bbb45ac78a4ee24b80918760673e58222aec60c81251617e932a8265d35b7&lt;br /&gt;
    SHA512: f21ee4e8b8739f2e0efc269ab158224d6dfc55b3d542118fb67286b5337a2499cda52f3df1f05db6b1202553fe227c6b90509275ec4a411b3972f9aefacc5364&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION: https://mega.nz/file/zB4gTLRZ#EUlJh2oYLgkfkphPBmQ8ufzQu9_b3nYFDGoXle4xyAk&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
(edit EUI file above if you wish change it, and run: sudo systemctl restart ttn-gateway)&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/touch NuttX Touch Panel Driver for PineDio Stack BL604]&lt;br /&gt;
* [https://www.robertlipe.com/buttons-on-bl602-nuttx/ Buttons on BL602 NuttX]&lt;br /&gt;
* [https://lupyuen.github.io/articles/expander NuttX GPIO Expander for PineDio Stack BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/auto2 (Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/zig Zig on RISC-V BL602: Quick Peek with Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/iot Build an IoT App with Zig and LoRaWAN]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lvgl Build an LVGL Touchscreen App with Zig]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab&amp;diff=13519</id>
		<title>PineTab</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab&amp;diff=13519"/>
		<updated>2022-08-14T02:23:02Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=IMPORTANT INFORMATION for '''Early Adopters''' - please [[PineTab/Early-Adopter|'''CLICK HERE''']] - some '''known issues''' are listed there}}&lt;br /&gt;
&lt;br /&gt;
The PineTab is a 10&amp;quot; tablet created by Pine64.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
* '''Dimensions:''' 11mm x 175mm x 260mm (Thickness, Width, Height)&lt;br /&gt;
* '''Weight:''' 575g (Tablet alone)&lt;br /&gt;
* '''Build:''' Plastic&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB of internal eMMC storage&lt;br /&gt;
** MicroSD slot, bootable&lt;br /&gt;
** M.2 SSD slot, supports SATA and USB devices only, not NVME (optional)&lt;br /&gt;
* '''Cameras:''' 2Mpx Front, 5Mpx Rear&lt;br /&gt;
* '''SOC:''' Allwinner A64 Quad Core&lt;br /&gt;
* '''CPU:''' 4x ARM A53 1.152GHz&lt;br /&gt;
* '''GPU:''' Mali 400 MP2&lt;br /&gt;
* '''RAM:''' 2GB LPDDR3&lt;br /&gt;
* '''I/O:''' HD Video Out (Mini HDMI), Micro USB 2.0 OTG, USB 2.0 A host, 3.5mm Headphone/Mic combo,&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** WiFi (802.11b/g/n, 2.4GHz only)&lt;br /&gt;
** Bluetooth 2.1&lt;br /&gt;
** M.2 LTE / Cell MODEM card, (optional, and takes place of optional M.2 SSD)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 10.1 inches (257mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1280x800, 16:10 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Attachments/Accessories:''' Magnetically attached keyboard (optional)&lt;br /&gt;
* '''Battery:''' 6000MAh (6Ah)&lt;br /&gt;
* '''Misc. features:''' &lt;br /&gt;
** Volume rocker&lt;br /&gt;
** Speakers and Microphone&lt;br /&gt;
** 2.5mm OD 0.7mm ID DC Jack Power (5V 2A) Port&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
'''Overview:''' The PineTab detachable keyboard features a full function row, FN key functionality, meta key (where the Windows key would be) and all of the keys you need for daily use.&lt;br /&gt;
&lt;br /&gt;
'''FN keys:''': Pause/play (F2), Stop (F3), Previous(F4), Next(F5), Music (F6), Mail (F7), Home (F8), Mute (F9), Vol- (F10), Vol+ (F11), Disable touchpad (F12), NumLock (Insert), Scroll Lock (Delete), PgUp (Up Arrow), PgDn (Down Arrow), Home (Left Arrow), End (Right Arrow), Digital Numpad (7,8,9,0,U,I,O,P,J,K,L,;,M,.,/)&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
* &amp;quot;pinetab-dev&amp;quot;: development version sent to ~100 developers. This one is like the Early Adopter version, but has a different display panel.&lt;br /&gt;
* [[PineTab/Early-Adopter|Early Adopter]]: the first hardware revision of the PineTab, which shipped to customers.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTabBoard.jpeg|400px|thumb|right|The insides of the PineTab]]&lt;br /&gt;
&lt;br /&gt;
[[File:IMG_20220124_194521.jpg|thumb|right|Pinetab Board]]&lt;br /&gt;
&lt;br /&gt;
== PineTab board information, schematics and certifications ==&lt;br /&gt;
* PineTab mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Schematic%20v1.2-20191125.pdf PineTab mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-top.pdf PineTab mainboard component placement ver 1.2 - Top View]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-bottom.pdf PineTab mainboard component placement ver 1.2 - Bottom View]&lt;br /&gt;
* PineTab keyboard schematic:&lt;br /&gt;
** PineTab keyboard and Pinebook (Pro) keyboard using same controller and from same engineering source&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/Pinetab%20HB092A%20Keyboard%20Schematic.pdf PineTab Keyboard Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/HB092_0884232458_Hynitron_PTP_20200514_662905_Linux_US_BackLight_CRC_175057F5.hex PineTab keyboard firmware code]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/SH68F83V2.0.pdf PineTab Keyboard Controller Datasheet]&lt;br /&gt;
&lt;br /&gt;
* PineTab certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20FCC-SDOC%20Certificate-S20060600404001.pdf PineTab FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20CE-RED%20Certificate-S20060600403.pdf PineTab CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PINETAB%20ROHS%20TEST%20REPORT.pdf PineTab ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 64GB SanDisk eMMC Datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271.pdf GOODiX GT9271 Capacitive Touch Controller datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271_Config_20200818_142030_V66.cfg PineTab GT9271 Capacitive Touch Controller configuration file]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
The PineTab will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distro (because the PineTab uses the mainline kernel), only few of them will actually be usable on Early Adopters PineTab, due to specifics of working with LCD panel. Among those listed all except for postmarketOS have working builds.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts ===&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
The UBPorts Ubuntu Touch is what was preinstalled on the PineTab Early Adopters batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can update itself in System Settings, and also a  jenkins daily build can be downloaded at this updated address for the latest daily image: &lt;br /&gt;
&lt;br /&gt;
https://ci.ubports.com/job/rootfs/job/rootfs-pinetab-systemimage/&lt;br /&gt;
&lt;br /&gt;
The last stable builds are also listed and appear to be updated every few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that as of 20th January the latest stable/release candidate and development builds  still lacked Bluetooth, Rotation and had the same issues with online accounts etc&lt;br /&gt;
&lt;br /&gt;
Online accounts access have a fix for Google accounts here https://github.com/rubencarneiro/account-plugins/releases&lt;br /&gt;
&lt;br /&gt;
There are however significant updates to the original pinetab image (without the issues above) &lt;br /&gt;
&lt;br /&gt;
The old image appears to be deprecated here&lt;br /&gt;
[https://ci.ubports.com/job/rootfs/job/rootfs-pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
In the event that WiFi fails to connect, the USB port can be used with an appropriate dongle to connect for internet using ethernet cable.&lt;br /&gt;
&lt;br /&gt;
=== postmarketOS ===&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
postmarketOS extends [https://www.alpinelinux.org/ Alpine Linux] to run on smartphones and other mobile devices.&lt;br /&gt;
&lt;br /&gt;
It offers various user interfaces (Phosh, Plasma Mobile, Sxmo, Plasma Desktop, Gnome 3, Kodi, XFCE4, ...). As of writing, official images are provided with Phosh and Plasma Mobile. The official images come in two flavors, either as demo image to try out postmarketOS, or with the installer.&lt;br /&gt;
&lt;br /&gt;
When using the installer images (recommended), it is possible to:&lt;br /&gt;
* encrypt your installation&lt;br /&gt;
* install from the SD card to eMMC&lt;br /&gt;
&lt;br /&gt;
Getting postmarketOS for the PineTab:&lt;br /&gt;
* [https://postmarketos.org/download/ Download page]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/PINE64_PineTab_(pine64-pinetab)#Installation Flashing instructions]&lt;br /&gt;
* Power users may also create their own image with the distribution's install and development tool &amp;lt;code&amp;gt;pmbootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
Arch Linux ARM with Phosh as the UI selection, maintained by the DanctNIX community. &lt;br /&gt;
&lt;br /&gt;
The latest image can be downloaded [https://github.com/dreemurrs-embedded/Pine64-Arch/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ARM ===&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
The PineTab &amp;quot;Early Adopter&amp;quot; edition is currently the only device supported by Manjaro ARM.&lt;br /&gt;
&lt;br /&gt;
Images with several different environments, including Phosh and Plasma, are available for the &amp;quot;Dev&amp;quot; pre-release can be downloaded [https://osdn.net/projects/manjaro-arm/storage/pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
Images for the Early Adopter version can be downloaded [https://github.com/manjaro-arm/pinetab-images/releases here].&lt;br /&gt;
Both Beta releases and weekly unstable builds for Phosh and Plasma Mobile can be found there.&lt;br /&gt;
&lt;br /&gt;
=== Mobian ===&lt;br /&gt;
[[File:Debian-logo.png|100px]]&lt;br /&gt;
Mobian is a project providing Debian images for mobile devices. &lt;br /&gt;
&lt;br /&gt;
PineTab images can be downloaded [https://images.mobian.org/pinetab/ here]. Password is '''1234'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sailfish OS ===&lt;br /&gt;
&lt;br /&gt;
[[File:SailfishOS logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
You can get SailfishOS on your with the flash-it script, which will write an image on a SD card. https://github.com/sailfish-on-dontbeevil/flash-it&lt;br /&gt;
&lt;br /&gt;
There is a forum discussion with further information.&lt;br /&gt;
&lt;br /&gt;
http://forum.pine64.org/showthread.php?tid=11850&lt;br /&gt;
&lt;br /&gt;
Many things are still broken but Bluetooth, Audio, Rotation and Keyboard are working.&lt;br /&gt;
&lt;br /&gt;
== Installation instructions ==&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or microSD card see [[PinePhone Installation Instructions]]. The information is almost the same for the PineTab, as it is a very similar device. Do not try to use the PinePhone images though, use the PineTab images linked above.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
To test an OS, just flash its image onto an microSD card, plug it into PineTab, and reboot.&lt;br /&gt;
Note that USB stick won't work.&lt;br /&gt;
Also note that you need to &amp;quot;flash&amp;quot;, not just copy the file onto the card.&lt;br /&gt;
Also remember that you need to unpack image file if it's packed!&lt;br /&gt;
&lt;br /&gt;
You can do it using Ubuntu Touch installed on the PineTab! For now, only Mobian is supported by the guide below.&lt;br /&gt;
&lt;br /&gt;
* First, make sure you have enough free disk space and empty Downloads directory on the PineTab (while not strictly necessary, empty Downloads dir will simplify your typing. You can just move all files from there to another directory).&lt;br /&gt;
* Turn off Sleep when idle in the settings. Settings &amp;gt; Battery &amp;gt; Sleep when idle: Never&lt;br /&gt;
* Go to the Mobian link above and download compressed image (the one ending with .img.gz) - usual recommendation is to download latest, i.e. lowest one.&lt;br /&gt;
* Open terminal and type this in it:&lt;br /&gt;
  cd Downloads&lt;br /&gt;
  ls&lt;br /&gt;
* It should show you the name of the file you've just downloaded&lt;br /&gt;
* This file is compressed, so first you need to uncompress it. Type this into terminal:&lt;br /&gt;
  gunzip *.gz &amp;amp;&amp;amp; echo done&lt;br /&gt;
* This command will take some time (you won't see any progress until it's done). It either will succeed (and print &amp;quot;done&amp;quot;) and fail (and print why).&lt;br /&gt;
* Now, let's have a look at disks. Type this into terminal:&lt;br /&gt;
  lsblk&lt;br /&gt;
* It should show you a tree of disks and their partitions. If you don't have microSD card inserted yet, all of them begin with mmcblk2. Also, some of them have something in the &amp;quot;MOUNTPOINT&amp;quot; column&lt;br /&gt;
* Insert microSD card into PineTab. Note that all information on it will be deleted, so don't insert one with valuable information on it!&lt;br /&gt;
* type `lsblk` into terminal again.&lt;br /&gt;
* Note that now tree of disks has one or more new entries - starting with mmcblk0 - that's partitions of your microSD card.&lt;br /&gt;
* Confirm that size of mmcblk0 is close to size of the microSD card, and all lines starting with mmcblk0 have empty &amp;quot;MOUNTPOINT&amp;quot; column.&lt;br /&gt;
* now type this:&lt;br /&gt;
  sudo dd if=`ls` of=/dev/mmcblk0 bs=1M status=progress&lt;br /&gt;
* It will take some time, depending on speed of your microSD card and size of image file&lt;br /&gt;
* Now, reboot your PineTab - type this into terminal:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
* PineTab should boot from the microSD you've just flashed&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Reset ===&lt;br /&gt;
&lt;br /&gt;
If your PineTab is in unknown state or doesn't want to start: Press power button for 7-8s. It makes a sound and you know it's totally off. 3 seconds after, power button  again for 2-3s and it will start to boot.&lt;br /&gt;
&lt;br /&gt;
=== Power Off While Charging ===&lt;br /&gt;
&lt;br /&gt;
When plugging your Pinetab into a charger, it automatically powers on. Use the above &amp;quot;Reset&amp;quot; instruction (holding the power button in for several seconds) to turn it off. This will allow your Pinetab to charge without being powered on. &lt;br /&gt;
&lt;br /&gt;
=== Display rotated 90° on Arch ARM ===&lt;br /&gt;
With the following command you can turn the display to landscape:&lt;br /&gt;
&lt;br /&gt;
* echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&lt;br /&gt;
&lt;br /&gt;
This command does not persist a reboot.&lt;br /&gt;
&lt;br /&gt;
=== Opening Pinetab ===&lt;br /&gt;
&lt;br /&gt;
Be very careful here. It is not a 'pop off' cover design. &lt;br /&gt;
Special care should be directed to AVOID anything that may appear to cause a &amp;quot;bend&amp;quot; in screen. &lt;br /&gt;
&lt;br /&gt;
Gently use fingernails (or if you have one, plastic pry), starting in the very middle location for each side (saving keyboard connector latch over area (bottom side) for the very last removal step).&lt;br /&gt;
&lt;br /&gt;
Work your way from the inner middle on each side, slowly. Slide gently towards the direction of each corner (saving the lifting of actual corners themselves for the second to last step)). Careful not to break thin speaker wires that line the outside of the inner case.&lt;br /&gt;
&lt;br /&gt;
The very last opening piece should be the &amp;quot;latch over&amp;quot; (where the keyboard pins connect).&lt;br /&gt;
&lt;br /&gt;
KEEP IN MIND: The main key here is to avoid any potential &amp;quot;bend&amp;quot; of the screen. We save the corners until after working on the middle of each side to reduce pressure on the screen.&lt;br /&gt;
&lt;br /&gt;
Do not force anything. If it is not coming off with gentle effort, you are likely doing something wrong (try another side middle).&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [https://pine64.com/product/pinetab-10-1-linux-tablet/ The PineTab on the Pine64 store]&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=140 The PineTab section of the Pine64 forums]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=11401 Comments on back cover removal on forums]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=13118 Demonstration Video: Pinetab back cover removal on forums]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTab]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=13291</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=13291"/>
		<updated>2022-07-15T02:05:05Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK2287 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled, available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_05-01-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA256: 9a58939f999168606800b8a2b2a94c9673cd4a48962361e007e6f7e41262707c&lt;br /&gt;
    SHA512: a02414f44a2f6caf7f769f3dcd0ba5a2d68e1f8adf9e30bbe5b5d59eff7e41ee94603a71c80b26ad1d6e264d95b6391a414d7d1d2012bb156f113b3aa4f8bf33&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/vcQk1abb#16Twq3m3CX3nWI491FyfTzWzP7kPx9sBRqhU3d_bRW4&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/touch NuttX Touch Panel Driver for PineDio Stack BL604]&lt;br /&gt;
* [https://www.robertlipe.com/buttons-on-bl602-nuttx/ Buttons on BL602 NuttX]&lt;br /&gt;
* [https://lupyuen.github.io/articles/expander NuttX GPIO Expander for PineDio Stack BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/auto2 (Mostly) Automated Testing of Apache NuttX RTOS on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/zig Zig on RISC-V BL602: Quick Peek with Apache NuttX RTOS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/iot Build an IoT App with Zig and LoRaWAN]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lvgl Build an LVGL Touchscreen App with Zig]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=13144</id>
		<title>PinePhone (Pro) Keyboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_(Pro)_Keyboard&amp;diff=13144"/>
		<updated>2022-06-03T02:58:16Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Getting started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PP_KB_Front-1024x576.jpg|400px|thumb|right|Picture of the PinePhone (Pro) Keyboard]]&lt;br /&gt;
&lt;br /&gt;
The '''PinePhone (Pro) Keyboard Case''' is a case compatible with the [[PinePhone]] and [[PinePhone Pro]], adding a keyboard functionality to the phone. It features a clam-shell design and uses the pogo pins located on the smartphone’s midsection and attaches by replacing the default back cover. This add-on effectively turns the PinePhone (Pro) into a PDA with an in-built LTE modem.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
[[File:Ppkb_description.png|thumb|upright=1.2|&lt;br /&gt;
① Contact pads&amp;lt;br&amp;gt;&lt;br /&gt;
② Battery switch&amp;lt;br&amp;gt;&lt;br /&gt;
③ USB-C connector]]&lt;br /&gt;
&lt;br /&gt;
The keyboard case works with both the PinePhone and PinePhone Pro and features a clam-shell design. It uses pogo pins located on the phone’s midsection and attaches by replacing the default back cover. When folded, the phone’s screen and the keyboard rest securely against each other. The hinge features a 180° design, which not only allows for two-hand typing on a surface but also for comfortable thumb-typing when fully extended. The etched keycaps can be easily relocated for alternate layouts such as AZERTY or QWERTZ. The keyboard case runs an [https://xff.cz/git/pinephone-keyboard/ open firmware], which means that anyone with the know-how can alter existing functions or add new ones. The bottom (keyboard) and top (phone) sections of the assembly are well-balanced thanks to the large, 6000mAh, internal battery capable of charging the PinePhone (Pro) during operation. The internal battery effectively triples the phone’s battery life. The internal keyboard battery can be manually toggled on/off and the keyboard’s battery charge level can be read in the supported OSes; the keyboard remains functional with the battery fully depleted.&lt;br /&gt;
&lt;br /&gt;
You do not lose access to the PinePhone (Pro)’s USB-C port, speaker, microphone, or any external features, such as volume and lock buttons, with the keyboard attached. There is also a cut-out for the camera, torch, and headphone jack. The USB-C port on the keyboard is capable of powering both the keyboard and PinePhone (Pro) simultaneously. &amp;lt;s&amp;gt;This means that you can plug in a USB mouse, a USB-C dongle, or some other peripheral while the phone and keyboard’s internal battery charge&amp;lt;/s&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{warning|1=Do NOT plug any device into the phone USB-C port while the keyboard is attached. Doing so may result in damage or loss of the keyboard charging functionality. Technical details regarding the issue can be found in [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post. Please see the [[PinePhone (Pro) Keyboard#Safety|safety]] section.}}&lt;br /&gt;
&lt;br /&gt;
Please keep in mind that the keyboard case transforms the PinePhone (Pro) into a PDA, which means that taking calls will likely prove awkward without a wired or wireless headset connected (try speakerphone button if available).&lt;br /&gt;
&lt;br /&gt;
=== Mounting the keyboard ===&lt;br /&gt;
Power off your PinePhone and remove the back case. To remove the back case of the PinePhone use your fingernail or another soft object to pry up the back case. A notch to easily remove the cover is located at the bottom left of the PinePhone with the backcover facing the user. &lt;br /&gt;
&lt;br /&gt;
Open and place the keyboard flat on a hard surface with the hinge fully extended. Proceed to insert the PinePhone into the keyboard at an angle of approx. 15 degrees. Make sure that the PinePhone’s pogo pins and the corresponding pads ① on the keyboard are aligned. The leading edge with volume and power buttons should make contact first. Firmly press the PinePhone into place. Multiple clicks should be heard as the two snap into place. Pay special attention to the plastic pin below the camera hole. Firmly push from the rear, below the camera hole, to click it into position. Failing to do so may cause an insufficient pin contact and prevent the case from charging the phone.&lt;br /&gt;
&lt;br /&gt;
The PinePhone can be removed from the keyboard easily using a notch similar to the one found on the back case. The notch is located at the bottom of the leading edge with the power and volume buttons.&lt;br /&gt;
&lt;br /&gt;
=== Operation ===&lt;br /&gt;
The keyboard will function automatically once a PinePhone running a compatible operating system is mounted. For alterations to physical layout and firmware see the relevant sections respectively.&lt;br /&gt;
&lt;br /&gt;
The keyboard features an in-built 6000mAh battery. The battery can be turned ON/OFF using the button on the right leading edge of the keyboard ②. A short button press activates the internal battery while a long (15 seconds) press or double press deactivates it. Compatible operating systems display both the PinePhone’s and keyboard’s battery status.&lt;br /&gt;
&lt;br /&gt;
You should charge the PinePhone and the keyboard &amp;lt;u&amp;gt;only&amp;lt;/u&amp;gt; using the USB-C ③ port on the keyboard. The keyboard’s USB-C port cannot be used for peripherals. The PinePhone’s USB-C port remains operational when mounted in the keyboard and can be used for data and peripherals.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
There are multiple possible hardware issues users could face. It is recommend to check the following most common hardware issues and their solutions and workarounds.&lt;br /&gt;
&lt;br /&gt;
==== Pogo pins not making proper contact ====&lt;br /&gt;
Under certain scenarios the keyboard's contacts are not making proper contact with the pogo pins of the phone. To address the issue:&lt;br /&gt;
&lt;br /&gt;
* Power down the phone!&lt;br /&gt;
* Apply '''slight''' pressure in the upper mid of the PinePhone's backside until the plastic holder pin towards the upper middle of the keyboard cover, until an audible click can be heard.&lt;br /&gt;
* Make sure the contacts and pogo pins are clean and the pogo pins can be slightly pressed individually.&lt;br /&gt;
* If the above does not work, a shim under the keyboard's contacts might be required, as explained [https://xnux.eu/pinephone-keyboard/faq.html#ts FAQ troubleshooting section]. See also this [https://freiburg.social/system/media_attachments/files/107/684/243/421/870/279/original/a5e9c68ff3510ec8.jpeg photo of where to place the shim], or [https://www.youtube.com/watch?v=4ixPjz6SPIA this video].&lt;br /&gt;
&lt;br /&gt;
==== Top row is less responsive ====&lt;br /&gt;
The keys of the top row may be less responsive. The issue can be worked around by adding inserts to the underside of the top row key caps to decrease the travel distance. More details regarding the workaround can be found in the corresponding section of the FAQ page of the developer megi: https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
==== Software issues ====&lt;br /&gt;
For any software issue please see the [[PinePhone (Pro) Keyboard#Software support|Software support section]] and the [[PinePhone (Pro) Keyboard#Frequently asked questions|FAQ section]].&lt;br /&gt;
&lt;br /&gt;
== Safety ==&lt;br /&gt;
&lt;br /&gt;
{{warning|1=Do NOT plug any device into the phone USB-C port while the keyboard is attached. Doing so may result in damage or loss of the keyboard charging functionality. Technical details regarding the issue can be found in [https://www.pine64.org/2022/05/31/may-update-worth-the-wait/ this] blog post. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Due to this limitation users may want block the USB-C port of the phone while the keyboard is connected to prevent connecting any USB device to the phone under any circumstances. See for example [https://fosstodon.org/web/@silverhax/107783280758831068 here].}}&lt;br /&gt;
&lt;br /&gt;
'''Please note:''' Only use mild isopropyl alcohol when wiping down the clamshell of the device. Stronger solutions may partially strip the coatings. Do not lube the keyboard with GPL 205G0 switch grease, it can cause problems with the key responsiveness and tactility.&lt;br /&gt;
&lt;br /&gt;
== Software support ==&lt;br /&gt;
&lt;br /&gt;
=== Kernel-space driver ===&lt;br /&gt;
&lt;br /&gt;
Kernel driver implementation from Samuel Holland: ip5xxx_power and kb151 https://github.com/smaeul/linux/commits/wip/pp-keyboard&lt;br /&gt;
&lt;br /&gt;
=== User-space driver ===&lt;br /&gt;
The user-space driver is available [https://xff.cz/git/pinephone-keyboard/ here]. Use git to clone the repository. You're going to need sdcc 4.1+ installed to build it, so use your package manager to install that first. Next you'll cd into the directory you cloned pinephone-keyboard and use the command &amp;quot;make&amp;quot; to build. After the build is completed, cd into the build directory and you'll notice several new files starting with ppkb-. To use your keyboard case, you'll want to run the following command: &amp;lt;code&amp;gt;sudo ./ppkb-i2c-inputd&amp;lt;/code&amp;gt; &amp;lt;!-- this isn't running as a daemon, if anyone knows how to make it do so please edit that info in! --&amp;gt; Open something you can type into like a new terminal window or text editor and you should now be able to use the keyboard case! &lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Virtual keyboards such as &amp;lt;i&amp;gt;squeekboard&amp;lt;/i&amp;gt; are opening whenever a text field is selected.&lt;br /&gt;
&lt;br /&gt;
To disable this behavior under Linux running '''Phosh''' you can change the corresponding settings under ''Settings'' &amp;gt; ''Accessibility'' &amp;gt; ''Screen Keyboard'' (see [https://forum.pine64.org/showthread.php?tid=15789&amp;amp;pid=105152 here]). The virtual keyboard can also be disabled temporarily for one session using: &lt;br /&gt;
&lt;br /&gt;
* To temporarily disable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To temporarily enable the virtual keyboard: &amp;lt;code&amp;gt;gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The virtual keyboard needs to be activated before removing the keyboard case again.&lt;br /&gt;
&lt;br /&gt;
Under '''Plasma Mobile''' the keyboard can be disabled via a widget, see [https://forum.pine64.org/showthread.php?tid=14789&amp;amp;pid=105077#pid105077 here].&lt;br /&gt;
&lt;br /&gt;
In '''Sxmo''' disabling the keyboard is not required, as the keyboard will only shown when the corresponding hotkey button is pressed.&lt;br /&gt;
&lt;br /&gt;
== Keyboard layout ==&lt;br /&gt;
The keyboard features a default layout (pictured below) created and agreed upon by the community. The keyboard layout can be altered using software as well as by physically repositioning keycaps. All keycaps, with the &amp;lt;u&amp;gt;exception&amp;lt;/u&amp;gt; of space and return keys, can be easily and safely relocated for alternative layouts corresponding to software settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;nolines&amp;quot; widths=&amp;quot;500px&amp;quot; heights=&amp;quot;400px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Ppkb_layout2.png|The keyboard layout how the keys were originally intended&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Keyboard firmware ==&lt;br /&gt;
PinePhone’s keyboard firmware was developed independently by Ondřej Jirman as a free-of-charge contribution to PINE64. The firmware source code is freely and publicly available and you can modify it, and the supporting utilities, using common FOSS tools.  &lt;br /&gt;
&lt;br /&gt;
=== Firmware and supporting utilities ===&lt;br /&gt;
The design of the firmware allows the keys, modifier keys, and their combinations to be handled in virtually unlimited ways, without a need to flash a customized version of the firmware. Mapping of keys is defined at runtime, using the supporting utilities, and is not hardcoded in the firmware. Different keyboard layouts can be loaded dynamically to support various use cases.&lt;br /&gt;
&lt;br /&gt;
The repository that contains the source code of the firmware, supporting utilities and associated documentation is located at https://xnux.eu/pinephone-keyboard/.&lt;br /&gt;
&lt;br /&gt;
You are welcome to contribute patches and improvements to the firmware and the supporting utilities. A summary of firmware development history is available at https://xnux.eu/log/ alongside other development updates from the firmware author.&lt;br /&gt;
&lt;br /&gt;
Much time and effort went into the development of this firmware. If you wish to send a token of appreciation or support the development efforts in any way, please consider making a donation to the author via one of the methods listed at the bottom of this web page: https://xnux.eu/contribute.html.&lt;br /&gt;
&lt;br /&gt;
=== Firmware License ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Copyright (C) 2021 Ondřej Jirman &amp;lt;megi@xff.cz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This program is free software: you can redistribute it and/or modify&lt;br /&gt;
it under the terms of the GNU General Public License as published by&lt;br /&gt;
the Free Software Foundation, with either version 3 of the License or&lt;br /&gt;
(at your discretion) any later version.&lt;br /&gt;
&lt;br /&gt;
This program is distributed in the hope that it will be useful,&lt;br /&gt;
but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &lt;br /&gt;
See GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
GNU General Public License http://www.gnu.org/licenses/&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
Key hardware specifications:&lt;br /&gt;
* Dimensions (closed): 161 x 95 x 25mm&lt;br /&gt;
* Weights (without / with PinePhone mounted): ~ 191 / ~391 grams&lt;br /&gt;
* Number of keys: 54&lt;br /&gt;
* Number of rows: 5&lt;br /&gt;
** Keyboard IC: Keyboard IC: EM85F684A 8-bit microcontroller with 256 bytes RAM, 2048/ bytes XRAM; 16kB for user’s own firmware&lt;br /&gt;
* Battery capacity: 6000mAh (22.2Wh 3.7V)&lt;br /&gt;
* Charger input: 5V, 3A (15W)&lt;br /&gt;
** Charging and battery IC chip: IP5209 power management IC with charge indicate controller and boost converter&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
''' The keyboard does not work under OSK-SDL (full-disk encryption UI at boot) '''&amp;lt;br&amp;gt;&lt;br /&gt;
That is a known bug, see https://gitlab.com/postmarketOS/pmaports/-/issues/1383.&lt;br /&gt;
&lt;br /&gt;
''' What is the keyboard driver situation? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#drivers&lt;br /&gt;
&lt;br /&gt;
''' Are keyboard drivers included in my distribution? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#distros&lt;br /&gt;
&lt;br /&gt;
''' What's the status of the existing software for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#sw-status&lt;br /&gt;
&lt;br /&gt;
''' My keyboard doesn't work (well)! '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#faq-ts&lt;br /&gt;
&lt;br /&gt;
''' How does charging work? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#charging&lt;br /&gt;
&lt;br /&gt;
''' What charger is best for the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#chargers&lt;br /&gt;
&lt;br /&gt;
''' How safe is the charger circuit in the keyboard? '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#safety&lt;br /&gt;
&lt;br /&gt;
''' Keyboard doesn't react to any key presses '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Keyboard works but top row of keys is less responsive '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is not charging from the keyboard '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Phone is charging slowly from the keyboard battery '''&amp;lt;br&amp;gt;&lt;br /&gt;
See https://xnux.eu/pinephone-keyboard/faq.html#ts&lt;br /&gt;
&lt;br /&gt;
''' Can you open the keyboard and add extra functionality? '''&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to do so, however the production units can be extremely difficult to open. Do not attempt to open the keyboard if you do not want to risk cosmetic damage (scaring and scratching of the plastic).&lt;br /&gt;
&lt;br /&gt;
''' How can I rotate the screen display in tty ? '''&amp;lt;br&amp;gt;&lt;br /&gt;
Under Linux this can be done using the command &amp;lt;code&amp;gt;echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Top row stopped displaying symbols! (kernel &amp;gt; 5.17) ''' &amp;lt;br&amp;gt;&lt;br /&gt;
* For Phosh (at the example of Mobian) see: https://wiki.mobian-project.org/doku.php?id=ppaccessories&lt;br /&gt;
* For TTY and SWMO see: https://codeberg.org/HazardChem/PinePhone_Keyboard&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.pdf PinePhone Keyboard 4 language user manual ver 2.0 in PDF format]&lt;br /&gt;
* [https://files.pine64.org/doc/PinePhone/USER%20MANUAL-KEYBOARD-V2-EN-DE-FR-ES.odt PinePhone Keyboard 4 language user manual ver 2.0 in ODT format]&lt;br /&gt;
&lt;br /&gt;
== Schematics, Datasheet and certifications ==&lt;br /&gt;
&lt;br /&gt;
* Schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PinePhone/PinePhone%20Keyboard%20Schematic%20V1.0-20211009.pdf PinePhone Keyboard Schematic ver 1.0 20211009]&lt;br /&gt;
&lt;br /&gt;
* Datasheet:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/EM85F684A.pdf PEM85F684A USB Microcontroller Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/IP5209.pdf IP5209 Power Bank SOC Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/txs0104e.pdf TXS0104E 4-Bit Bidirectional Voltage-Level Translator Datasheet]&lt;br /&gt;
&lt;br /&gt;
* Certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20FCC%20Certificate-S21111804102001.pdf PinePhone Keyboard FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PinePhone%20Keyboard%20CE%20Certificate-S21111804101001.pdf PinePhone Keyboard CE RED Certificate]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://www.pine64.org/2022/01/11/pinephone-pro-explorer-edition-pre-orders-open-january-11/ Pre-order announcement]&lt;br /&gt;
* FAQ of the developer megous: https://xnux.eu/pinephone-keyboard/faq.html&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12863</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12863"/>
		<updated>2022-04-20T01:06:55Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway Hardware based on Pine64 A64-LTS + RAK2287 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with (Default Choices: Chirpstack / TTN) software preinstalled / hardware enabled is available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
    (PineDio-RAK-Armbian_02-26-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA256: 83c2fae06579c2101502963289682295b83164d322ae7359c7c584f0b0e57426&lt;br /&gt;
    SHA512: c5e8cb0b657ee02aa15c60dc7cab7b9e4a7785da548541c6a0eaf4ee7241600c18e339776d94731c5130ccceea4da4aad159af521c4f484c1a550a39fe707d95&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/CIoykITD#S_NQx9wRG05CTT7TdzBX8u24bGiVzT341VPZakycaw8&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO (CH341 Pin 20)&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI (CH341 Pin 22)&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock (CH341 Pin 24)&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio2 PineDio Stack BL604 runs Apache NuttX RTOS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12570</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12570"/>
		<updated>2022-02-20T07:45:44Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on Pine64 A64-LTS + RAK2287 + GPS. &lt;br /&gt;
&lt;br /&gt;
Hardware is compatible with SOPINE images.&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway TTN/Chirpstack Image'''&lt;br /&gt;
&lt;br /&gt;
Debian image with software preinstalled / hardware enabled is available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
(PineDio_RAK_Armbian_01-16-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA1: f42b362e48777dd7614275089426300a7650fee4&lt;br /&gt;
    SHA256: 9c51b26709453e5f43ed1343e501293d3e3665010645bb40555de85cd032fc19&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/jUYjCYqD#QMXDHNRv5RL3UT6nOgLCx-tEGhkFst7VTWnbVoC3Kz0&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12567</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12567"/>
		<updated>2022-02-19T18:27:37Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the Pine64 A64-LTS + RAK2287 + GPS&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway Armbian Image'''&lt;br /&gt;
&lt;br /&gt;
Ready to use Armbian image with software preinstalled / hardware enabled is available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
(PineDio_RAK_Armbian_01-16-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA1: f42b362e48777dd7614275089426300a7650fee4&lt;br /&gt;
    SHA256: 9c51b26709453e5f43ed1343e501293d3e3665010645bb40555de85cd032fc19&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/jUYjCYqD#QMXDHNRv5RL3UT6nOgLCx-tEGhkFst7VTWnbVoC3Kz0&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork)'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
'''Accessing Chirpstack Admin Page'''&lt;br /&gt;
&lt;br /&gt;
Point web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12566</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12566"/>
		<updated>2022-02-19T18:24:21Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the Pine64 A64-LTS + RAK2287 + GPS&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway Armbian Image'''&lt;br /&gt;
&lt;br /&gt;
Ready to use Armbian image with software preinstalled / hardware enabled is available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
(PineDio_RAK_Armbian_01-16-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA1: f42b362e48777dd7614275089426300a7650fee4&lt;br /&gt;
    SHA256: 9c51b26709453e5f43ed1343e501293d3e3665010645bb40555de85cd032fc19&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/jUYjCYqD#QMXDHNRv5RL3UT6nOgLCx-tEGhkFst7VTWnbVoC3Kz0&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork) Easily Within Command'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
Accessing Chirpstack Admin Page:&lt;br /&gt;
&lt;br /&gt;
Point your web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View Gateway ID/EUI'''&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restart Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12565</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12565"/>
		<updated>2022-02-19T18:22:25Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the Pine64 A64-LTS + RAK2287 + GPS&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway Armbian Image'''&lt;br /&gt;
&lt;br /&gt;
Ready to use Armbian image with software preinstalled / hardware enabled is available below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
(PineDio_RAK_Armbian_01-16-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA1: f42b362e48777dd7614275089426300a7650fee4&lt;br /&gt;
    SHA256: 9c51b26709453e5f43ed1343e501293d3e3665010645bb40555de85cd032fc19&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/jUYjCYqD#QMXDHNRv5RL3UT6nOgLCx-tEGhkFst7VTWnbVoC3Kz0&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork) Easily Within Command'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
Accessing Chirpstack Admin Page:&lt;br /&gt;
&lt;br /&gt;
Point your web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View EUI'''&lt;br /&gt;
&lt;br /&gt;
View current Gateway ID:&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restarting Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12564</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12564"/>
		<updated>2022-02-19T18:04:05Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the Pine64 A64-LTS + RAK2287 + GPS&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway Armbian Image (Tested)'''&lt;br /&gt;
&lt;br /&gt;
Ready to use Armbian image with software/hardware enabled is available at download link below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
(PineDio_RAK_Armbian_01-16-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA1: f42b362e48777dd7614275089426300a7650fee4&lt;br /&gt;
    SHA256: 9c51b26709453e5f43ed1343e501293d3e3665010645bb40555de85cd032fc19&lt;br /&gt;
&lt;br /&gt;
DOWNLOAD LOCATION:  https://mega.nz/file/jUYjCYqD#QMXDHNRv5RL3UT6nOgLCx-tEGhkFst7VTWnbVoC3Kz0&lt;br /&gt;
&lt;br /&gt;
'''Switch Between Chirpstack / TTN (TheThingsNetwork) Easily Within Command'''&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork) Select:&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack Select:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
Accessing Chirpstack Admin Page:&lt;br /&gt;
&lt;br /&gt;
Point your web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://gatewayIPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
'''Changing EUI'''&lt;br /&gt;
&lt;br /&gt;
EUI is stored in file:&lt;br /&gt;
&lt;br /&gt;
  /opt/ttn-gateway/packetforwarder/lorapkt_fwd/local_conf.json&lt;br /&gt;
&lt;br /&gt;
'''Additional Shell Commands'''&lt;br /&gt;
&lt;br /&gt;
'''View EUI'''&lt;br /&gt;
&lt;br /&gt;
View current Gateway ID:&lt;br /&gt;
&lt;br /&gt;
  gateway-version&lt;br /&gt;
&lt;br /&gt;
'''Restarting Packet Forwarder/Concentrator'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl restart ttn-gateway&lt;br /&gt;
&lt;br /&gt;
'''Check Status'''&lt;br /&gt;
&lt;br /&gt;
  sudo systemctl status ttn-gateway&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Enabling Concentrator/GPS Steps (Below Already *Completed* For Above Image Download)'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12563</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=12563"/>
		<updated>2022-02-19T17:49:01Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the Pine64 A64-LTS + RAK2287 + GPS&lt;br /&gt;
&lt;br /&gt;
'''PineDio Gateway Armbian Image (Tested)'''&lt;br /&gt;
&lt;br /&gt;
Ready to use Armbian image with software/hardware enabled is available at download link below.&lt;br /&gt;
&lt;br /&gt;
Latest: &lt;br /&gt;
(PineDio_RAK_Armbian_01-16-2022.img.xz)&lt;br /&gt;
&lt;br /&gt;
    SHA1: f42b362e48777dd7614275089426300a7650fee4&lt;br /&gt;
    SHA256: 9c51b26709453e5f43ed1343e501293d3e3665010645bb40555de85cd032fc19&lt;br /&gt;
&lt;br /&gt;
'''DOWNLOAD LOCATION:'''  https://mega.nz/file/jUYjCYqD#QMXDHNRv5RL3UT6nOgLCx-tEGhkFst7VTWnbVoC3Kz0&lt;br /&gt;
&lt;br /&gt;
Switch between Chirpstack and TTN (TheThingsNetwork) easily within command:&lt;br /&gt;
&lt;br /&gt;
  gateway-config&lt;br /&gt;
&lt;br /&gt;
First Select:&lt;br /&gt;
&lt;br /&gt;
  Setup RAK Gateway Channel Plan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next For TTN (TheThingsNetwork):&lt;br /&gt;
&lt;br /&gt;
  Server is TTN&lt;br /&gt;
&lt;br /&gt;
'''or'''&lt;br /&gt;
&lt;br /&gt;
Next For Chirpstack:&lt;br /&gt;
&lt;br /&gt;
  Server is Other server&lt;br /&gt;
&lt;br /&gt;
Access To Chirpstack Admin Page:&lt;br /&gt;
&lt;br /&gt;
Point your web browser to:&lt;br /&gt;
&lt;br /&gt;
  http://IPaddress:8080&lt;br /&gt;
&lt;br /&gt;
'''Default Chirpstack Credentials'''&lt;br /&gt;
&lt;br /&gt;
  login: admin&lt;br /&gt;
  password: admin&lt;br /&gt;
&lt;br /&gt;
'''SSH Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: pinedio&lt;br /&gt;
 password: SoPinePass!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable rakwireless concentrator/GPS Device''' &lt;br /&gt;
'''(Below Has Been Completed For Above Image Download):'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've successfully build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux). For any kernel newer than 3.10 but mandatory for kernels newer than 5.15 you need to use the [https://github.com/dimich-dmb/spi-ch341-usb dimich-dmb fork of the the '''spi-ch341-usb driver.'''] This fork has updated documentation for the newer kernel interfaces. If this driver gives you problems please drop by any of the social platforms in the Pine64 LoRa chat and give a holler, and if you are using a 5.15 or older kernel you can use the rogerjames99 fork.&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git &lt;br /&gt;
or&lt;br /&gt;
 $ git clone https://github.com/dimich-dmb/spi-ch341-usb.git&lt;br /&gt;
then&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart&lt;br /&gt;
&lt;br /&gt;
With kernel 5.16 and newer the output is shorter:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [ 6744.813564] usb 1-2.1.1: new full-speed USB device number 21 using xhci_hcd&lt;br /&gt;
 [ 6744.904377] usb 1-2.1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [ 6744.904383] usb 1-2.1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [ 6744.904385] usb 1-2.1.1: Product: USB UART-LPT&lt;br /&gt;
 [ 6744.960243] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [ 6744.960246] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [ 6744.960247] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [ 6744.960249] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)&lt;br /&gt;
 [ 6744.960251] spi-ch341-usb 1-2.1.1:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1&lt;br /&gt;
 [ 6744.960302] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 0&lt;br /&gt;
 [ 6744.960350] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created&lt;br /&gt;
 [ 6744.960398] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created&lt;br /&gt;
 [ 6744.960445] spi-ch341-usb 1-2.1.1:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created&lt;br /&gt;
 [ 6744.960583] spi-ch341-usb 1-2.1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
=====Kernels 5.14 and older=====&lt;br /&gt;
&lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Kernel 5.15 and newer=====&lt;br /&gt;
&lt;br /&gt;
We need some help documenting how these interfaces work!&lt;br /&gt;
&lt;br /&gt;
The driver creates these interfaces:&lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  |Pin  ||SPI Function ||GPIO function ||GPIO name ||IRQ&lt;br /&gt;
  |-&lt;br /&gt;
  |15||CS0||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |16||CS1||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |17||CS2||-||-||-&lt;br /&gt;
  |-&lt;br /&gt;
  |19||-||Input||gpio4||hardware&lt;br /&gt;
  |-&lt;br /&gt;
  |21||-||Input||gpio5||software&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The dimich-dmb fork of spi-ch341-usb works with 5.15+ kernels, but as you can see above it is not configured for the needs of the Pinedio-USB by default. I have started a branch in my fork to work on getting the driver pre-configured for our needs. The branch can be [https://github.com/UncleGrumpy/spi-ch341-usb/tree/pinedio found here.] Please feel free to help! And open issues or discussions in the repo if you have problems or ideas how to help. Any improvements to the actual code beyond configuration should be pushed to the temporary [https://github.com/dimich-dmb/spi-ch341-usb/ upstream.]&lt;br /&gt;
&lt;br /&gt;
Since linux-5.15 binding to spidev driver is required to make slave devices available via /dev/, e.g. for slave 1 on bus 0 as real root (not with sudo):&lt;br /&gt;
&lt;br /&gt;
 # echo spidev &amp;gt; /sys/class/spi_master/spi0/spi0.1/driver_override&lt;br /&gt;
 # echo spi0.1 &amp;gt; /sys/bus/spi/drivers/spidev/bind&lt;br /&gt;
&lt;br /&gt;
For all devices handled by spi_ch341_usb driver (again, only as real root):&lt;br /&gt;
&lt;br /&gt;
 # for i in /sys/bus/usb/drivers/spi-ch341-usb/*/spi_master/spi*/spi*.*; do echo spidev &amp;gt; $i/driver_override; echo $(basename $i) &amp;gt; /sys/bus/spi/drivers/spidev/bind; done&lt;br /&gt;
&lt;br /&gt;
The documentation found at https://github.com/dimich-dmb/spi-ch341-usb/blob/master/README.md has more information.&lt;br /&gt;
&lt;br /&gt;
The 5.15+ driver is not ready yet. But if you are interested in testing, helping to get the configuration right, or working on application development you can build and test the current driver:&lt;br /&gt;
&lt;br /&gt;
 $ git clone -b pinedio https://github.com/UncleGrumpy/spi-ch341-usb.git &lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
So far this will automatically set up the SPI slave device /dev/spi0.0. It names the ch341-usb device as &amp;quot;pinedio&amp;quot; this will allow application developers to find the correct gpiochip by name. I need help confirming the correct gpio pins but as of now the driver will setup the following configuration:&lt;br /&gt;
&lt;br /&gt;
The driver uses following CH341A pins for the SPI interface. &lt;br /&gt;
 {| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
  | Pin || Name || Direction || Function SPI (CH341A)&lt;br /&gt;
  |-&lt;br /&gt;
  | 18  || D3   || output    || SCK (DCK)             &lt;br /&gt;
  |-&lt;br /&gt;
  | 20  || D5   || output    || MOSI (DOUT)           &lt;br /&gt;
  |-&lt;br /&gt;
  | 22  || D7   || input     || MISO (DIN)            &lt;br /&gt;
  |-&lt;br /&gt;
  | 15  || D0   || output    || CS0                   &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The driver uses the following GPIO configuration.  I am not at all sure these are the correct pins to use! This is one area that I could really use some help with!!!&lt;br /&gt;
 {| class=&amp;quot;wikitable&lt;br /&gt;
  | CH341 Pin || CH341A Name || Function   || GPIO Name  || GPIO Configuration || SX1262 connection&lt;br /&gt;
  |-&lt;br /&gt;
  |  7        || INT#        || IRQ        || dio_irq    || Output             || DIO1 (IRQ)        &lt;br /&gt;
  |-&lt;br /&gt;
  |  8        || SLCT        || BUSY       || dio_busy   || Input              || BUSY              &lt;br /&gt;
  |-&lt;br /&gt;
  | 26        || RST#        || Hard Reset || dio_reset  || Output             || NRESET            &lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function of these pins can be changed from user space by using libgpiod. The command line tools installed with the library (gpioset, gpioget, gpiodetect, gpioinfo...) can be used for bash scripts, etc. and applications should all use the libgpiod interfaces. The /sys/class/gpio interface has been removed from the kernel in 5.15, so any apps using /sys/class/gpio to access gpio pins are broken, or will be as distos update their kernels to 5.15 and beyond.&lt;br /&gt;
&lt;br /&gt;
GPIO pins can be listed with gpioinfo:&lt;br /&gt;
 $ gpioinfo pinedio&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
 gpiochip1 - 3 lines:&lt;br /&gt;
         line   0:    &amp;quot;dio_irq&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   1:   &amp;quot;dio_busy&amp;quot;       unused   input  active-high&lt;br /&gt;
         line   2:  &amp;quot;dio_reset&amp;quot;       unused  output  active-high&lt;br /&gt;
&lt;br /&gt;
The gpiochip# might be different.  The driver exposes the Pinedio with the gpio name &amp;quot;pinedio&amp;quot;, developers should use this name to interact with the gpiochip because the gpiochip# of the device is likely to be different from one system to the next, or depending on the order devices are initialized.&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;br /&gt;
* [https://lupyuen.github.io/articles/pinedio PineDio Stack BL604 RISC-V Board: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan2 LoRaWAN on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ttn The Things Network on PineDio Stack BL604 RISC-V Board]&lt;br /&gt;
* [https://lupyuen.github.io/articles/prometheus Monitor IoT Devices in The Things Network with Prometheus and Grafana]&lt;br /&gt;
* [https://lupyuen.github.io/articles/tsen Internal Temperature Sensor on BL602]&lt;br /&gt;
* [https://lupyuen.github.io/articles/roblox IoT Digital Twin with Roblox and The Things Network]&lt;br /&gt;
* [https://lupyuen.github.io/articles/gateway PineDio LoRa Gateway: Testing The Prototype]&lt;br /&gt;
* [https://lupyuen.github.io/articles/nuttx Apache NuttX OS on RISC-V BL602 and BL604]&lt;br /&gt;
* [https://lupyuen.github.io/articles/spi2 SPI on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/sx1262 LoRa SX1262 on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/lorawan3 LoRaWAN on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/rust2 Rust on Apache NuttX OS]&lt;br /&gt;
* [https://lupyuen.github.io/articles/ikea Connect IKEA Air Quality Sensor to Apache NuttX OS]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=File:PineTab_Board_3.jpg&amp;diff=12388</id>
		<title>File:PineTab Board 3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=File:PineTab_Board_3.jpg&amp;diff=12388"/>
		<updated>2022-01-28T03:57:51Z</updated>

		<summary type="html">&lt;p&gt;RTP: Closeup: underside of Pinetab board.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Closeup: underside of Pinetab board.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD|PD}}&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=File:PineTab_Board.jpg&amp;diff=12387</id>
		<title>File:PineTab Board.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=File:PineTab_Board.jpg&amp;diff=12387"/>
		<updated>2022-01-28T03:55:00Z</updated>

		<summary type="html">&lt;p&gt;RTP: Pinetab Board&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Pinetab Board&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD|PD}}&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=File:PineTab_Board_2.jpg&amp;diff=12386</id>
		<title>File:PineTab Board 2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=File:PineTab_Board_2.jpg&amp;diff=12386"/>
		<updated>2022-01-28T03:53:18Z</updated>

		<summary type="html">&lt;p&gt;RTP: Pinetab Board removed, next to screen.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Pinetab Board removed, next to screen.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD|PD}}&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12226</id>
		<title>PineTab</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12226"/>
		<updated>2022-01-10T08:50:42Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Opening Pinetab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=IMPORTANT INFORMATION for '''Early Adopters''' - please [[PineTab/Early-Adopter|'''CLICK HERE''']] - some '''known issues''' are listed there}}&lt;br /&gt;
&lt;br /&gt;
The PineTab is a 10&amp;quot; tablet created by Pine64.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
* '''Dimensions:''' 11mm x 175mm x 260mm (Thickness, Width, Height)&lt;br /&gt;
* '''Weight:''' 575g (Tablet alone)&lt;br /&gt;
* '''Build:''' Plastic&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB of internal eMMC storage&lt;br /&gt;
** MicroSD slot, bootable&lt;br /&gt;
** M.2 SSD slot, supports SATA and USB devices only, not NVME (optional)&lt;br /&gt;
* '''Cameras:''' 2Mpx Front, 5Mpx Rear&lt;br /&gt;
* '''SOC:''' Allwinner A64 Quad Core&lt;br /&gt;
* '''CPU:''' 4x ARM A53 1.152GHz&lt;br /&gt;
* '''GPU:''' Mali 400 MP2&lt;br /&gt;
* '''RAM:''' 2GB LPDDR3&lt;br /&gt;
* '''I/O:''' HD Video Out (Mini HDMI), Micro USB 2.0 OTG, USB 2.0 A host, 3.5mm Headphone/Mic combo,&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** WiFi (802.11b/g/n, 2.4GHz only)&lt;br /&gt;
** Bluetooth 2.1&lt;br /&gt;
** M.2 LTE / Cell MODEM card, (optional, and takes place of optional M.2 SSD)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 10.1 inches (257mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1280x800, 16:10 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Attachments/Accessories:''' Magnetically attached keyboard (optional)&lt;br /&gt;
* '''Battery:''' 6000MAh (6Ah)&lt;br /&gt;
* '''Misc. features:''' &lt;br /&gt;
** Volume rocker&lt;br /&gt;
** Speakers and Microphone&lt;br /&gt;
** 2.5mm OD 0.7mm ID DC Jack Power (5V 2A) Port&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
'''Overview:''' The PineTab detachable keyboard features a full function row, FN key functionality, meta key (where the Windows key would be) and all of the keys you need for daily use.&lt;br /&gt;
&lt;br /&gt;
'''FN keys:''': Pause/play (F2), Stop (F3), Previous(F4), Next(F5), Music (F6), Mail (F7), Home (F8), Mute (F9), Vol- (F10), Vol+ (F11), Disable touchpad (F12), NumLock (Insert), Scroll Lock (Delete), PgUp (Up Arrow), PgDn (Down Arrow), Home (Left Arrow), End (Right Arrow), Digital Numpad (7,8,9,0,U,I,O,P,J,K,L,;,M,.,/)&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
* &amp;quot;pinetab-dev&amp;quot;: development version sent to ~100 developers. This one is like the Early Adopter version, but has a different display panel.&lt;br /&gt;
* [[PineTab/Early-Adopter|Early Adopter]]: the first hardware revision of the PineTab, which shipped to customers.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTabBoard.jpeg|400px|thumb|right|The insides of the PineTab]]&lt;br /&gt;
&lt;br /&gt;
== PineTab board information, schematics and certifications ==&lt;br /&gt;
* PineTab mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Schematic%20v1.2-20191125.pdf PineTab mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-top.pdf PineTab mainboard component placement ver 1.2 - Top View]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-bottom.pdf PineTab mainboard component placement ver 1.2 - Bottom View]&lt;br /&gt;
* PineTab keyboard schematic:&lt;br /&gt;
** PineTab keyboard and Pinebook (Pro) keyboard using same controller and from same engineering source&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/Pinetab%20HB092A%20Keyboard%20Schematic.pdf PineTab Keyboard Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/HB092_0884232458_Hynitron_PTP_20200514_662905_Linux_US_BackLight_CRC_175057F5.hex PineTab keyboard firmware code]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/SH68F83V2.0.pdf PineTab Keyboard Controller Datasheet]&lt;br /&gt;
&lt;br /&gt;
* PineTab certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20FCC-SDOC%20Certificate-S20060600404001.pdf PineTab FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20CE-RED%20Certificate-S20060600403.pdf PineTab CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PINETAB%20ROHS%20TEST%20REPORT.pdf PineTab ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 64GB SanDisk eMMC Datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271.pdf GOODiX GT9271 Capacitive Touch Controller datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271_Config_20200818_142030_V66.cfg PineTab GT9271 Capacitive Touch Controller configuration file]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
The PineTab will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distro (because the PineTab uses the mainline kernel), only few of them will actually be usable on Early Adopters PineTab, due to specifics of working with LCD panel. Among those listed all except for postmarketOS have working builds.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts ===&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
The UBPorts Ubuntu Touch is what was preinstalled on the PineTab Early Adopters batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can update itself in System Settings, and also a  jenkins daily build can be downloaded at this updated address for the latest daily image: &lt;br /&gt;
&lt;br /&gt;
https://ci.ubports.com/job/rootfs/job/rootfs-pinetab-systemimage/&lt;br /&gt;
&lt;br /&gt;
The last stable builds are also listed and appear to be updated every few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that as of 20th January the latest stable/release candidate and development builds  still lacked Bluetooth, Rotation and had the same issues with online accounts etc&lt;br /&gt;
&lt;br /&gt;
Online accounts access have a fix for Google accounts here https://github.com/rubencarneiro/account-plugins/releases&lt;br /&gt;
&lt;br /&gt;
There are however significant updates to the original pinetab image (without the issues above) &lt;br /&gt;
&lt;br /&gt;
The old image appears to be deprecated here&lt;br /&gt;
[https://ci.ubports.com/job/rootfs/job/rootfs-pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
In the event that WiFi fails to connect, the USB port can be used with an appropriate dongle to connect for internet using ethernet cable.&lt;br /&gt;
&lt;br /&gt;
=== postmarketOS ===&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
postmarketOS extends [https://www.alpinelinux.org/ Alpine Linux] to run on smartphones and other mobile devices.&lt;br /&gt;
&lt;br /&gt;
It offers various user interfaces (Phosh, Plasma Mobile, Sxmo, Plasma Desktop, Gnome 3, Kodi, XFCE4, ...). As of writing, official images are provided with Phosh and Plasma Mobile. The official images come in two flavors, either as demo image to try out postmarketOS, or with the installer.&lt;br /&gt;
&lt;br /&gt;
When using the installer images (recommended), it is possible to:&lt;br /&gt;
* encrypt your installation&lt;br /&gt;
* install from the SD card to eMMC&lt;br /&gt;
&lt;br /&gt;
Getting postmarketOS for the PineTab:&lt;br /&gt;
* [https://postmarketos.org/download/ Download page]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/PINE64_PineTab_(pine64-pinetab)#Installation Flashing instructions]&lt;br /&gt;
* Power users may also create their own image with the distribution's install and development tool &amp;lt;code&amp;gt;pmbootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
Arch Linux ARM with Phosh as the UI selection, maintained by the DanctNIX community. &lt;br /&gt;
&lt;br /&gt;
The latest image can be downloaded [https://github.com/dreemurrs-embedded/Pine64-Arch/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ARM ===&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
The PineTab &amp;quot;Early Adopter&amp;quot; edition is currently the only device supported by Manjaro ARM.&lt;br /&gt;
&lt;br /&gt;
Images with several different environments, including Phosh and Plasma, are available for the &amp;quot;Dev&amp;quot; pre-release can be downloaded [https://osdn.net/projects/manjaro-arm/storage/pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
Images for the Early Adopter version can be downloaded [https://github.com/manjaro-arm/pinetab-images/releases here].&lt;br /&gt;
Both Beta releases and weekly unstable builds for Phosh and Plasma Mobile can be found there.&lt;br /&gt;
&lt;br /&gt;
=== Mobian ===&lt;br /&gt;
[[File:Debian-logo.png|100px]]&lt;br /&gt;
Mobian is a project providing Debian images for mobile devices. &lt;br /&gt;
&lt;br /&gt;
PineTab images can be downloaded [https://images.mobian-project.org/pinetab/ here]. Password is '''1234'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sailfish OS ===&lt;br /&gt;
&lt;br /&gt;
[[File:SailfishOS logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
You can get SailfishOS on your with the flash-it script, which will write an image on a SD card. https://github.com/sailfish-on-dontbeevil/flash-it&lt;br /&gt;
&lt;br /&gt;
There is a forum discussion with further information.&lt;br /&gt;
&lt;br /&gt;
http://forum.pine64.org/showthread.php?tid=11850&lt;br /&gt;
&lt;br /&gt;
Many things are still broken but Bluetooth, Audio, Rotation and Keyboard are working.&lt;br /&gt;
&lt;br /&gt;
== Installation instructions ==&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or microSD card see [[PinePhone Installation Instructions]]. The information is almost the same for the PineTab, as it is a very similar device. Do not try to use the PinePhone images though, use the PineTab images linked above.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
To test an OS, just flash its image onto an microSD card, plug it into PineTab, and reboot.&lt;br /&gt;
Note that USB stick won't work.&lt;br /&gt;
Also note that you need to &amp;quot;flash&amp;quot;, not just copy the file onto the card.&lt;br /&gt;
Also remember that you need to unpack image file if it's packed!&lt;br /&gt;
&lt;br /&gt;
You can do it using Ubuntu Touch installed on the PineTab! For now, only Mobian is supported by the guide below.&lt;br /&gt;
&lt;br /&gt;
* First, make sure you have enough free disk space and empty Downloads directory on the PineTab (while not strictly necessary, empty Downloads dir will simplify your typing. You can just move all files from there to another directory).&lt;br /&gt;
* Turn off Sleep when idle in the settings. Settings &amp;gt; Battery &amp;gt; Sleep when idle: Never&lt;br /&gt;
* Go to the Mobian link above and download compressed image (the one ending with .img.gz) - usual recommendation is to download latest, i.e. lowest one.&lt;br /&gt;
* Open terminal and type this in it:&lt;br /&gt;
  cd Downloads&lt;br /&gt;
  ls&lt;br /&gt;
* It should show you the name of the file you've just downloaded&lt;br /&gt;
* This file is compressed, so first you need to uncompress it. Type this into terminal:&lt;br /&gt;
  gunzip *.gz &amp;amp;&amp;amp; echo done&lt;br /&gt;
* This command will take some time (you won't see any progress until it's done). It either will succeed (and print &amp;quot;done&amp;quot;) and fail (and print why).&lt;br /&gt;
* Now, let's have a look at disks. Type this into terminal:&lt;br /&gt;
  lsblk&lt;br /&gt;
* It should show you a tree of disks and their partitions. If you don't have microSD card inserted yet, all of them begin with mmcblk2. Also, some of them have something in the &amp;quot;MOUNTPOINT&amp;quot; column&lt;br /&gt;
* Insert microSD card into PineTab. Note that all information on it will be deleted, so don't insert one with valuable information on it!&lt;br /&gt;
* type `lsblk` into terminal again.&lt;br /&gt;
* Note that now tree of disks has one or more new entries - starting with mmcblk0 - that's partitions of your microSD card.&lt;br /&gt;
* Confirm that size of mmcblk0 is close to size of the microSD card, and all lines starting with mmcblk0 have empty &amp;quot;MOUNTPOINT&amp;quot; column.&lt;br /&gt;
* now type this:&lt;br /&gt;
  sudo dd if=`ls` of=/dev/mmcblk0 bs=1M status=progress&lt;br /&gt;
* It will take some time, depending on speed of your microSD card and size of image file&lt;br /&gt;
* Now, reboot your PineTab - type this into terminal:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
* PineTab should boot from the microSD you've just flashed&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Reset ===&lt;br /&gt;
&lt;br /&gt;
If your PineTab is in unknown state or doesn't want to start: Press power button for 7-8s. It makes a sound and you know it's totally off. 3 seconds after, power button  again for 2-3s and it will start to boot.&lt;br /&gt;
&lt;br /&gt;
=== Power Off While Charging ===&lt;br /&gt;
&lt;br /&gt;
When plugging your Pinetab into a charger, it automatically powers on. Use the above &amp;quot;Reset&amp;quot; instruction (holding the power button in for several seconds) to turn it off. This will allow your Pinetab to charge without being powered on. &lt;br /&gt;
&lt;br /&gt;
=== Display rotated 90° on Arch ARM ===&lt;br /&gt;
With the following command you can turn the display to landscape:&lt;br /&gt;
&lt;br /&gt;
* echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&lt;br /&gt;
&lt;br /&gt;
This command does not persist a reboot.&lt;br /&gt;
&lt;br /&gt;
=== Opening Pinetab ===&lt;br /&gt;
&lt;br /&gt;
Be very careful here. It is not a 'pop off' cover design. &lt;br /&gt;
Special care should be directed to AVOID anything that may appear to cause a &amp;quot;bend&amp;quot; in screen. &lt;br /&gt;
&lt;br /&gt;
Gently use fingernails (or if you have one, plastic pry), starting in the very middle location for each side (saving keyboard connector latch over area (bottom side) for the very last removal step).&lt;br /&gt;
&lt;br /&gt;
Work your way from the inner middle on each side, slowly. Slide gently towards the direction of each corner (saving the lifting of actual corners themselves for the second to last step)). Careful not to break thin speaker wires that line the outside of the inner case.&lt;br /&gt;
&lt;br /&gt;
The very last opening piece should be the &amp;quot;latch over&amp;quot; (where the keyboard pins connect).&lt;br /&gt;
&lt;br /&gt;
KEEP IN MIND: The main key here is to avoid any potential &amp;quot;bend&amp;quot; of the screen. We save the corners until after working on the middle of each side to reduce pressure on the screen.&lt;br /&gt;
&lt;br /&gt;
Do not force anything. If it is not coming off with gentle effort, you are likely doing something wrong (try another side middle).&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [https://pine64.com/product/pinetab-10-1-linux-tablet/ The PineTab on the Pine64 store]&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=140 The PineTab section of the Pine64 forums]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=11401 Comments on back cover removal on forums]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=13118 Demonstration Video: Pinetab back cover removal on forums]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTab]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12130</id>
		<title>PineTab</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12130"/>
		<updated>2021-12-31T00:10:36Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=IMPORTANT INFORMATION for '''Early Adopters''' - please [[PineTab/Early-Adopter|'''CLICK HERE''']] - some '''known issues''' are listed there}}&lt;br /&gt;
&lt;br /&gt;
The PineTab is a 10&amp;quot; tablet created by Pine64.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
* '''Dimensions:''' 11mm x 175mm x 260mm (Thickness, Width, Height)&lt;br /&gt;
* '''Weight:''' 575g (Tablet alone)&lt;br /&gt;
* '''Build:''' Plastic&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB of internal eMMC storage&lt;br /&gt;
** MicroSD slot, bootable&lt;br /&gt;
** M.2 SSD slot, supports SATA and USB devices only, not NVME (optional)&lt;br /&gt;
* '''Cameras:''' 2Mpx Front, 5Mpx Rear&lt;br /&gt;
* '''SOC:''' Allwinner A64 Quad Core&lt;br /&gt;
* '''CPU:''' 4x ARM A53 1.152GHz&lt;br /&gt;
* '''GPU:''' Mali 400 MP2&lt;br /&gt;
* '''RAM:''' 2GB LPDDR3&lt;br /&gt;
* '''I/O:''' HD Video Out (Mini HDMI), Micro USB 2.0 OTG, USB 2.0 A host, 3.5mm Headphone/Mic combo,&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** WiFi (802.11b/g/n, 2.4GHz only)&lt;br /&gt;
** Bluetooth 2.1&lt;br /&gt;
** M.2 LTE / Cell MODEM card, (optional, and takes place of optional M.2 SSD)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 10.1 inches (257mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1280x800, 16:10 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Attachments/Accessories:''' Magnetically attached keyboard (optional)&lt;br /&gt;
* '''Battery:''' 6000MAh (6Ah)&lt;br /&gt;
* '''Misc. features:''' &lt;br /&gt;
** Volume rocker&lt;br /&gt;
** Speakers and Microphone&lt;br /&gt;
** 2.5mm OD 0.7mm ID DC Jack Power (5V 2A) Port&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
'''Overview:''' The PineTab detachable keyboard features a full function row, FN key functionality, meta key (where the Windows key would be) and all of the keys you need for daily use.&lt;br /&gt;
&lt;br /&gt;
'''FN keys:''': Pause/play (F2), Stop (F3), Previous(F4), Next(F5), Music (F6), Mail (F7), Home (F8), Mute (F9), Vol- (F10), Vol+ (F11), Disable touchpad (F12), NumLock (Insert), Scroll Lock (Delete), PgUp (Up Arrow), PgDn (Down Arrow), Home (Left Arrow), End (Right Arrow), Digital Numpad (7,8,9,0,U,I,O,P,J,K,L,;,M,.,/)&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
* &amp;quot;pinetab-dev&amp;quot;: development version sent to ~100 developers. This one is like the Early Adopter version, but has a different display panel.&lt;br /&gt;
* [[PineTab/Early-Adopter|Early Adopter]]: the first hardware revision of the PineTab, which shipped to customers.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTabBoard.jpeg|400px|thumb|right|The insides of the PineTab]]&lt;br /&gt;
&lt;br /&gt;
== PineTab board information, schematics and certifications ==&lt;br /&gt;
* PineTab mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Schematic%20v1.2-20191125.pdf PineTab mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-top.pdf PineTab mainboard component placement ver 1.2 - Top View]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-bottom.pdf PineTab mainboard component placement ver 1.2 - Bottom View]&lt;br /&gt;
* PineTab keyboard schematic:&lt;br /&gt;
** PineTab keyboard and Pinebook (Pro) keyboard using same controller and from same engineering source&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/Pinetab%20HB092A%20Keyboard%20Schematic.pdf PineTab Keyboard Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/HB092_0884232458_Hynitron_PTP_20200514_662905_Linux_US_BackLight_CRC_175057F5.hex PineTab keyboard firmware code]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/SH68F83V2.0.pdf PineTab Keyboard Controller Datasheet]&lt;br /&gt;
&lt;br /&gt;
* PineTab certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20FCC-SDOC%20Certificate-S20060600404001.pdf PineTab FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20CE-RED%20Certificate-S20060600403.pdf PineTab CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PINETAB%20ROHS%20TEST%20REPORT.pdf PineTab ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 64GB SanDisk eMMC Datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271.pdf GOODiX GT9271 Capacitive Touch Controller datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271_Config_20200818_142030_V66.cfg PineTab GT9271 Capacitive Touch Controller configuration file]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
The PineTab will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distro (because the PineTab uses the mainline kernel), only few of them will actually be usable on Early Adopters PineTab, due to specifics of working with LCD panel. Among those listed all except for postmarketOS have working builds.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts ===&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
The UBPorts Ubuntu Touch is what was preinstalled on the PineTab Early Adopters batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can update itself in System Settings, and also a  jenkins daily build can be downloaded at this updated address for the latest daily image: &lt;br /&gt;
&lt;br /&gt;
https://ci.ubports.com/job/rootfs/job/rootfs-pinetab-systemimage/&lt;br /&gt;
&lt;br /&gt;
The last stable builds are also listed and appear to be updated every few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that as of 20th January the latest stable/release candidate and development builds  still lacked Bluetooth, Rotation and had the same issues with online accounts etc&lt;br /&gt;
&lt;br /&gt;
Online accounts access have a fix for Google accounts here https://github.com/rubencarneiro/account-plugins/releases&lt;br /&gt;
&lt;br /&gt;
There are however significant updates to the original pinetab image (without the issues above) &lt;br /&gt;
&lt;br /&gt;
The old image appears to be deprecated here&lt;br /&gt;
[https://ci.ubports.com/job/rootfs/job/rootfs-pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
In the event that WiFi fails to connect, the USB port can be used with an appropriate dongle to connect for internet using ethernet cable.&lt;br /&gt;
&lt;br /&gt;
=== postmarketOS ===&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
postmarketOS extends [https://www.alpinelinux.org/ Alpine Linux] to run on smartphones and other mobile devices.&lt;br /&gt;
&lt;br /&gt;
It offers various user interfaces (Phosh, Plasma Mobile, Sxmo, Plasma Desktop, Gnome 3, Kodi, XFCE4, ...). As of writing, official images are provided with Phosh and Plasma Mobile. The official images come in two flavors, either as demo image to try out postmarketOS, or with the installer.&lt;br /&gt;
&lt;br /&gt;
When using the installer images (recommended), it is possible to:&lt;br /&gt;
* encrypt your installation&lt;br /&gt;
* install from the SD card to eMMC&lt;br /&gt;
&lt;br /&gt;
Getting postmarketOS for the PineTab:&lt;br /&gt;
* [https://postmarketos.org/download/ Download page]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/PINE64_PineTab_(pine64-pinetab)#Installation Flashing instructions]&lt;br /&gt;
* Power users may also create their own image with the distribution's install and development tool &amp;lt;code&amp;gt;pmbootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
Arch Linux ARM with Phosh as the UI selection, maintained by the DanctNIX community. &lt;br /&gt;
&lt;br /&gt;
The latest image can be downloaded [https://github.com/dreemurrs-embedded/Pine64-Arch/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ARM ===&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
The PineTab &amp;quot;Early Adopter&amp;quot; edition is currently the only device supported by Manjaro ARM.&lt;br /&gt;
&lt;br /&gt;
Images with several different environments, including Phosh and Plasma, are available for the &amp;quot;Dev&amp;quot; pre-release can be downloaded [https://osdn.net/projects/manjaro-arm/storage/pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
Images for the Early Adopter version can be downloaded [https://github.com/manjaro-arm/pinetab-images/releases here].&lt;br /&gt;
Both Beta releases and weekly unstable builds for Phosh and Plasma Mobile can be found there.&lt;br /&gt;
&lt;br /&gt;
=== Mobian ===&lt;br /&gt;
[[File:Debian-logo.png|100px]]&lt;br /&gt;
Mobian is a project providing Debian images for mobile devices. &lt;br /&gt;
&lt;br /&gt;
PineTab images can be downloaded [https://images.mobian-project.org/pinetab/ here]. Password is '''1234'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sailfish OS ===&lt;br /&gt;
&lt;br /&gt;
[[File:SailfishOS logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
You can get SailfishOS on your with the flash-it script, which will write an image on a SD card. https://github.com/sailfish-on-dontbeevil/flash-it&lt;br /&gt;
&lt;br /&gt;
There is a forum discussion with further information.&lt;br /&gt;
&lt;br /&gt;
http://forum.pine64.org/showthread.php?tid=11850&lt;br /&gt;
&lt;br /&gt;
Many things are still broken but Bluetooth, Audio, Rotation and Keyboard are working.&lt;br /&gt;
&lt;br /&gt;
== Installation instructions ==&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or microSD card see [[PinePhone Installation Instructions]]. The information is almost the same for the PineTab, as it is a very similar device. Do not try to use the PinePhone images though, use the PineTab images linked above.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
To test an OS, just flash its image onto an microSD card, plug it into PineTab, and reboot.&lt;br /&gt;
Note that USB stick won't work.&lt;br /&gt;
Also note that you need to &amp;quot;flash&amp;quot;, not just copy the file onto the card.&lt;br /&gt;
Also remember that you need to unpack image file if it's packed!&lt;br /&gt;
&lt;br /&gt;
You can do it using Ubuntu Touch installed on the PineTab! For now, only Mobian is supported by the guide below.&lt;br /&gt;
&lt;br /&gt;
* First, make sure you have enough free disk space and empty Downloads directory on the PineTab (while not strictly necessary, empty Downloads dir will simplify your typing. You can just move all files from there to another directory).&lt;br /&gt;
* Turn off Sleep when idle in the settings. Settings &amp;gt; Battery &amp;gt; Sleep when idle: Never&lt;br /&gt;
* Go to the Mobian link above and download compressed image (the one ending with .img.gz) - usual recommendation is to download latest, i.e. lowest one.&lt;br /&gt;
* Open terminal and type this in it:&lt;br /&gt;
  cd Downloads&lt;br /&gt;
  ls&lt;br /&gt;
* It should show you the name of the file you've just downloaded&lt;br /&gt;
* This file is compressed, so first you need to uncompress it. Type this into terminal:&lt;br /&gt;
  gunzip *.gz &amp;amp;&amp;amp; echo done&lt;br /&gt;
* This command will take some time (you won't see any progress until it's done). It either will succeed (and print &amp;quot;done&amp;quot;) and fail (and print why).&lt;br /&gt;
* Now, let's have a look at disks. Type this into terminal:&lt;br /&gt;
  lsblk&lt;br /&gt;
* It should show you a tree of disks and their partitions. If you don't have microSD card inserted yet, all of them begin with mmcblk2. Also, some of them have something in the &amp;quot;MOUNTPOINT&amp;quot; column&lt;br /&gt;
* Insert microSD card into PineTab. Note that all information on it will be deleted, so don't insert one with valuable information on it!&lt;br /&gt;
* type `lsblk` into terminal again.&lt;br /&gt;
* Note that now tree of disks has one or more new entries - starting with mmcblk0 - that's partitions of your microSD card.&lt;br /&gt;
* Confirm that size of mmcblk0 is close to size of the microSD card, and all lines starting with mmcblk0 have empty &amp;quot;MOUNTPOINT&amp;quot; column.&lt;br /&gt;
* now type this:&lt;br /&gt;
  sudo dd if=`ls` of=/dev/mmcblk0 bs=1M status=progress&lt;br /&gt;
* It will take some time, depending on speed of your microSD card and size of image file&lt;br /&gt;
* Now, reboot your PineTab - type this into terminal:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
* PineTab should boot from the microSD you've just flashed&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Reset ===&lt;br /&gt;
&lt;br /&gt;
If your PineTab is in unknown state or doesn't want to start: Press power button for 7-8s. It makes a sound and you know it's totally off. 3 seconds after, power button  again for 2-3s and it will start to boot.&lt;br /&gt;
&lt;br /&gt;
=== Power Off While Charging ===&lt;br /&gt;
&lt;br /&gt;
When plugging your Pinetab into a charger, it automatically powers on. Use the above &amp;quot;Reset&amp;quot; instruction (holding the power button in for several seconds) to turn it off. This will allow your Pinetab to charge without being powered on. &lt;br /&gt;
&lt;br /&gt;
=== Display rotated 90° on Arch ARM ===&lt;br /&gt;
With the following command you can turn the display to landscape:&lt;br /&gt;
&lt;br /&gt;
* echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&lt;br /&gt;
&lt;br /&gt;
This command does not persist a reboot.&lt;br /&gt;
&lt;br /&gt;
=== Opening Pinetab ===&lt;br /&gt;
&lt;br /&gt;
Be very careful here. It is not a 'pop off' cover design. &lt;br /&gt;
Special care should be directed to AVOID anything that may appear to cause a &amp;quot;bend&amp;quot; in screen. &lt;br /&gt;
&lt;br /&gt;
Gently use fingernails (or if you have one, plastic pry), starting in the very middle location for each side (saving keyboard connector latch over area (bottom side) for the very last removal step).&lt;br /&gt;
&lt;br /&gt;
Work your way from the inner middle on each side, slowly. Slide gently towards the direction of each corner (saving the lifting of actual corners themselves for the second to last step)). &lt;br /&gt;
&lt;br /&gt;
The very last opening piece should be the &amp;quot;latch over&amp;quot; (where the keyboard pins connect).&lt;br /&gt;
&lt;br /&gt;
KEEP IN MIND: The main key here is to avoid any potential &amp;quot;bend&amp;quot; of the screen. We save the corners until after working on the middle of each side to reduce pressure on the screen.&lt;br /&gt;
&lt;br /&gt;
Do not force anything. If it is not coming off with gentle effort, you are likely doing something wrong (try another side middle).&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [https://pine64.com/product/pinetab-10-1-linux-tablet/ The PineTab on the Pine64 store]&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=140 The PineTab section of the Pine64 forums]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=11401 Comments on back cover removal on forums]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=13118 Demonstration Video: Pinetab back cover removal on forums]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTab]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12129</id>
		<title>PineTab</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12129"/>
		<updated>2021-12-31T00:04:27Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Opening Pinetab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=IMPORTANT INFORMATION for '''Early Adopters''' - please [[PineTab/Early-Adopter|'''CLICK HERE''']] - some '''known issues''' are listed there}}&lt;br /&gt;
&lt;br /&gt;
The PineTab is a 10&amp;quot; tablet created by Pine64.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
* '''Dimensions:''' 11mm x 175mm x 260mm (Thickness, Width, Height)&lt;br /&gt;
* '''Weight:''' 575g (Tablet alone)&lt;br /&gt;
* '''Build:''' Plastic&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB of internal eMMC storage&lt;br /&gt;
** MicroSD slot, bootable&lt;br /&gt;
** M.2 SSD slot, supports SATA and USB devices only, not NVME (optional)&lt;br /&gt;
* '''Cameras:''' 2Mpx Front, 5Mpx Rear&lt;br /&gt;
* '''SOC:''' Allwinner A64 Quad Core&lt;br /&gt;
* '''CPU:''' 4x ARM A53 1.152GHz&lt;br /&gt;
* '''GPU:''' Mali 400 MP2&lt;br /&gt;
* '''RAM:''' 2GB LPDDR3&lt;br /&gt;
* '''I/O:''' HD Video Out (Mini HDMI), Micro USB 2.0 OTG, USB 2.0 A host, 3.5mm Headphone/Mic combo,&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** WiFi (802.11b/g/n, 2.4GHz only)&lt;br /&gt;
** Bluetooth 2.1&lt;br /&gt;
** M.2 LTE / Cell MODEM card, (optional, and takes place of optional M.2 SSD)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 10.1 inches (257mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1280x800, 16:10 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Attachments/Accessories:''' Magnetically attached keyboard (optional)&lt;br /&gt;
* '''Battery:''' 6000MAh (6Ah)&lt;br /&gt;
* '''Misc. features:''' &lt;br /&gt;
** Volume rocker&lt;br /&gt;
** Speakers and Microphone&lt;br /&gt;
** 2.5mm OD 0.7mm ID DC Jack Power (5V 2A) Port&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
'''Overview:''' The PineTab detachable keyboard features a full function row, FN key functionality, meta key (where the Windows key would be) and all of the keys you need for daily use.&lt;br /&gt;
&lt;br /&gt;
'''FN keys:''': Pause/play (F2), Stop (F3), Previous(F4), Next(F5), Music (F6), Mail (F7), Home (F8), Mute (F9), Vol- (F10), Vol+ (F11), Disable touchpad (F12), NumLock (Insert), Scroll Lock (Delete), PgUp (Up Arrow), PgDn (Down Arrow), Home (Left Arrow), End (Right Arrow), Digital Numpad (7,8,9,0,U,I,O,P,J,K,L,;,M,.,/)&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
* &amp;quot;pinetab-dev&amp;quot;: development version sent to ~100 developers. This one is like the Early Adopter version, but has a different display panel.&lt;br /&gt;
* [[PineTab/Early-Adopter|Early Adopter]]: the first hardware revision of the PineTab, which shipped to customers.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTabBoard.jpeg|400px|thumb|right|The insides of the PineTab]]&lt;br /&gt;
&lt;br /&gt;
== PineTab board information, schematics and certifications ==&lt;br /&gt;
* PineTab mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Schematic%20v1.2-20191125.pdf PineTab mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-top.pdf PineTab mainboard component placement ver 1.2 - Top View]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-bottom.pdf PineTab mainboard component placement ver 1.2 - Bottom View]&lt;br /&gt;
* PineTab keyboard schematic:&lt;br /&gt;
** PineTab keyboard and Pinebook (Pro) keyboard using same controller and from same engineering source&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/Pinetab%20HB092A%20Keyboard%20Schematic.pdf PineTab Keyboard Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/HB092_0884232458_Hynitron_PTP_20200514_662905_Linux_US_BackLight_CRC_175057F5.hex PineTab keyboard firmware code]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/SH68F83V2.0.pdf PineTab Keyboard Controller Datasheet]&lt;br /&gt;
&lt;br /&gt;
* PineTab certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20FCC-SDOC%20Certificate-S20060600404001.pdf PineTab FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20CE-RED%20Certificate-S20060600403.pdf PineTab CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PINETAB%20ROHS%20TEST%20REPORT.pdf PineTab ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 64GB SanDisk eMMC Datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271.pdf GOODiX GT9271 Capacitive Touch Controller datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271_Config_20200818_142030_V66.cfg PineTab GT9271 Capacitive Touch Controller configuration file]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
The PineTab will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distro (because the PineTab uses the mainline kernel), only few of them will actually be usable on Early Adopters PineTab, due to specifics of working with LCD panel. Among those listed all except for postmarketOS have working builds.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts ===&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
The UBPorts Ubuntu Touch is what was preinstalled on the PineTab Early Adopters batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can update itself in System Settings, and also a  jenkins daily build can be downloaded at this updated address for the latest daily image: &lt;br /&gt;
&lt;br /&gt;
https://ci.ubports.com/job/rootfs/job/rootfs-pinetab-systemimage/&lt;br /&gt;
&lt;br /&gt;
The last stable builds are also listed and appear to be updated every few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that as of 20th January the latest stable/release candidate and development builds  still lacked Bluetooth, Rotation and had the same issues with online accounts etc&lt;br /&gt;
&lt;br /&gt;
Online accounts access have a fix for Google accounts here https://github.com/rubencarneiro/account-plugins/releases&lt;br /&gt;
&lt;br /&gt;
There are however significant updates to the original pinetab image (without the issues above) &lt;br /&gt;
&lt;br /&gt;
The old image appears to be deprecated here&lt;br /&gt;
[https://ci.ubports.com/job/rootfs/job/rootfs-pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
In the event that WiFi fails to connect, the USB port can be used with an appropriate dongle to connect for internet using ethernet cable.&lt;br /&gt;
&lt;br /&gt;
=== postmarketOS ===&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
postmarketOS extends [https://www.alpinelinux.org/ Alpine Linux] to run on smartphones and other mobile devices.&lt;br /&gt;
&lt;br /&gt;
It offers various user interfaces (Phosh, Plasma Mobile, Sxmo, Plasma Desktop, Gnome 3, Kodi, XFCE4, ...). As of writing, official images are provided with Phosh and Plasma Mobile. The official images come in two flavors, either as demo image to try out postmarketOS, or with the installer.&lt;br /&gt;
&lt;br /&gt;
When using the installer images (recommended), it is possible to:&lt;br /&gt;
* encrypt your installation&lt;br /&gt;
* install from the SD card to eMMC&lt;br /&gt;
&lt;br /&gt;
Getting postmarketOS for the PineTab:&lt;br /&gt;
* [https://postmarketos.org/download/ Download page]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/PINE64_PineTab_(pine64-pinetab)#Installation Flashing instructions]&lt;br /&gt;
* Power users may also create their own image with the distribution's install and development tool &amp;lt;code&amp;gt;pmbootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
Arch Linux ARM with Phosh as the UI selection, maintained by the DanctNIX community. &lt;br /&gt;
&lt;br /&gt;
The latest image can be downloaded [https://github.com/dreemurrs-embedded/Pine64-Arch/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ARM ===&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
The PineTab &amp;quot;Early Adopter&amp;quot; edition is currently the only device supported by Manjaro ARM.&lt;br /&gt;
&lt;br /&gt;
Images with several different environments, including Phosh and Plasma, are available for the &amp;quot;Dev&amp;quot; pre-release can be downloaded [https://osdn.net/projects/manjaro-arm/storage/pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
Images for the Early Adopter version can be downloaded [https://github.com/manjaro-arm/pinetab-images/releases here].&lt;br /&gt;
Both Beta releases and weekly unstable builds for Phosh and Plasma Mobile can be found there.&lt;br /&gt;
&lt;br /&gt;
=== Mobian ===&lt;br /&gt;
[[File:Debian-logo.png|100px]]&lt;br /&gt;
Mobian is a project providing Debian images for mobile devices. &lt;br /&gt;
&lt;br /&gt;
PineTab images can be downloaded [https://images.mobian-project.org/pinetab/ here]. Password is '''1234'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sailfish OS ===&lt;br /&gt;
&lt;br /&gt;
[[File:SailfishOS logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
You can get SailfishOS on your with the flash-it script, which will write an image on a SD card. https://github.com/sailfish-on-dontbeevil/flash-it&lt;br /&gt;
&lt;br /&gt;
There is a forum discussion with further information.&lt;br /&gt;
&lt;br /&gt;
http://forum.pine64.org/showthread.php?tid=11850&lt;br /&gt;
&lt;br /&gt;
Many things are still broken but Bluetooth, Audio, Rotation and Keyboard are working.&lt;br /&gt;
&lt;br /&gt;
== Installation instructions ==&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or microSD card see [[PinePhone Installation Instructions]]. The information is almost the same for the PineTab, as it is a very similar device. Do not try to use the PinePhone images though, use the PineTab images linked above.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
To test an OS, just flash its image onto an microSD card, plug it into PineTab, and reboot.&lt;br /&gt;
Note that USB stick won't work.&lt;br /&gt;
Also note that you need to &amp;quot;flash&amp;quot;, not just copy the file onto the card.&lt;br /&gt;
Also remember that you need to unpack image file if it's packed!&lt;br /&gt;
&lt;br /&gt;
You can do it using Ubuntu Touch installed on the PineTab! For now, only Mobian is supported by the guide below.&lt;br /&gt;
&lt;br /&gt;
* First, make sure you have enough free disk space and empty Downloads directory on the PineTab (while not strictly necessary, empty Downloads dir will simplify your typing. You can just move all files from there to another directory).&lt;br /&gt;
* Turn off Sleep when idle in the settings. Settings &amp;gt; Battery &amp;gt; Sleep when idle: Never&lt;br /&gt;
* Go to the Mobian link above and download compressed image (the one ending with .img.gz) - usual recommendation is to download latest, i.e. lowest one.&lt;br /&gt;
* Open terminal and type this in it:&lt;br /&gt;
  cd Downloads&lt;br /&gt;
  ls&lt;br /&gt;
* It should show you the name of the file you've just downloaded&lt;br /&gt;
* This file is compressed, so first you need to uncompress it. Type this into terminal:&lt;br /&gt;
  gunzip *.gz &amp;amp;&amp;amp; echo done&lt;br /&gt;
* This command will take some time (you won't see any progress until it's done). It either will succeed (and print &amp;quot;done&amp;quot;) and fail (and print why).&lt;br /&gt;
* Now, let's have a look at disks. Type this into terminal:&lt;br /&gt;
  lsblk&lt;br /&gt;
* It should show you a tree of disks and their partitions. If you don't have microSD card inserted yet, all of them begin with mmcblk2. Also, some of them have something in the &amp;quot;MOUNTPOINT&amp;quot; column&lt;br /&gt;
* Insert microSD card into PineTab. Note that all information on it will be deleted, so don't insert one with valuable information on it!&lt;br /&gt;
* type `lsblk` into terminal again.&lt;br /&gt;
* Note that now tree of disks has one or more new entries - starting with mmcblk0 - that's partitions of your microSD card.&lt;br /&gt;
* Confirm that size of mmcblk0 is close to size of the microSD card, and all lines starting with mmcblk0 have empty &amp;quot;MOUNTPOINT&amp;quot; column.&lt;br /&gt;
* now type this:&lt;br /&gt;
  sudo dd if=`ls` of=/dev/mmcblk0 bs=1M status=progress&lt;br /&gt;
* It will take some time, depending on speed of your microSD card and size of image file&lt;br /&gt;
* Now, reboot your PineTab - type this into terminal:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
* PineTab should boot from the microSD you've just flashed&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Reset ===&lt;br /&gt;
&lt;br /&gt;
If your PineTab is in unknown state or doesn't want to start: Press power button for 7-8s. It makes a sound and you know it's totally off. 3 seconds after, power button  again for 2-3s and it will start to boot.&lt;br /&gt;
&lt;br /&gt;
=== Power Off While Charging ===&lt;br /&gt;
&lt;br /&gt;
When plugging your Pinetab into a charger, it automatically powers on. Use the above &amp;quot;Reset&amp;quot; instruction (holding the power button in for several seconds) to turn it off. This will allow your Pinetab to charge without being powered on. &lt;br /&gt;
&lt;br /&gt;
=== Display rotated 90° on Arch ARM ===&lt;br /&gt;
With the following command you can turn the display to landscape:&lt;br /&gt;
&lt;br /&gt;
* echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&lt;br /&gt;
&lt;br /&gt;
This command does not persist a reboot.&lt;br /&gt;
&lt;br /&gt;
=== Opening Pinetab ===&lt;br /&gt;
&lt;br /&gt;
Be very careful here. It is not a 'pop off' cover design. &lt;br /&gt;
Special care should be directed to AVOID anything that may appear to cause a &amp;quot;bend&amp;quot; in screen. &lt;br /&gt;
&lt;br /&gt;
Gently use fingernails (or if you have one, plastic pry), starting in the very middle location for each side (saving keyboard connector latch over area (bottom side) for the very last removal step).&lt;br /&gt;
&lt;br /&gt;
Work your way from the inner middle on each side, slowly. Slide gently towards the direction of each corner (saving the lifting of actual corners themselves for the second to last step)). &lt;br /&gt;
&lt;br /&gt;
The very last opening piece should be the &amp;quot;latch over&amp;quot; (where the keyboard pins connect).&lt;br /&gt;
&lt;br /&gt;
KEEP IN MIND: The main key here is to avoid any potential &amp;quot;bend&amp;quot; of the screen. We save the corners until after working on the middle of each side to reduce pressure on the screen.&lt;br /&gt;
&lt;br /&gt;
Do not force anything. If it is not coming off with gentle effort, you are likely doing something wrong (try another side middle).&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [https://pine64.com/product/pinetab-10-1-linux-tablet/ The PineTab on the Pine64 store]&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=140 The PineTab section of the Pine64 forums]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTab]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12128</id>
		<title>PineTab</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab&amp;diff=12128"/>
		<updated>2021-12-30T23:45:54Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Tips and tricks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=IMPORTANT INFORMATION for '''Early Adopters''' - please [[PineTab/Early-Adopter|'''CLICK HERE''']] - some '''known issues''' are listed there}}&lt;br /&gt;
&lt;br /&gt;
The PineTab is a 10&amp;quot; tablet created by Pine64.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
* '''Dimensions:''' 11mm x 175mm x 260mm (Thickness, Width, Height)&lt;br /&gt;
* '''Weight:''' 575g (Tablet alone)&lt;br /&gt;
* '''Build:''' Plastic&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB of internal eMMC storage&lt;br /&gt;
** MicroSD slot, bootable&lt;br /&gt;
** M.2 SSD slot, supports SATA and USB devices only, not NVME (optional)&lt;br /&gt;
* '''Cameras:''' 2Mpx Front, 5Mpx Rear&lt;br /&gt;
* '''SOC:''' Allwinner A64 Quad Core&lt;br /&gt;
* '''CPU:''' 4x ARM A53 1.152GHz&lt;br /&gt;
* '''GPU:''' Mali 400 MP2&lt;br /&gt;
* '''RAM:''' 2GB LPDDR3&lt;br /&gt;
* '''I/O:''' HD Video Out (Mini HDMI), Micro USB 2.0 OTG, USB 2.0 A host, 3.5mm Headphone/Mic combo,&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** WiFi (802.11b/g/n, 2.4GHz only)&lt;br /&gt;
** Bluetooth 2.1&lt;br /&gt;
** M.2 LTE / Cell MODEM card, (optional, and takes place of optional M.2 SSD)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 10.1 inches (257mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1280x800, 16:10 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Attachments/Accessories:''' Magnetically attached keyboard (optional)&lt;br /&gt;
* '''Battery:''' 6000MAh (6Ah)&lt;br /&gt;
* '''Misc. features:''' &lt;br /&gt;
** Volume rocker&lt;br /&gt;
** Speakers and Microphone&lt;br /&gt;
** 2.5mm OD 0.7mm ID DC Jack Power (5V 2A) Port&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
'''Overview:''' The PineTab detachable keyboard features a full function row, FN key functionality, meta key (where the Windows key would be) and all of the keys you need for daily use.&lt;br /&gt;
&lt;br /&gt;
'''FN keys:''': Pause/play (F2), Stop (F3), Previous(F4), Next(F5), Music (F6), Mail (F7), Home (F8), Mute (F9), Vol- (F10), Vol+ (F11), Disable touchpad (F12), NumLock (Insert), Scroll Lock (Delete), PgUp (Up Arrow), PgDn (Down Arrow), Home (Left Arrow), End (Right Arrow), Digital Numpad (7,8,9,0,U,I,O,P,J,K,L,;,M,.,/)&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
* &amp;quot;pinetab-dev&amp;quot;: development version sent to ~100 developers. This one is like the Early Adopter version, but has a different display panel.&lt;br /&gt;
* [[PineTab/Early-Adopter|Early Adopter]]: the first hardware revision of the PineTab, which shipped to customers.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTabBoard.jpeg|400px|thumb|right|The insides of the PineTab]]&lt;br /&gt;
&lt;br /&gt;
== PineTab board information, schematics and certifications ==&lt;br /&gt;
* PineTab mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Schematic%20v1.2-20191125.pdf PineTab mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-top.pdf PineTab mainboard component placement ver 1.2 - Top View]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-bottom.pdf PineTab mainboard component placement ver 1.2 - Bottom View]&lt;br /&gt;
* PineTab keyboard schematic:&lt;br /&gt;
** PineTab keyboard and Pinebook (Pro) keyboard using same controller and from same engineering source&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/Pinetab%20HB092A%20Keyboard%20Schematic.pdf PineTab Keyboard Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/HB092_0884232458_Hynitron_PTP_20200514_662905_Linux_US_BackLight_CRC_175057F5.hex PineTab keyboard firmware code]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/SH68F83V2.0.pdf PineTab Keyboard Controller Datasheet]&lt;br /&gt;
&lt;br /&gt;
* PineTab certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20FCC-SDOC%20Certificate-S20060600404001.pdf PineTab FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20CE-RED%20Certificate-S20060600403.pdf PineTab CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PINETAB%20ROHS%20TEST%20REPORT.pdf PineTab ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 64GB SanDisk eMMC Datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271.pdf GOODiX GT9271 Capacitive Touch Controller datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271_Config_20200818_142030_V66.cfg PineTab GT9271 Capacitive Touch Controller configuration file]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
The PineTab will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distro (because the PineTab uses the mainline kernel), only few of them will actually be usable on Early Adopters PineTab, due to specifics of working with LCD panel. Among those listed all except for postmarketOS have working builds.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts ===&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
The UBPorts Ubuntu Touch is what was preinstalled on the PineTab Early Adopters batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can update itself in System Settings, and also a  jenkins daily build can be downloaded at this updated address for the latest daily image: &lt;br /&gt;
&lt;br /&gt;
https://ci.ubports.com/job/rootfs/job/rootfs-pinetab-systemimage/&lt;br /&gt;
&lt;br /&gt;
The last stable builds are also listed and appear to be updated every few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that as of 20th January the latest stable/release candidate and development builds  still lacked Bluetooth, Rotation and had the same issues with online accounts etc&lt;br /&gt;
&lt;br /&gt;
Online accounts access have a fix for Google accounts here https://github.com/rubencarneiro/account-plugins/releases&lt;br /&gt;
&lt;br /&gt;
There are however significant updates to the original pinetab image (without the issues above) &lt;br /&gt;
&lt;br /&gt;
The old image appears to be deprecated here&lt;br /&gt;
[https://ci.ubports.com/job/rootfs/job/rootfs-pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
In the event that WiFi fails to connect, the USB port can be used with an appropriate dongle to connect for internet using ethernet cable.&lt;br /&gt;
&lt;br /&gt;
=== postmarketOS ===&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
postmarketOS extends [https://www.alpinelinux.org/ Alpine Linux] to run on smartphones and other mobile devices.&lt;br /&gt;
&lt;br /&gt;
It offers various user interfaces (Phosh, Plasma Mobile, Sxmo, Plasma Desktop, Gnome 3, Kodi, XFCE4, ...). As of writing, official images are provided with Phosh and Plasma Mobile. The official images come in two flavors, either as demo image to try out postmarketOS, or with the installer.&lt;br /&gt;
&lt;br /&gt;
When using the installer images (recommended), it is possible to:&lt;br /&gt;
* encrypt your installation&lt;br /&gt;
* install from the SD card to eMMC&lt;br /&gt;
&lt;br /&gt;
Getting postmarketOS for the PineTab:&lt;br /&gt;
* [https://postmarketos.org/download/ Download page]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/PINE64_PineTab_(pine64-pinetab)#Installation Flashing instructions]&lt;br /&gt;
* Power users may also create their own image with the distribution's install and development tool &amp;lt;code&amp;gt;pmbootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
Arch Linux ARM with Phosh as the UI selection, maintained by the DanctNIX community. &lt;br /&gt;
&lt;br /&gt;
The latest image can be downloaded [https://github.com/dreemurrs-embedded/Pine64-Arch/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ARM ===&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
The PineTab &amp;quot;Early Adopter&amp;quot; edition is currently the only device supported by Manjaro ARM.&lt;br /&gt;
&lt;br /&gt;
Images with several different environments, including Phosh and Plasma, are available for the &amp;quot;Dev&amp;quot; pre-release can be downloaded [https://osdn.net/projects/manjaro-arm/storage/pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
Images for the Early Adopter version can be downloaded [https://github.com/manjaro-arm/pinetab-images/releases here].&lt;br /&gt;
Both Beta releases and weekly unstable builds for Phosh and Plasma Mobile can be found there.&lt;br /&gt;
&lt;br /&gt;
=== Mobian ===&lt;br /&gt;
[[File:Debian-logo.png|100px]]&lt;br /&gt;
Mobian is a project providing Debian images for mobile devices. &lt;br /&gt;
&lt;br /&gt;
PineTab images can be downloaded [https://images.mobian-project.org/pinetab/ here]. Password is '''1234'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sailfish OS ===&lt;br /&gt;
&lt;br /&gt;
[[File:SailfishOS logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
You can get SailfishOS on your with the flash-it script, which will write an image on a SD card. https://github.com/sailfish-on-dontbeevil/flash-it&lt;br /&gt;
&lt;br /&gt;
There is a forum discussion with further information.&lt;br /&gt;
&lt;br /&gt;
http://forum.pine64.org/showthread.php?tid=11850&lt;br /&gt;
&lt;br /&gt;
Many things are still broken but Bluetooth, Audio, Rotation and Keyboard are working.&lt;br /&gt;
&lt;br /&gt;
== Installation instructions ==&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or microSD card see [[PinePhone Installation Instructions]]. The information is almost the same for the PineTab, as it is a very similar device. Do not try to use the PinePhone images though, use the PineTab images linked above.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
To test an OS, just flash its image onto an microSD card, plug it into PineTab, and reboot.&lt;br /&gt;
Note that USB stick won't work.&lt;br /&gt;
Also note that you need to &amp;quot;flash&amp;quot;, not just copy the file onto the card.&lt;br /&gt;
Also remember that you need to unpack image file if it's packed!&lt;br /&gt;
&lt;br /&gt;
You can do it using Ubuntu Touch installed on the PineTab! For now, only Mobian is supported by the guide below.&lt;br /&gt;
&lt;br /&gt;
* First, make sure you have enough free disk space and empty Downloads directory on the PineTab (while not strictly necessary, empty Downloads dir will simplify your typing. You can just move all files from there to another directory).&lt;br /&gt;
* Turn off Sleep when idle in the settings. Settings &amp;gt; Battery &amp;gt; Sleep when idle: Never&lt;br /&gt;
* Go to the Mobian link above and download compressed image (the one ending with .img.gz) - usual recommendation is to download latest, i.e. lowest one.&lt;br /&gt;
* Open terminal and type this in it:&lt;br /&gt;
  cd Downloads&lt;br /&gt;
  ls&lt;br /&gt;
* It should show you the name of the file you've just downloaded&lt;br /&gt;
* This file is compressed, so first you need to uncompress it. Type this into terminal:&lt;br /&gt;
  gunzip *.gz &amp;amp;&amp;amp; echo done&lt;br /&gt;
* This command will take some time (you won't see any progress until it's done). It either will succeed (and print &amp;quot;done&amp;quot;) and fail (and print why).&lt;br /&gt;
* Now, let's have a look at disks. Type this into terminal:&lt;br /&gt;
  lsblk&lt;br /&gt;
* It should show you a tree of disks and their partitions. If you don't have microSD card inserted yet, all of them begin with mmcblk2. Also, some of them have something in the &amp;quot;MOUNTPOINT&amp;quot; column&lt;br /&gt;
* Insert microSD card into PineTab. Note that all information on it will be deleted, so don't insert one with valuable information on it!&lt;br /&gt;
* type `lsblk` into terminal again.&lt;br /&gt;
* Note that now tree of disks has one or more new entries - starting with mmcblk0 - that's partitions of your microSD card.&lt;br /&gt;
* Confirm that size of mmcblk0 is close to size of the microSD card, and all lines starting with mmcblk0 have empty &amp;quot;MOUNTPOINT&amp;quot; column.&lt;br /&gt;
* now type this:&lt;br /&gt;
  sudo dd if=`ls` of=/dev/mmcblk0 bs=1M status=progress&lt;br /&gt;
* It will take some time, depending on speed of your microSD card and size of image file&lt;br /&gt;
* Now, reboot your PineTab - type this into terminal:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
* PineTab should boot from the microSD you've just flashed&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Reset ===&lt;br /&gt;
&lt;br /&gt;
If your PineTab is in unknown state or doesn't want to start: Press power button for 7-8s. It makes a sound and you know it's totally off. 3 seconds after, power button  again for 2-3s and it will start to boot.&lt;br /&gt;
&lt;br /&gt;
=== Power Off While Charging ===&lt;br /&gt;
&lt;br /&gt;
When plugging your Pinetab into a charger, it automatically powers on. Use the above &amp;quot;Reset&amp;quot; instruction (holding the power button in for several seconds) to turn it off. This will allow your Pinetab to charge without being powered on. &lt;br /&gt;
&lt;br /&gt;
=== Display rotated 90° on Arch ARM ===&lt;br /&gt;
With the following command you can turn the display to landscape:&lt;br /&gt;
&lt;br /&gt;
* echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&lt;br /&gt;
&lt;br /&gt;
This command does not persist a reboot.&lt;br /&gt;
&lt;br /&gt;
=== Opening Pinetab ===&lt;br /&gt;
&lt;br /&gt;
Be very careful here. It is not a 'pop off' cover design.&lt;br /&gt;
&lt;br /&gt;
Gently use fingernails, or (if you have one) a plastic pry, starting in the very middle of each side (saving keyboard connector area (bottom side) for last).&lt;br /&gt;
&lt;br /&gt;
Work your way from middle of each side, slowly towards the corners (saving actual corners themselves for the second to last)). The very last opening should be the &amp;quot;latch over&amp;quot; where the keyboard connects pins.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [https://pine64.com/product/pinetab-10-1-linux-tablet/ The PineTab on the Pine64 store]&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=140 The PineTab section of the Pine64 forums]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTab]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=11523</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=11523"/>
		<updated>2021-09-29T04:29:07Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{under construction}}&lt;br /&gt;
&lt;br /&gt;
The '''Pinedio''' is a device utilizing LoRa. LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
'''Default Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: root&lt;br /&gt;
 password: 1234&lt;br /&gt;
&lt;br /&gt;
After your first login you will be guided through creating your user account (create a strong password).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
== USB adapter ==&lt;br /&gt;
[[File:Pine64-lora-usb-adapter.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
The Pine64 USB LoRa adapter is based on the Semtech SX1262 LoRa module and the CH341 USB bus converter chip. The '''CH341''' chip can be configured in multiple mode to convert USB to various serial and parallel ports. In this case, it's configured in '''synchronous serial mode''', which allows this chip to convert from USB to the SPI bus needed to talk to the SX1262 LoRa module:&lt;br /&gt;
&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
 |      |            |   USB LoRa Adapter     |&lt;br /&gt;
 | PC   |  &amp;lt;--USB--&amp;gt; | CH341 &amp;lt;--SPI--&amp;gt; SX1262 |&lt;br /&gt;
 |      |            |       &amp;lt;--I/O--&amp;gt;        |&lt;br /&gt;
 --------            --------------------------&lt;br /&gt;
&lt;br /&gt;
=== Pins ===&lt;br /&gt;
[[File:Lora-usb-pins.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!SX1262 Pin&lt;br /&gt;
!Name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|ANT&lt;br /&gt;
|Antenna&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|GND2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|VREG&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|DCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|VCC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|DIO1&lt;br /&gt;
|Connected on CH341 Pin 7&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|DIO2&lt;br /&gt;
|Connected on CH341 Pin6&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|DIO3&lt;br /&gt;
|Connected on CH341 Pin 5&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|MISO&lt;br /&gt;
|SPI MISO&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|MOSI&lt;br /&gt;
|SPI MOSI&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|SCK&lt;br /&gt;
|SPI clock&lt;br /&gt;
|- &lt;br /&gt;
|13&lt;br /&gt;
|NSS&lt;br /&gt;
|SPI Chip select&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|POR&lt;br /&gt;
|Reset pin&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Busy&lt;br /&gt;
|Busy pin&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|GND&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Kernel module for CH341 === &lt;br /&gt;
We need a driver for the CH341 USB bus converter chip. This driver will allow us to send command to the CH341 (SPI messages and access to the GPIOs). I've succesfuly build and run [https://github.com/rogerjames99/spi-ch341-usb this driver from '''rogerjames99'''] on my desktop computer (running Manjaro Linux) and on my Pinebook Pro (ARM64, running Manjaro ARM Linux).&lt;br /&gt;
&lt;br /&gt;
 $ git clone https://github.com/rogerjames99/spi-ch341-usb.git&lt;br /&gt;
 $ cd spi-ch341-usb&lt;br /&gt;
 $ make&lt;br /&gt;
 $ sudo make install&lt;br /&gt;
&lt;br /&gt;
Once the driver is installed, unload the module ''ch341'' if it has been automatically loaded:&lt;br /&gt;
&lt;br /&gt;
 $ lsmod |grep ch341&lt;br /&gt;
 $ sudo rmmod ch341&lt;br /&gt;
&lt;br /&gt;
On my setup, ''ch341'' would be automatically loaded once I connected my USB adapter. This module drives the CH341 is asynchronous serial mode, which will not work for a SPI bus. &lt;br /&gt;
&lt;br /&gt;
Then load the new module:&lt;br /&gt;
&lt;br /&gt;
 $ sudo modprobe spi-ch341-usb&lt;br /&gt;
&lt;br /&gt;
Plug your USB adapter and check that the module is correctly loaded : &lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
 [20141.872107] usb 1-1.1: USB disconnect, device number 4&lt;br /&gt;
 [20143.820756] usb 1-1.1: new full-speed USB device number 5 using ehci-platform&lt;br /&gt;
 [20143.973366] usb 1-1.1: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04&lt;br /&gt;
 [20143.973413] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0&lt;br /&gt;
 [20143.973434] usb 1-1.1: Product: USB UART-LPT&lt;br /&gt;
 [20143.975137] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connect device&lt;br /&gt;
 [20143.975164] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: bNumEndpoints=3&lt;br /&gt;
 [20143.975183] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=0 type=2 dir=1 addr=2&lt;br /&gt;
 [20143.975206] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=1 type=2 dir=0 addr=2&lt;br /&gt;
 [20143.975229] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe:   endpoint=2 type=3 dir=1 addr=1&lt;br /&gt;
 [20143.975254] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0&lt;br /&gt;
 [20143.975273] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs0 gpio=0 irq=0 &lt;br /&gt;
 [20143.975295] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1&lt;br /&gt;
 [20143.975313] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs1 gpio=1 irq=1 &lt;br /&gt;
 [20143.975334] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2&lt;br /&gt;
 [20143.975352] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output cs2 gpio=2 irq=2 &lt;br /&gt;
 [20143.975373] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio4 gpio=3 irq=3 &lt;br /&gt;
 [20143.975394] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  gpio6 gpio=4 irq=4 &lt;br /&gt;
 [20143.975415] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  err gpio=5 irq=5 &lt;br /&gt;
 [20143.975435] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  pemp gpio=6 irq=6 &lt;br /&gt;
 [20143.975456] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  int gpio=7 irq=7 (hwirq)&lt;br /&gt;
 [20143.975478] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  slct gpio=8 irq=8 &lt;br /&gt;
 [20143.975499] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  wait gpio=9 irq=9 &lt;br /&gt;
 [20143.975520] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  autofd gpio=10 irq=10 &lt;br /&gt;
 [20143.975542] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: input  addr gpio=11 irq=11 &lt;br /&gt;
 [20143.975564] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output ini gpio=12 irq=12 &lt;br /&gt;
 [20143.975585] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output write gpio=13 irq=13 &lt;br /&gt;
 [20143.975607] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output scl gpio=14 irq=14 &lt;br /&gt;
 [20143.975628] spi-ch341-usb 1-1.1:1.0: ch341_cfg_probe: output sda gpio=15 irq=15 &lt;br /&gt;
 [20143.975650] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: start&lt;br /&gt;
 [20143.975677] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI master connected to SPI bus 1&lt;br /&gt;
 [20143.977831] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.0 created&lt;br /&gt;
 [20143.978183] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.1 created&lt;br /&gt;
 [20143.978552] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: SPI device /dev/spidev1.2 created&lt;br /&gt;
 [20143.978726] spi-ch341-usb 1-1.1:1.0: ch341_spi_probe: done&lt;br /&gt;
 [20143.978735] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: start&lt;br /&gt;
 [20143.979133] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: irq_base=103&lt;br /&gt;
 [20143.979154] spi-ch341-usb 1-1.1:1.0: ch341_irq_probe: done&lt;br /&gt;
 [20143.979162] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: start&lt;br /&gt;
 [20143.979220] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs0 dir=0&lt;br /&gt;
 [20143.979229] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs1 dir=0&lt;br /&gt;
 [20143.979237] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=cs2 dir=0&lt;br /&gt;
 [20143.979245] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio4 dir=1&lt;br /&gt;
 [20143.979253] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=gpio6 dir=1&lt;br /&gt;
 [20143.979260] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=err dir=1&lt;br /&gt;
 [20143.979268] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=pemp dir=1&lt;br /&gt;
 [20143.979275] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=int dir=1&lt;br /&gt;
 [20143.979283] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=slct dir=1&lt;br /&gt;
 [20143.979290] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=wait dir=1&lt;br /&gt;
 [20143.979298] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=autofd dir=1&lt;br /&gt;
 [20143.979306] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=addr dir=1&lt;br /&gt;
 [20143.979314] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=ini dir=0&lt;br /&gt;
 [20143.979321] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=write dir=0&lt;br /&gt;
 [20143.979329] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=scl dir=0&lt;br /&gt;
 [20143.979337] spi-ch341-usb 1-1.1:1.0: ch341_gpio_get_direction: gpio=sda dir=0&lt;br /&gt;
 [20143.979831] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: registered GPIOs from 496 to 511&lt;br /&gt;
 [20143.981152] spi-ch341-usb 1-1.1:1.0: ch341_gpio_probe: done&lt;br /&gt;
 [20143.981212] spi-ch341-usb 1-1.1:1.0: ch341_gpio_poll_function: start&lt;br /&gt;
 [20143.981291] spi-ch341-usb 1-1.1:1.0: ch341_usb_probe: connected&lt;br /&gt;
 [20144.756250] usbcore: registered new interface driver ch341&lt;br /&gt;
 [20144.756334] usbserial: USB Serial support registered for ch341-uart  &lt;br /&gt;
&lt;br /&gt;
=== Driver development === &lt;br /&gt;
Once the module ''spi-ch341-usb'' is correctly loaded, here's how you can transfer data on the SPI bus (in C):&lt;br /&gt;
&lt;br /&gt;
 /* Open the SPI bus */&lt;br /&gt;
 int spi = open(&amp;quot;/dev/spidev1.0&amp;quot;, O_RDWR);&lt;br /&gt;
 uint8_t mmode = SPI_MODE_0;&lt;br /&gt;
 uint8_t lsb = 0;&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_MODE, &amp;amp;mmode);&lt;br /&gt;
 ioctl(spi, SPI_IOC_WR_LSB_FIRST, &amp;amp;lsb);&lt;br /&gt;
 &lt;br /&gt;
 /* Transfer data */&lt;br /&gt;
 /* TODO: Init buffer_out, buffer_in and size */&lt;br /&gt;
 const uint8_t *mosi = buffer_out; // output data&lt;br /&gt;
 uint8_t *miso = buffer_in; // input data&lt;br /&gt;
 &lt;br /&gt;
 struct spi_ioc_transfer spi_trans;&lt;br /&gt;
 memset(&amp;amp;spi_trans, 0, sizeof(spi_trans));&lt;br /&gt;
 &lt;br /&gt;
 spi_trans.tx_buf = (unsigned long) mosi;&lt;br /&gt;
 spi_trans.rx_buf = (unsigned long) miso;&lt;br /&gt;
 spi_trans.cs_change = true;&lt;br /&gt;
 spi_trans.len = size;&lt;br /&gt;
 &lt;br /&gt;
 int status = ioctl (spi, SPI_IOC_MESSAGE(1), &amp;amp;spi_trans);&lt;br /&gt;
&lt;br /&gt;
To access GPIOs, you first need to export them (to make them accessible via ''/sys/class/gpio''. As you can see in the dmesg output, GPIOs from 496 to 511 were registered, which means we can export 16 GPIOs. The mapping of these I/O is available in the [https://github.com/rogerjames99/spi-ch341-usb/blob/master/spi-ch341-usb.c#L148 source code of the driver]. For example, pin ''slct'' is the 12th, meaning we need to export GPIO 496+12 = 508.&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/export&amp;quot;, O_WRONLY)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
   exit(-1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, &amp;quot;508&amp;quot;, 3) == -1){&lt;br /&gt;
   perror (&amp;quot;write export 508&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Once exported, the GPIO is available in ''/sys/class/gpio/sclt'' (the naming is specified by the driver). You can read the pin in C:&lt;br /&gt;
&lt;br /&gt;
 int  fd;&lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/slct/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 char buf;&lt;br /&gt;
 if (read(fd, &amp;amp;buf, 1) == -1) {&lt;br /&gt;
    perror(&amp;quot;read&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int value = (buf == '0') ? 0 : 1;&lt;br /&gt;
&lt;br /&gt;
You can also write it:&lt;br /&gt;
&lt;br /&gt;
 int  fd; &lt;br /&gt;
 if ((fd = open(&amp;quot;/sys/class/gpio/ini/value&amp;quot;, O_RDWR)) == -1)   {&lt;br /&gt;
   perror(&amp;quot;open ini&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if (write(fd, value ? &amp;quot;1&amp;quot; : &amp;quot;0&amp;quot;, 1) == -1) {&lt;br /&gt;
    perror (&amp;quot;write&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Driver for the SX1262 LoRa module ===&lt;br /&gt;
Now that we can talk to the SX1262 via the CH341 USB converter chip, we need to send actual commands to make it emit or receive LoRa messages. To do this, you can implement the driver yourself using info from the datasheet, or use an existing driver (you can easily find drivers for the Arduino framework, for example. &lt;br /&gt;
I found [https://github.com/YukiWorkshop/sx126x_driver this C++ driver]. It's well written, lightweight and easily portable across many platforms. All you have to do is implement 3 HAL function : read GPIO, write GPIO and transfer data on SPI. I wrote a quick'n'dirty app that emits a LoRa frame. It's [https://gist.github.com/JF002/f1af5595874942427eea9d375c18fc73 available here]. &lt;br /&gt;
&lt;br /&gt;
As I don't have any 'raw' LoRa device on hands, I check that it was actually transmitting something using my SDR setup (simple TNT usb key and '''Gqrx''' software):&lt;br /&gt;
&lt;br /&gt;
[[File:pine64-lora-usb-adapter-sdr.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Other end nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
* CH341 datasheet : [[File:CH341DS1.pdf]]&lt;br /&gt;
* Semtech SX1262 datasheet : [https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000HT76/7Nka9W5WgugoZe.xwIHJy6ebj1hW8UJ.USO_Pt2CLLo File on Semtech website (file is too big for the wiki)]&lt;br /&gt;
&lt;br /&gt;
=== PineDio Stack ===&lt;br /&gt;
* Schematic : [[File:PINEDIO_STACK_V1_0-2021_05_24C.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PineTab&amp;diff=10835</id>
		<title>PineTab</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PineTab&amp;diff=10835"/>
		<updated>2021-06-26T06:32:04Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Tips and tricks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=IMPORTANT INFORMATION for '''Early Adopters''' - please [[PineTab/Early-Adopter|'''CLICK HERE''']] - some '''known issues''' are listed there}}&lt;br /&gt;
&lt;br /&gt;
The PineTab is a 10&amp;quot; tablet created by Pine64.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
* '''Dimensions:''' 11mm x 175mm x 260mm (Thickness, Width, Height)&lt;br /&gt;
* '''Weight:''' 575g (Tablet alone)&lt;br /&gt;
* '''Build:''' Plastic&lt;br /&gt;
* '''Storage:'''&lt;br /&gt;
** 64GB of internal eMMC storage&lt;br /&gt;
** MicroSD slot, bootable&lt;br /&gt;
** M.2 SSD slot, supports SATA and USB devices only, not NVME (optional)&lt;br /&gt;
* '''Cameras:''' 2Mpx Front, 5Mpx Rear&lt;br /&gt;
* '''SOC:''' Allwinner A64 Quad Core&lt;br /&gt;
* '''CPU:''' 4x ARM A53 1.152GHz&lt;br /&gt;
* '''GPU:''' Mali 400 MP2&lt;br /&gt;
* '''RAM:''' 2GB LPDDR3&lt;br /&gt;
* '''I/O:''' HD Video Out (Mini HDMI), Micro USB 2.0 OTG, USB 2.0 A host, 3.5mm Headphone/Mic combo,&lt;br /&gt;
* '''Network:'''&lt;br /&gt;
** WiFi (802.11b/g/n, 2.4GHz only)&lt;br /&gt;
** Bluetooth 2.1&lt;br /&gt;
** M.2 LTE / Cell MODEM card, (optional, and takes place of optional M.2 SSD)&lt;br /&gt;
* '''Display:'''&lt;br /&gt;
** '''Size:''' 10.1 inches (257mm) diagonal&lt;br /&gt;
** '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
** '''Resolution:''' 1280x800, 16:10 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Attachments/Accessories:''' Magnetically attached keyboard (optional)&lt;br /&gt;
* '''Battery:''' 6000MAh (6Ah)&lt;br /&gt;
* '''Misc. features:''' &lt;br /&gt;
** Volume rocker&lt;br /&gt;
** Speakers and Microphone&lt;br /&gt;
** 2.5mm OD 0.7mm ID DC Jack Power (5V 2A) Port&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
'''Overview:''' The PineTab detachable keyboard features a full function row, FN key functionality, meta key (where the Windows key would be) and all of the keys you need for daily use.&lt;br /&gt;
&lt;br /&gt;
'''FN keys:''': Pause/play (F2), Stop (F3), Previous(F4), Next(F5), Music (F6), Mail (F7), Home (F8), Mute (F9), Vol- (F10), Vol+ (F11), Disable touchpad (F12), NumLock (Insert), Scroll Lock (Delete), PgUp (Up Arrow), PgDn (Down Arrow), Home (Left Arrow), End (Right Arrow), Digital Numpad (7,8,9,0,U,I,O,P,J,K,L,;,M,.,/)&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
* &amp;quot;pinetab-dev&amp;quot;: development version sent to ~100 developers. This one is like the Early Adopter version, but has a different display panel.&lt;br /&gt;
* [[PineTab/Early-Adopter|Early Adopter]]: the first hardware revision of the PineTab, which shipped to customers.&lt;br /&gt;
&lt;br /&gt;
[[File:PineTabBoard.jpeg|400px|thumb|right|The insides of the PineTab]]&lt;br /&gt;
&lt;br /&gt;
== PineTab board information, schematics and certifications ==&lt;br /&gt;
* PineTab mainboard schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Schematic%20v1.2-20191125.pdf PineTab mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-top.pdf PineTab mainboard component placement ver 1.2 - Top View]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/PineTab%20Board%20View%20v1.2-20191201-bottom.pdf PineTab mainboard component placement ver 1.2 - Bottom View]&lt;br /&gt;
* PineTab keyboard schematic:&lt;br /&gt;
** PineTab keyboard and Pinebook (Pro) keyboard using same controller and from same engineering source&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/Pinetab%20HB092A%20Keyboard%20Schematic.pdf PineTab Keyboard Schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/HB092_0884232458_Hynitron_PTP_20200514_662905_Linux_US_BackLight_CRC_175057F5.hex PineTab keyboard firmware code]&lt;br /&gt;
** [https://files.pine64.org/doc/PineTab/SH68F83V2.0.pdf PineTab Keyboard Controller Datasheet]&lt;br /&gt;
&lt;br /&gt;
* PineTab certifications:&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20FCC-SDOC%20Certificate-S20060600404001.pdf PineTab FCC Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PineTab%20CE-RED%20Certificate-S20060600403.pdf PineTab CE RED Certificate]&lt;br /&gt;
** [https://files.pine64.org/doc/cert/PINETAB%20ROHS%20TEST%20REPORT.pdf PineTab ROHS Test Report]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 64GB SanDisk eMMC Datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271.pdf GOODiX GT9271 Capacitive Touch Controller datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pinetab/GT9271_Config_20200818_142030_V66.cfg PineTab GT9271 Capacitive Touch Controller configuration file]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
The PineTab will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distro (because the PineTab uses the mainline kernel), only few of them will actually be usable on Early Adopters PineTab, due to specifics of working with LCD panel. Among those listed all except for postmarketOS have working builds.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts ===&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
The UBPorts Ubuntu Touch is what was preinstalled on the PineTab Early Adopters batch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can update itself in System Settings, and also a  jenkins daily build can be downloaded at this updated address for the latest daily image: &lt;br /&gt;
&lt;br /&gt;
https://ci.ubports.com/job/rootfs/job/rootfs-pinetab-systemimage/&lt;br /&gt;
&lt;br /&gt;
The last stable builds are also listed and appear to be updated every few weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that as of 20th January the latest stable/release candidate and development builds  still lacked Bluetooth, Rotation and had the same issues with online accounts etc&lt;br /&gt;
&lt;br /&gt;
Online accounts access have a fix for Google accounts here https://github.com/rubencarneiro/account-plugins/releases&lt;br /&gt;
&lt;br /&gt;
There are however significant updates to the original pinetab image (without the issues above) &lt;br /&gt;
&lt;br /&gt;
The old image appears to be deprecated here&lt;br /&gt;
[https://ci.ubports.com/job/rootfs/job/rootfs-pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
In the event that WiFi fails to connect, the USB port can be used with an appropriate dongle to connect for internet using ethernet cable.&lt;br /&gt;
&lt;br /&gt;
=== postmarketOS ===&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
postmarketOS extends [https://www.alpinelinux.org/ Alpine Linux] to run on smartphones and other mobile devices.&lt;br /&gt;
&lt;br /&gt;
It offers various user interfaces (Phosh, Plasma Mobile, Sxmo, Plasma Desktop, Gnome 3, Kodi, XFCE4, ...). As of writing, official images are provided with Phosh and Plasma Mobile. The official images come in two flavors, either as demo image to try out postmarketOS, or with the installer.&lt;br /&gt;
&lt;br /&gt;
When using the installer images (recommended), it is possible to:&lt;br /&gt;
* encrypt your installation&lt;br /&gt;
* install from the SD card to eMMC&lt;br /&gt;
&lt;br /&gt;
Getting postmarketOS for the PineTab:&lt;br /&gt;
* [https://postmarketos.org/download/ Download page]&lt;br /&gt;
* [https://wiki.postmarketos.org/wiki/PINE64_PineTab_(pine64-pinetab)#Installation Flashing instructions]&lt;br /&gt;
* Power users may also create their own image with the distribution's install and development tool &amp;lt;code&amp;gt;pmbootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ARM ===&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
Arch Linux ARM with Phosh as the UI selection, maintained by the DanctNIX community. &lt;br /&gt;
&lt;br /&gt;
The latest image can be downloaded [https://github.com/dreemurrs-embedded/Pine64-Arch/releases here]&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ARM ===&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
The PineTab &amp;quot;Early Adopter&amp;quot; edition is currently not supported by ManjaroARM.&lt;br /&gt;
&lt;br /&gt;
Older Manjaro images with several different environments, including Phosh and Plasma, are available for the &amp;quot;Dev&amp;quot; pre-release but '''not working on &amp;quot;Early Adopters&amp;quot; PineTab''' can be downloaded [https://osdn.net/projects/manjaro-arm/storage/pinetab/ here]&lt;br /&gt;
&lt;br /&gt;
=== Mobian ===&lt;br /&gt;
[[File:Debian-logo.png|100px]]&lt;br /&gt;
Mobian is a project providing Debian images for mobile devices. &lt;br /&gt;
&lt;br /&gt;
PineTab images can be downloaded [https://images.mobian-project.org/pinetab/ here]. Password is '''1234'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sailfish OS ===&lt;br /&gt;
&lt;br /&gt;
[[File:SailfishOS logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
You can get SailfishOS on your with the flash-it script, which will write an image on a SD card. https://github.com/sailfish-on-dontbeevil/flash-it&lt;br /&gt;
&lt;br /&gt;
There is a forum discussion with further information.&lt;br /&gt;
&lt;br /&gt;
http://forum.pine64.org/showthread.php?tid=11850&lt;br /&gt;
&lt;br /&gt;
Many things are still broken but Bluetooth, Audio, Rotation and Keyboard are working.&lt;br /&gt;
&lt;br /&gt;
== Installation instructions ==&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or microSD card see [[PinePhone Installation Instructions]]. The information is almost the same for the PineTab, as it is a very similar device. Do not try to use the PinePhone images though, use the PineTab images linked above.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
To test an OS, just flash its image onto an microSD card, plug it into PineTab, and reboot.&lt;br /&gt;
Note that USB stick won't work.&lt;br /&gt;
Also note that you need to &amp;quot;flash&amp;quot;, not just copy the file onto the card.&lt;br /&gt;
Also remember that you need to unpack image file if it's packed!&lt;br /&gt;
&lt;br /&gt;
You can do it using Ubuntu Touch installed on the PineTab! For now, only Mobian is supported by the guide below.&lt;br /&gt;
&lt;br /&gt;
* First, make sure you have enough free disk space and empty Downloads directory on the PineTab (while not strictly necessary, empty Downloads dir will simplify your typing. You can just move all files from there to another directory).&lt;br /&gt;
* Turn off Sleep when idle in the settings. Settings &amp;gt; Battery &amp;gt; Sleep when idle: Never&lt;br /&gt;
* Go to the Mobian link above and download compressed image (the one ending with .img.gz) - usual recommendation is to download latest, i.e. lowest one.&lt;br /&gt;
* Open terminal and type this in it:&lt;br /&gt;
  cd Downloads&lt;br /&gt;
  ls&lt;br /&gt;
* It should show you the name of the file you've just downloaded&lt;br /&gt;
* This file is compressed, so first you need to uncompress it. Type this into terminal:&lt;br /&gt;
  gunzip *.gz &amp;amp;&amp;amp; echo done&lt;br /&gt;
* This command will take some time (you won't see any progress until it's done). It either will succeed (and print &amp;quot;done&amp;quot;) and fail (and print why).&lt;br /&gt;
* Now, let's have a look at disks. Type this into terminal:&lt;br /&gt;
  lsblk&lt;br /&gt;
* It should show you a tree of disks and their partitions. If you don't have microSD card inserted yet, all of them begin with mmcblk2. Also, some of them have something in the &amp;quot;MOUNTPOINT&amp;quot; column&lt;br /&gt;
* Insert microSD card into PineTab. Note that all information on it will be deleted, so don't insert one with valuable information on it!&lt;br /&gt;
* type `lsblk` into terminal again.&lt;br /&gt;
* Note that now tree of disks has one or more new entries - starting with mmcblk0 - that's partitions of your microSD card.&lt;br /&gt;
* Confirm that size of mmcblk0 is close to size of the microSD card, and all lines starting with mmcblk0 have empty &amp;quot;MOUNTPOINT&amp;quot; column.&lt;br /&gt;
* now type this:&lt;br /&gt;
  sudo dd if=`ls` of=/dev/mmcblk0 bs=1M status=progress&lt;br /&gt;
* It will take some time, depending on speed of your microSD card and size of image file&lt;br /&gt;
* Now, reboot your PineTab - type this into terminal:&lt;br /&gt;
  sudo reboot&lt;br /&gt;
* PineTab should boot from the microSD you've just flashed&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Reset ===&lt;br /&gt;
&lt;br /&gt;
If your PineTab is in unknown state or doesn't want to start: Press power button for 7-8s. It makes a sound and you know it's totally off. 3 seconds after, power button  again for 2-3s and it will start to boot.&lt;br /&gt;
&lt;br /&gt;
=== Power Off While Charging ===&lt;br /&gt;
&lt;br /&gt;
When plugging your Pinetab into a charger, it automatically powers on. Use the above &amp;quot;Reset&amp;quot; instruction (holding the power button in for several seconds) to turn it off. This will allow your Pinetab to charge without being powered on. &lt;br /&gt;
&lt;br /&gt;
=== Display rotated 90° on Arch ARM ===&lt;br /&gt;
With the following command you can turn the display to landscape:&lt;br /&gt;
&lt;br /&gt;
* echo 1 | sudo tee /sys/class/graphics/fbcon/rotate&lt;br /&gt;
&lt;br /&gt;
This command does not persist a reboot.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [https://pine64.com/product/pinetab-10-1-linux-tablet/ The PineTab on the Pine64 store]&lt;br /&gt;
* [https://forum.pine64.org/forumdisplay.php?fid=140 The PineTab section of the Pine64 forums]&lt;br /&gt;
&lt;br /&gt;
[[Category:PineTab]] [[Category:Allwinner A64]]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10653</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10653"/>
		<updated>2021-06-07T21:29:47Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Armbian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
'''Default Credentials'''&lt;br /&gt;
&lt;br /&gt;
 Login: root&lt;br /&gt;
 password: 1234&lt;br /&gt;
&lt;br /&gt;
After your first login you will be guided through creating your user account (create a strong password).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). &lt;br /&gt;
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: IMAGE CURRENTLY EXPERIMENTAL. FOR TESTING. NOT CONSIDERED STABLE.&lt;br /&gt;
&lt;br /&gt;
HIGHLY SUGGESTED TO USE ARMBIAN (AT THIS TIME).&lt;br /&gt;
THIS SECTION WILL BE UPDATED.&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS): &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10652</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10652"/>
		<updated>2021-06-07T18:18:22Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: IMAGE CURRENTLY EXPERIMENTAL. FOR TESTING. NOT CONSIDERED STABLE.&lt;br /&gt;
&lt;br /&gt;
HIGHLY SUGGESTED TO USE ARMBIAN (AT THIS TIME).&lt;br /&gt;
THIS SECTION WILL BE UPDATED.&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS): &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10651</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10651"/>
		<updated>2021-06-07T18:17:20Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: IMAGE CURRENTLY EXPERIMENTAL- FOR TESTING. NOT CONSIDERED STABLE AT THIS TIME.&lt;br /&gt;
&lt;br /&gt;
HIGHLY SUGGESTED TO USE ARMBIAN AT THIS TIME&lt;br /&gt;
THIS SECTION WILL BE UPDATED&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS): &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10650</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10650"/>
		<updated>2021-06-07T18:15:22Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: IMAGE CURRENTLY EXPERIMENTAL- FOR TESTING. NOT CONSIDERED STABLE AT THIS TIME.&lt;br /&gt;
&lt;br /&gt;
*** HIGHLY SUGGESTED TO USE ARMBIAN AT THIS TIME ***&lt;br /&gt;
*** THIS SECTION WILL BE UPDATED ***&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10634</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10634"/>
		<updated>2021-06-06T03:13:36Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: IMAGE CURRENTLY FOR TESTING. NOT CONSIDERED STABLE AT THIS TIME.&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10633</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10633"/>
		<updated>2021-06-06T03:07:25Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: IMAGE CURRENTLY BEING TESTED. NOT CONSIDERED STABLE AT THIS TIME.&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10632</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10632"/>
		<updated>2021-06-06T02:59:20Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
NOTE: This image is being tested. If you use it: suggested to secure it.&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
 Login: dietpi&lt;br /&gt;
 Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). In addition to it being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10619</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10619"/>
		<updated>2021-06-04T05:27:30Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Login: dietpi&lt;br /&gt;
&lt;br /&gt;
Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2 i2c0&lt;br /&gt;
&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save. Reboot. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10618</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10618"/>
		<updated>2021-06-04T05:21:45Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Login: dietpi&lt;br /&gt;
&lt;br /&gt;
Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev uart2 i2c0&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10617</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10617"/>
		<updated>2021-06-04T05:00:40Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Login: dietpi&lt;br /&gt;
&lt;br /&gt;
Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev uart2 i2c0&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10616</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10616"/>
		<updated>2021-06-04T04:40:53Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Dietpi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Login: dietpi&lt;br /&gt;
&lt;br /&gt;
Password: SoPinePass!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10615</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10615"/>
		<updated>2021-06-04T04:40:29Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Login: dietpi&lt;br /&gt;
&lt;br /&gt;
Password: &amp;quot;SoPinePass!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10614</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10614"/>
		<updated>2021-06-04T04:39:41Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
====Armbian====&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dietpi====&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Login: dietpi&lt;br /&gt;
Password: &amp;quot;SoPinePass!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Dietpi Commands:'''&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Steps To Enable spidev0.0 (rakwireless concentrator device):'''&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
 sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
 overlays=spi-spidev uart2&lt;br /&gt;
 param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10587</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10587"/>
		<updated>2021-06-02T07:08:28Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
Armbian:&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi:&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands: &lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps To Enable spidev0.0 (rakwireless concentrator device):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev uart2&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10573</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10573"/>
		<updated>2021-05-30T20:44:08Z</updated>

		<summary type="html">&lt;p&gt;RTP: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
Armbian:&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi:&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands: &lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps To Enable spidev0.0 (rakwireless concentrator device):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10572</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10572"/>
		<updated>2021-05-30T19:34:10Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.&lt;br /&gt;
&lt;br /&gt;
== Armbian: ==&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dietpi: ==&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dietpi Commands: ==&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps To Enable spidev0.0 (rakwireless concentrator device): ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10571</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10571"/>
		<updated>2021-05-30T19:16:39Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
== Armbian: ==&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dietpi: ==&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dietpi Commands: ==&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps To Enable spidev0.0 (rakwireless concentrator device): ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10570</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10570"/>
		<updated>2021-05-30T19:10:00Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian: &lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi: &lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands:&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Steps To Enable spidev0.0 (rakwireless concentrator device):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system to a minimum level (deleting much of original Armbian commands), we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save this. Reboot (optionally hand edit /boot/armbianEnv.txt to add the 2 lines). After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10569</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10569"/>
		<updated>2021-05-30T19:08:16Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian: &lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi: &lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands:&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Steps To Enable spidev0.0 (rakwireless concentrator device):&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system, deleting much of original Armbian commands, we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev&lt;br /&gt;
&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Save this, and reboot (you can optionally hand edit /boot/armbianEnv.txt to add the 2 lines. After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10568</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10568"/>
		<updated>2021-05-30T19:06:45Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian: &lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi: &lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands:&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Steps To Enable spidev0.0 (rakwireless concentrator device):&lt;br /&gt;
&lt;br /&gt;
As Dietpi strips down the system, deleting much of original Armbian commands, we can install armbian-config command by issuing:&lt;br /&gt;
&lt;br /&gt;
sudo apt install armbian-config&lt;br /&gt;
&lt;br /&gt;
Inside armbian-config -&amp;gt; system -&amp;gt; Bootenv (edit boot environment), enter the following 2 lines to create spidev0.0:&lt;br /&gt;
&lt;br /&gt;
overlays=spi-spidev&lt;br /&gt;
param_spidev_spi_bus=0&lt;br /&gt;
&lt;br /&gt;
Now save this, and reboot. After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for your choice in gateway related setup.&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10565</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10565"/>
		<updated>2021-05-29T22:41:22Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian: &lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi: &lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands:&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10564</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10564"/>
		<updated>2021-05-29T22:37:16Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian:&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi:&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as pre-image (Debian based). Carrying a large array of options, Dietpi includes SBC hardware configurations available inside ncurses menu interface (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to being a full on Debian based Linux system, a variety of servers and services can be added on demand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Commands:&lt;br /&gt;
&lt;br /&gt;
dietpi-launcher: access all dietpi tools/menus&lt;br /&gt;
dietpi-software: select from numerous optimized servers/services to install&lt;br /&gt;
dietpi-config: feature rich configuration tool&lt;br /&gt;
dietpi-autostart: choose software to run after boot&lt;br /&gt;
dietpi-update: update/upgrade system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image (for Pinedio/SOPINE/LTS) here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10553</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10553"/>
		<updated>2021-05-29T08:44:21Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Options (Pinedio Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian:&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
Armbian Official Website: https://www.armbian.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi:&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as a base (Debian). Carrying a large array of options, Dietpi includes SBC hardware configurations available upon running: 'sudo dietpi-config' inside ncurses menu (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to a rich hardware configuration menu, a variety of servers and services can be added by running: &lt;br /&gt;
'sudo dietpi-software'. &lt;br /&gt;
&lt;br /&gt;
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Download current Dietpi image here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10552</id>
		<title>Pinedio</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Pinedio&amp;diff=10552"/>
		<updated>2021-05-29T08:33:14Z</updated>

		<summary type="html">&lt;p&gt;RTP: /* Operating System Images (For Gateway) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Page under construction, information subject to change. Project is in early development phase.}}&lt;br /&gt;
&lt;br /&gt;
LoRa is a long range, low power wireless platform that is being used by a lot of Internet of Things (IoT) products. Using LoRa and LoRaWAN, devices can communicate across the world using the internet, using various decentralised networks such as [https://www.thethingsnetwork.org/ The Things Network] or [https://www.helium.com/ Helium]. Since, PINE64 believes in openness, the LoRa gateway can connect to any network, per the developer implementation. If Helium Spots open up for PINE64 gateway and developers have implemented the hook for Helium, then this is good thing. The PINE64 LoRa gateway also open connect to The Things Network if developers implement support. The choice is yours!&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have &amp;quot;an aluminum, rugged and water resistant case&amp;quot;. &lt;br /&gt;
The indoor unit consists of a PINE A64-LTS, fitted with a purpose built hat (adapter) which uses a LoRa module by RakWireless. The chipset used is the SX1302, and the module via the SPI interface. There are two external connections on the enclosure for the GPS and loRa antenna. &lt;br /&gt;
&lt;br /&gt;
=== Connections ===&lt;br /&gt;
* GPS is connected to UART2 on the A64 board&lt;br /&gt;
* SX1302 on SPI0&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|RAK2287 module&lt;br /&gt;
|PI-2 connector&lt;br /&gt;
|PINE A64-LTS&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 SPI&lt;br /&gt;
|Pin 19 = MOSI / PC0&amp;lt;br/&amp;gt;Pin 21 = MISO/PC1&amp;lt;br/&amp;gt;Pin23 = CLK/PC2&amp;lt;br/&amp;gt;Pin24 = CS/PC3&lt;br /&gt;
|SPI0 (/dev/spidev0.0)&lt;br /&gt;
|-&lt;br /&gt;
|SX1302 RESET&lt;br /&gt;
|Pin 11 = GPIO17/PC7&lt;br /&gt;
|GPIO71 (/sys/class/gpio/gpio71)&lt;br /&gt;
|-&lt;br /&gt;
|GPS UART&lt;br /&gt;
|Pin 8 = TX/&amp;lt;br&amp;gt;Pin 10 = RX&lt;br /&gt;
|UART2 (/dev/ttyS2)&lt;br /&gt;
|-&lt;br /&gt;
|GPS RESET&lt;br /&gt;
|Pin 33 = GPIO13/PC5&lt;br /&gt;
|GPIO69 (/sys/class/gpio/gpio69)&lt;br /&gt;
|-&lt;br /&gt;
|GPS Standby&lt;br /&gt;
|Pin 35 = GPIO19/PC9&lt;br /&gt;
|GPIO73 (/sys/class/gpio/gpio73)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-InsideLoRaGateway.jpg&lt;br /&gt;
File:Blog-april-InsideLoRaGateway2.jpeg&lt;br /&gt;
File:Discord-lora-gateway-20210413_143615.jpg&lt;br /&gt;
File:Discord-lora-gateway-20210413_1435271.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Operating System Options (Pinedio Gateway) ===&lt;br /&gt;
&lt;br /&gt;
Armbian:&lt;br /&gt;
&lt;br /&gt;
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: &lt;br /&gt;
https://www.armbian.com/sopine-a64/&lt;br /&gt;
&lt;br /&gt;
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 version is confirmed to boot).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dietpi:&lt;br /&gt;
&lt;br /&gt;
Dietpi is a lightweight SOPINE/A64-LTS image using Armbian as an original base (Debian). Carrying with it a large array of options, Dietpi includes SBC hardware configurations available upon running: 'sudo dietpi-config' inside ncurses style menu (ssh/terminal accessible). &lt;br /&gt;
&lt;br /&gt;
In addition to a rich hardware configuration menu, automated installation for a variety of servers and services can be used by running &lt;br /&gt;
'sudo dietpi-software'. The entire list of software available for instant installation can be found here: https://dietpi.com/docs/software/&lt;br /&gt;
&lt;br /&gt;
Download the current Dietpi image here: &lt;br /&gt;
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o&lt;br /&gt;
&lt;br /&gt;
Dietpi Official Website: https://www.dietpi.com&lt;br /&gt;
&lt;br /&gt;
== End nodes ==&lt;br /&gt;
&lt;br /&gt;
There are several end-node units planned:&lt;br /&gt;
* loRa back case for the PinePhone&lt;br /&gt;
* standalone USB dongle-type end-node adapter&lt;br /&gt;
* PineTab adapter&lt;br /&gt;
* as well as a SPI module (which can also be configured as a USB LoRa dongle)&lt;br /&gt;
* a LoRa stick powered by a single 18650 battery (using the [https://wiki.pine64.org/wiki/Nutcracker BL602], and can be fitted with GPS, an low-power OLED panel and additional sensors)&lt;br /&gt;
&lt;br /&gt;
All the end-nodes use the SX1262 chip. &lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Blog-april-USB-LoRa-1024x655.jpg&lt;br /&gt;
File:Blog-april-LoRa-something-839x1024.jpg&lt;br /&gt;
File:Discord_20210421_lora_usb_closeup.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Datasheets and schematics ==&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]&lt;br /&gt;
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]&lt;br /&gt;
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]&lt;br /&gt;
&lt;br /&gt;
=== End nodes ===&lt;br /&gt;
* [https://www.semtech.com/products/wireless-rf/lora-transceivers/sx1262 SX1262 datasheets and resources]&lt;br /&gt;
&lt;br /&gt;
=== Pinephone backplate ===&lt;br /&gt;
* [[File:Pinephone_LoRa_BackPanel_Schematic-v1.0-20210402.pdf]]&lt;br /&gt;
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]&lt;br /&gt;
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB LoRa adapter ===&lt;br /&gt;
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]&lt;br /&gt;
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]&lt;/div&gt;</summary>
		<author><name>RTP</name></author>
	</entry>
</feed>