04-22-2021, 03:15 PM
(This post was last modified: 07-15-2021, 11:24 PM by RTP.
Edit Reason: removed image said to have issue
)
EDIT: installing https://github.com/righttoprivacy/rak_co...or_gateway sets the Pinedio gateway devices (concentrator/gps) listed below. (Leaving notes for context/reference).
See lower page for example image with fork installed.
Hello!
Post to share things that are found helpful/work, progress/Notes along Pinedio Gateway/modules/Kit.
(Pinedio uses Rak Wireless "LoRa"/Mesh related/compatible hardware).
Pinedio's Wiki has been started and can be found here: https://wiki.pine64.org/wiki/Pinedio
Thread for sharing some found to be working notes that can be edited out/posted to WiKi as wanted.
The Pine64 Gateway's underlying hardware runs on the A64-LTS (this looked the best place to post this - feel free to move).
Working SOPINE/Patched Armbian image can be found at:
*** Removed one of the images as users reported ethernet was not working- my working image is below this:
https://mega.nz/file/Wd5CGRhB#spBqSQrhLm...HopFs4Ho9o (576MB) (Uploaded this copy after patching it)
sx1302_hal compiles/installs on Armbian without issue.
EXPERIMENT: SET UP RAK_COMMON_FOR_GATEWAY (ORIGINALLY FOR RPI: SOME MOD REQUIRED - NOT QUITE FINISHED):
Run sudo armbian-config. Enter System to enable SPI/UART for sx1302/rak/GPS.
Then Add The Following Line To /boot/armbianEnv.txt:
***After this reboot Gateway***
NEXT:
Then:
In rak/install.sh comment out the line (add hash mark in front of)
(or you will receive errors aborting your install)
Run the install.sh script in the main directory.
Select: 7 : rak2287/GPS without LTE
We can use gateway-config command to make some device location changes (if needed).
Before entering gateway-config -> edit packet forwarder, we need to grab our mac address based Gateway ID for all LoRa networks. To grab this Gateway ID run:
It will print out your Gateway ID (based on your unique mac address).
Inside gateway-config make the following changes:
Set GPS to /dev/ttyS2 and grep -i reset to find reset pin swapping 17 with 71.
GPS section of the packet forwarding should look as below
Above GPS, replace the default GatewayID with your gateway ID retrieved from gateway-version (from earlier). The line looks like:
Restart packet forwarder. You may need a reboot.
GPS Related:
If experimenting with The Things Network I discovered Gateway does not appear on the map until the GPS signal is stable. I ran a line towards a window to give it a clear line of sight for GPS. Using a temporary antenna I was able to get a better GPS reception. Immediately after setting up this stable GPS link, the Gateway appears on the map and the PPS counter begins.
journalctl log example (still more to look at):
[OP actively being edited and may change - will clean up as I go]
(Thanks JF for sharing some hardware/SPI related information especially on GPS as I have not worked with an LTS/A64 board until now)
My thought is to continue looking at what may not yet work, change things along the way until all is functional.
Having some odd things happen where I make a small edit to packet forwarder and it resets to original RPI, leading me to have to re-edit leading to starting of concentrator (as far as can see - will end up testing a node on it coming up and checking more details that might differ between RPI/Pine64- if you have anything helpful to share, thanks).
(For now mainly looking at Gateway and using rak_gateway as a starting point to test hardware and make changes).
If you have anything/thoughts/suggestions to add, related, or unrelated, please do!
See lower page for example image with fork installed.
Hello!
Post to share things that are found helpful/work, progress/Notes along Pinedio Gateway/modules/Kit.
(Pinedio uses Rak Wireless "LoRa"/Mesh related/compatible hardware).
Pinedio's Wiki has been started and can be found here: https://wiki.pine64.org/wiki/Pinedio
Thread for sharing some found to be working notes that can be edited out/posted to WiKi as wanted.
The Pine64 Gateway's underlying hardware runs on the A64-LTS (this looked the best place to post this - feel free to move).
Working SOPINE/Patched Armbian image can be found at:
*** Removed one of the images as users reported ethernet was not working- my working image is below this:
https://mega.nz/file/Wd5CGRhB#spBqSQrhLm...HopFs4Ho9o (576MB) (Uploaded this copy after patching it)
sx1302_hal compiles/installs on Armbian without issue.
EXPERIMENT: SET UP RAK_COMMON_FOR_GATEWAY (ORIGINALLY FOR RPI: SOME MOD REQUIRED - NOT QUITE FINISHED):
Run sudo armbian-config. Enter System to enable SPI/UART for sx1302/rak/GPS.
Then Add The Following Line To /boot/armbianEnv.txt:
Code:
param_spidev_spi_bus=0
***After this reboot Gateway***
NEXT:
Code:
clone https://github.com/RAKWireless/rak_common_for_gateway.git
Then:
Code:
cd rak_common_for_gateway
In rak/install.sh comment out the line (add hash mark in front of)
Code:
# systemctl stop hciuart
Run the install.sh script in the main directory.
Select: 7 : rak2287/GPS without LTE
We can use gateway-config command to make some device location changes (if needed).
Before entering gateway-config -> edit packet forwarder, we need to grab our mac address based Gateway ID for all LoRa networks. To grab this Gateway ID run:
Code:
gateway-version
It will print out your Gateway ID (based on your unique mac address).
Inside gateway-config make the following changes:
Code:
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev0.0",
"lorawan_public": true,
Set GPS to /dev/ttyS2 and grep -i reset to find reset pin swapping 17 with 71.
GPS section of the packet forwarding should look as below
Code:
/* GPS configuration */
"gps_tty_path": "/dev/ttyS2",
/* GPS reference coordinates */
Above GPS, replace the default GatewayID with your gateway ID retrieved from gateway-version (from earlier). The line looks like:
Code:
"gateway_conf": {
"gateway_ID": "03BD3EFFFF21D2F",
Restart packet forwarder. You may need a reboot.
GPS Related:
If experimenting with The Things Network I discovered Gateway does not appear on the map until the GPS signal is stable. I ran a line towards a window to give it a clear line of sight for GPS. Using a temporary antenna I was able to get a better GPS reception. Immediately after setting up this stable GPS link, the Gateway appears on the map and the PPS counter begins.
journalctl log example (still more to look at):
Code:
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: Opening SPI communication interface
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: Note: chip version is 0x10 (v1.0)
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: INFO: using legacy timestamp
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: INFO: LoRa Service modem: configuring preamble size to 8 symbols
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: ARB: dual demodulation disabled for all SF
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: INFO: found temperature sensor on port 0x39
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: INFO: [main] concentrator started, packet can now be received
Apr 24 23:45:14 rak-gateway ttn-gateway[10543]: INFO: concentrator EUI: 0x00xxxxxxxx (masked)
Apr 22 16:57:19 rak-gateway ttn-gateway[6400]: CoreCell reset through GPIO71...
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: *** Packet Forwarder ***
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: Version: 2.0.1
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: *** SX1302 HAL library version info ***
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: Version: 2.0.1;
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: ***
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Little endian host
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: found configuration file global_conf.json, parsing
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: global_conf.json does contain a JSON object named SX130x_conf, parsing SX1302 parameters
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: com_type SPI, com_path /dev/spidev0.0, lorawan_public 1, clksrc 0, full_duplex 0
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: antenna_gain 0 dBi
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Configuring legacy timestamp
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: no configuration for SX1261
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: radio 0 enabled (type SX1250), center frequency 904300000, RSSI offset -215.399994, tx enabled 1, single input mode 0
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: radio 1 enabled (type SX1250), center frequency 905000000, RSSI offset -215.399994, tx enabled 0, single input mode 0
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 0> radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 1> radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 2> radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 3> radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 4> radio 1, IF -300000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 5> radio 1, IF -100000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 6> radio 1, IF 100000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora multi-SF channel 7> radio 1, IF 300000 Hz, 125 kHz bw, SF 5 to 12
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8, Explicit header
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: FSK channel 8 disabled
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: gateway MAC address is configured to AAxxxxxxxxxxxx (mac masked)
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: server hostname or IP address is configured to "router.us.thethings.network"
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: upstream port is configured to "1700"
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: downstream port is configured to "1700"
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: downstream keep-alive interval is configured to 10 seconds
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: statistics display interval is configured to 30 seconds
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: upstream PUSH_DATA time-out is configured to 100 ms
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: packets received with a valid CRC will be forwarded
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: packets received with a CRC error will NOT be forwarded
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: packets received with no CRC will NOT be forwarded
Apr 22 16:57:23 rak-gateway ttn-gateway[6400]: INFO: GPS serial port path is configured to "/dev/ttyS2"
....
Apr 23 03:17:37 rak-gateway ttn-gateway[17110]: # PUSH_DATA datagrams sent: 1 (124 bytes)
Apr 23 03:17:37 rak-gateway ttn-gateway[17110]: # PUSH_DATA acknowledged: 100.00%
[OP actively being edited and may change - will clean up as I go]
(Thanks JF for sharing some hardware/SPI related information especially on GPS as I have not worked with an LTS/A64 board until now)
My thought is to continue looking at what may not yet work, change things along the way until all is functional.
Having some odd things happen where I make a small edit to packet forwarder and it resets to original RPI, leading me to have to re-edit leading to starting of concentrator (as far as can see - will end up testing a node on it coming up and checking more details that might differ between RPI/Pine64- if you have anything helpful to share, thanks).
(For now mainly looking at Gateway and using rak_gateway as a starting point to test hardware and make changes).
If you have anything/thoughts/suggestions to add, related, or unrelated, please do!
- RTP
"In the beginner's mind there are many possibilities, in the expert's mind there are few." -Shunryu Suzuki
[ Pinephone Original | Pinetab v1 / v2 Enjoyer ]
Linux Device Privacy / Security Playlist
"In the beginner's mind there are many possibilities, in the expert's mind there are few." -Shunryu Suzuki
[ Pinephone Original | Pinetab v1 / v2 Enjoyer ]
Linux Device Privacy / Security Playlist