Close

Improving the gateway - Part 1, Software, OS & HW Tweaks

A project log for "Ultimate" Lora Gateway Backplane

An "ultimate" DIY LoRa Gateway Backplane

ryan-walmsleyRyan Walmsley 04/13/2018 at 21:050 Comments

Following up from the previous blogging here's an update on improving the gateway.

I've been wanting to do a few tweaks to the software running on the SBC so here's a brief update.

Packet Forwarder

Primarily I've been trying to work on getting the mp_pkt_fwd packet forwarder working however keep hitting an issue with it segfaulting, I'm working on it still but we'll leave this part at that.

New OS In Use

Originally I was using the Ubuntu Xenial distribution released by Friendlyarm, however without running it as classic confinements the snaps wouldn't install as recommended. I then tried normal armbian and had a similar issue where it didn't want to mount the snap as it didn't have squashfs enabled default in the kernel

To solve this I followed armbian's guide to compile the OS in a virtualbox with squashFS enabled in the kernel and it then allowed me to install the snap from the snap repositories :D This means that to install on another gateway it'll be as simple as writing the SD Card, installing snap and running snap install ulti-lora-backplane. No compiling or such required.

SBC Tweaking

As well as the OS I've been playing around with some of the bits of the SBC, specifically as a majority of gateways are built with Raspberry Pi Zero's (And mine was before this) the Allwinner H2+ chip is a bit overkill with its quad cores clocked at up to 1.2Ghz.

After doing some tests in sysbench a single threaded CPU bench on average runs quicker than a Pi Zero does based on some reading on the Armbian Forums, this is I suspect from where the entire OS is compiled for ArmV7 and not ArmV6 which provides some optimisation and on top of this as it does run at up to 1.2Ghz this is also an advantage over the 1Ghz Pi Zero.

So in testing by running a few commands (namely echoing 0 to the online to CPU1-3 in /sys/devices/system/cpu/) a 4 threaded sysbench with all 4 cores raised to about 70 Degrees and Armbian's internal throttling had also kicked in. Disabling cores 1-3 obviously meant the test took longer but didn't peak above around 46 degrees with no throttling. The normal running temperature also decreased by a few degrees! Excellent.

I haven't measured the power difference yet because of not being able to measure it yet. However the temperature difference is great.

Next on my list is to see how to disable the cores as default on my SD Card image.


To Do Next

Hardware Tweaks

The hardware is almost at a final completed stage, however there's two tweaks left. A minor change in the position of the mounting hole for the RAK831 and..

The regulator, as it does seem to be the biggest producer of heat I have decided to re-design to use a switching regulator as even with the lower power going into the board and SBC tweaks it'd be better to have a switching reg so I can use 12V instead of 7.5V as I have a lot more 12V PSUs spare.

I'm currently looking at using either the ANP1509 or similar.

I may also put a I2C EEPROM on board to store a few bits of data.

Security

Another step I'll be working on is security of the gateway and specifically try and improve the OS. Specifically a few basic tweaks including on first boot not just requiring the user to change the root account's password but make it so after the user account is created that it'll disable root account. Change the SSH Server port and a few more tweaks.

Discussions