Difference between revisions of "Pinedio"

From PINE64
Jump to navigation Jump to search
(Photo galleries)
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Note|Page under construction, information subject to change.}}
{{Note|Page under construction, information subject to change. Project is in early development phase.}}


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!
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!
Line 8: Line 8:
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.  
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.  


=== Connections ===
* GPS is connected to UART2 on the A64 board
* SX1302 on SPI0
{| class="wikitable"
|RAK2287 module
|PI-2 connector
|PINE A64-LTS
|-
|SX1302 SPI
|Pin 19 = MOSI / PC0<br/>Pin 21 = MISO/PC1<br/>Pin23 = CLK/PC2<br/>Pin24 = CS/PC3
|SPI0 (/dev/spidev0.0)
|-
|SX1302 RESET
|Pin 11 = GPIO17/PC7
|GPIO71 (/sys/class/gpio/gpio71)
|-
|GPS UART
|Pin 8 = TX/<br>Pin 10 = RX
|UART2 (/dev/ttyS2)
|-
|GPS RESET
|Pin 33 = GPIO13/PC5
|GPIO69 (/sys/class/gpio/gpio69)
|-
|GPS Standby
|Pin 35 = GPIO19/PC9
|GPIO73 (/sys/class/gpio/gpio73)
|}
=== Pictures ===
<gallery>
<gallery>
File:Blog-april-InsideLoRaGateway.jpg
File:Blog-april-InsideLoRaGateway.jpg
Line 15: Line 46:
</gallery>
</gallery>


=== Armbian image for gateway ===
=== Operating System Options===
 
Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.
 
====Armbian====
 
Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here:
https://www.armbian.com/sopine-a64/
 
(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).
 
Armbian Official Website: https://www.armbian.com
 
'''Default Credentials'''
 
Login: root
password: 1234
 
After your first login you will be guided through creating your user account (create a strong password).


Gateway is based on the pine64 A64-LTS, and the current Armbian_21.02.3 image has a broken DTS. The fault and fix was identified by user dippywood on the Armbian forums [https://forum.armbian.com/topic/17333-unable-to-boot-focal-or-buster-images-on-sopine-clusterboard/ in this thread], and until a new version is released, patched versions are available [https://mega.nz/file/Wd5CGRhB#spBqSQrhLm_gIPtRexV9OOC8T3YoVk9VuHopFs4Ho9o here (576MB gz)] and [https://files.portabledev.xyz/f/c2895e3669bb481da9fd/ here (278 xz)].
 
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''
 
Inside armbian-config -> system -> Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):
 
overlays=spi-spidev uart2 i2c0
param_spidev_spi_bus=0
 
Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.
 
Save. Reboot.  
 
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.
 
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).
Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).
 
====Dietpi====
 
NOTE: IMAGE CURRENTLY EXPERIMENTAL. FOR TESTING. NOT CONSIDERED STABLE.
 
HIGHLY SUGGESTED TO USE ARMBIAN (AT THIS TIME).
THIS SECTION WILL BE UPDATED.
 
Download current Dietpi image (for Pinedio/SOPINE/LTS):
https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o
 
Login: dietpi
Password: SoPinePass!
 
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.
 
 
'''Dietpi Commands:'''
 
dietpi-launcher: access all dietpi tools/menus
 
dietpi-software: select from numerous optimized servers/services to install
 
dietpi-config: feature rich configuration tool
 
dietpi-autostart: choose software to run after boot
 
dietpi-update: update/upgrade system
 
The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/
 
 
'''Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):'''
 
As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:
 
sudo apt install armbian-config
 
Inside armbian-config -> system -> Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):
 
overlays=spi-spidev uart2 i2c0
param_spidev_spi_bus=0
 
Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.
 
Save. Reboot.
 
After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.
 
GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).
 
Dietpi Official Website: https://www.dietpi.com


== End nodes ==
== End nodes ==
Line 26: Line 142:
* PineTab adapter
* PineTab adapter
* as well as a SPI module (which can also be configured as a USB LoRa dongle)
* as well as a SPI module (which can also be configured as a USB LoRa dongle)
* a LoRa stick powered by a single 18650 battery (using the BL602, and can be fitted with GPS, an low-power OLED panel and additional sensors)
* 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)


All the end-nodes use the SX1262 chip.  
All the end-nodes use the SX1262 chip.  


=== Pictures ===
<gallery>
<gallery>
File:Blog-april-USB-LoRa-1024x655.jpg
File:Blog-april-USB-LoRa-1024x655.jpg
Line 35: Line 152:
File:Discord_20210421_lora_usb_closeup.jpg
File:Discord_20210421_lora_usb_closeup.jpg
</gallery>
</gallery>


== Datasheets and schematics ==
== Datasheets and schematics ==
=== Gateway ===
=== Gateway ===
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]  
* [https://www.semtech.com/products/wireless-rf/lora-gateways/sx1302 SX1302 datasheets and resources]
* [https://docs.rakwireless.com/Product-Categories/WisLink/RAK2247/Overview/ RAK2287 datasheets and resources]
* [https://wiki.pine64.org/images/5/54/PINE64_LoRa_Gateway_Module_Adapter_Schematic-v1.0-20210308.pdf Pine64 LoRa Gateway module adapter schematic]


=== End nodes ===
=== End nodes ===
Line 48: Line 166:
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]
* [[File:CA-S01_LoRa_Chip_Antenna_in_Chinese.pdf]]
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]
* [https://github.com/zschroeder6212/tiny-i2c-spi I2C SPI Bridge code running on ATtiny84]
=== USB LoRa adapter ===
* [[File:USB_LoRa_adapter-PINE64_RFM90_SCH_2021_04_26.pdf]]


== Other resources ==
== Other resources ==
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]
* [https://www.youtube.com/watch?v=cJ0wpANpbyc Video: A peek at Pine64's LoRa gateway and modules]
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]
* [https://iotw.io/ IOTW - Blockchain-Enabled IoT Data Platform]

Revision as of 21:29, 7 June 2021

Page under construction, information subject to change. Project is in early development phase.

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 The Things Network or 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!

Gateway

The gateway will be available in two variants - indoor and outdoor. All that is known about the outdoor unit is that it will have "an aluminum, rugged and water resistant case". 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.

Connections

  • GPS is connected to UART2 on the A64 board
  • SX1302 on SPI0
RAK2287 module PI-2 connector PINE A64-LTS
SX1302 SPI Pin 19 = MOSI / PC0
Pin 21 = MISO/PC1
Pin23 = CLK/PC2
Pin24 = CS/PC3
SPI0 (/dev/spidev0.0)
SX1302 RESET Pin 11 = GPIO17/PC7 GPIO71 (/sys/class/gpio/gpio71)
GPS UART Pin 8 = TX/
Pin 10 = RX
UART2 (/dev/ttyS2)
GPS RESET Pin 33 = GPIO13/PC5 GPIO69 (/sys/class/gpio/gpio69)
GPS Standby Pin 35 = GPIO19/PC9 GPIO73 (/sys/class/gpio/gpio73)

Pictures

Operating System Options

Pinedio Gateway carries the A64-LTS board. Based on ram specifications SOPINE images are also compatible.

Armbian

Gateway is based on the pine64 A64-LTS, and the current Armbian_sopine image download options can be found here: https://www.armbian.com/sopine-a64/

(Previous issues in DTS have been fixed by Armbian developers and Armbian_sopine_21.05.1 is confirmed to boot).

Armbian Official Website: https://www.armbian.com

Default Credentials

Login: root
password: 1234

After your first login you will be guided through creating your user account (create a strong password).


Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):

Inside armbian-config -> system -> Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):

overlays=spi-spidev uart2 i2c0
param_spidev_spi_bus=0

Or you may hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.

Save. Reboot.

After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.

GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot). Make sure to offer GPS antenna a strong signal, preferably by a window (if indoors).

Dietpi

NOTE: IMAGE CURRENTLY EXPERIMENTAL. FOR TESTING. NOT CONSIDERED STABLE.

HIGHLY SUGGESTED TO USE ARMBIAN (AT THIS TIME). THIS SECTION WILL BE UPDATED.

Download current Dietpi image (for Pinedio/SOPINE/LTS): https://mega.nz/file/7VpmAQ6S#CxOpSHBHgFkynXIOKVQEQk8864-DLsNnFtbpCH6PU6o

Login: dietpi
Password: SoPinePass!

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.


Dietpi Commands:

dietpi-launcher: access all dietpi tools/menus

dietpi-software: select from numerous optimized servers/services to install

dietpi-config: feature rich configuration tool

dietpi-autostart: choose software to run after boot

dietpi-update: update/upgrade system

The entire list of software available for installation (inside dietpi-software) can be found here: https://dietpi.com/docs/software/


Steps To Enable spidev0.0 (rakwireless concentrator/GPS device):

As Dietpi strips down the system to a minimum level (deleting original Armbian commands), we can either install armbian-config command by issuing:

sudo apt install armbian-config

Inside armbian-config -> system -> Bootenv (edit boot environment), enter the following 2 lines (to create spidev0.0):

overlays=spi-spidev uart2 i2c0
param_spidev_spi_bus=0

Or, instead of installing the above armbian-config, hand edit: /boot/armbianEnv.txt to add the above overlays/param_spidev_spi_bus lines.

Save. Reboot.

After rebooting you should see a new device /dev/spidev0.0. This will be the concentrator device for gateway related setup.

GPS will be /dev/ttyS2 and should work (after editing armbianEnv.txt + reboot).

Dietpi Official Website: https://www.dietpi.com

End nodes

There are several end-node units planned:

  • loRa back case for the PinePhone
  • standalone USB dongle-type end-node adapter
  • PineTab adapter
  • as well as a SPI module (which can also be configured as a USB LoRa dongle)
  • a LoRa stick powered by a single 18650 battery (using the BL602, and can be fitted with GPS, an low-power OLED panel and additional sensors)

All the end-nodes use the SX1262 chip.

Pictures

Datasheets and schematics

Gateway

End nodes

Pinephone backplate


USB LoRa adapter

Other resources