As the convener for the Adelaide community of The Things Network, I am frequently setting up Multitech Conduit Gateways. Depending on your PC or notebook hardware you might have some problems with the Exar USB-UART driver on Linux.

Here are the steps to getting this unit setup from an Ubuntu (should work for any other Linux distro) machine.

For the rest you just need to follow the excellent instructions by Jac Kersing who maintains the Multitech TTN installer and documentation here:
https://www.thethingsnetwork.org/docs/gateways/multitech/mlinux.html

Installing VirtualBox is getting increasingly painful on Ubuntu due to the problems with UEFI Secure Boot and the VirtualBox kernel modules. Another reason for an alternative is that running VirtualBox VM’s completely in the background is not as straightforward as it could be.

From the available alternatives I looked into (VMWare, Xen & KVM) it was KVM that fitted my needs (casual VM usage with mostly headless VM’s for testing purposes). Main reasons:

Well supported by Ubuntu

Easy, straightforward install

Background VM’s are simple as

Moving VM’s from one host to another is a breeze

Checking system

To check if the CPU can actually support

egrep -c '(svm|vmx)' /proc/cpuinfo

If the number returned is > 0 your systems should be capable to run.

You will also enable your BIOS for virtualisation (in Security settings of most BIOS’s) if that has not already be done. You will get an error if not enabled if you are trying to run an install. The Install of KVM will work fine.

Having just wasted a few hours on getting this Java software running on Linux I am documenting this for future reference and hopefully saving other LoRa / TTN folks some time.

Prerequisites

Install a Java JDK + JavaFX. This should work with the default OpenJDK 8 or 9 which comes as part of the Ubuntu repositories. I ended up installing Oracle JDK 8 as well as I thought the error might be related to OpenJDK.

A big thank you goes to The Things Network user JBI – who provided this answer in a TTN forum post.

No thanks to Microchip as their forum and firmware release policy is a bit of a shocker. There are several reports of such problems in the forum with no answers. Unfortunately, this seems to be no exception with electronics manufacturers (Hello Kerlink!).

I recently purchased a GrovePi Zero and expected this to be a reasonable straight forward way to connect Grove sensors to your Raspberry Pi, read sensor values via Python and pushing them upstream via MQTT. However the software side of things turns out anything but straight forward. Most of the suggestions on the Dexter Industries forum suggest to download some custom OS image – WTF? Hopefully this will save some people time to chase down the same rabbit holes…..

The problem starts with the install scripts which (a pet hate of mine) assume the /home/pi account to be present. There is a variable in at least the 2 of the install scripts (another Github repository – one calls another from a Github URL – like that will ever work ???) which allows you to change the user account but there is also hard-coded references all over the place that still point to that user account. Trying to step manually through the dependency hell in these install scripts that call other scripts ended to be a complete nightmare. It seems to download specific (old !?!) versions of libraries all of which have perfectly fine binaries in the Raspbian repos. Most of the troubleshooting tips use the UI which is not much good on a headless system.

Since all I wanted was to read the sensors from Python I found that there was a library on PyPi (https://pypi.python.org/pypi/grovepi) which should actually do this without installing all this redundant dependencies on what is essentially a remote sensor aggregator. Got hopes up too quickly. Unfortunately turns out that the firmware on these devices is really old and riddled with bugs (could not read from most sensors I tried and all were known issues fixed in later firmware releases. Trying to manually install some of the dependencies (such as avrdude which are all in the Raspbian repositories) for the simple firmware update script turned out useless as they use a custom ‘gpio’ programmer not present. If you are splitting things into multiple Github repositories (which is in itself a good idea) why don’t be consistent about it and create one for the firmware updater alone? You shouldn’t have to compile half of Github on a low-powered device just to flash a firmware file.

Looks like the only solution is to bite the bullet and get another SD card with a default Raspbian image and go through the whole painful experience of installing the whole dependency hell and compiling everything on a RaspberryPi Zero which is like watching paint dry. Hopefully this should then just work on another device that only needs the Python library as a dependency.

Let’s hope so… [will update once finished jumping through all the hoops]

If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal.

These notes are to assist Australian IoT enthusiasts to get started in connecting a LoPy to The Things Network as it is unfortunately (not yet) straight forward to make them work with the current AU-915 TTN Channel plans. As the initiator of the local Adelaide Community of The Things Network I have been experimenting with a number of devices to connect sensors to #TTNADL. One of my personal favourites is the Pycom LoPy as a nice middle-ground between capabilities and technical complexity.

However I ran into a problem where the LoPy would not get a signal back from the TTN network when joining over OTAA even though the TTN Console (http://console.thethingsnetwork.org/) the device showed as connected. With some friendly help from Jose Marcelino at the Pycom Forum this turned out to be an issue with the 915MHz frequency regions. Since there is no actual a standard governing which of the channels are used by TTN gateways, what is outlined here is what is implemented by most TTN communities down under (I know that at least ADL, BNE, SYD and WOL adhere to those). This is the typical Sub-band 2 (Channel 8-15) implementation of AU ISM 915 with TTN Gateways.

To set the LoPy unit up it needs to have the set frequency plan removed and the region specific frequency plan loaded (even though they were bought as 915Mhz units). I have created some quick Python code to set up the LoPy with the above channel structure as the default settings for those devices do not work. Note that you have to remove the default channel settings and add the correct ones before you can successfully register and send data.

Below is my adaptation of the LoPy LoraWAN example to work with TTN in Australia. Please note that the LoPy Lora class only accepts DR values from 1-7. Suggestions more than welcome.

Hope this helps other LoPy owners in Australia to connect to The Things Network. And if you are in Adelaide why don’t you come along to our OpenData and IoT Meetup ? Let’s build this thing together.

Synology Setup

Click “Customize” to add a new DDNS provider

Click “Add” to add a new DDNS service

Service Provider: *DNSMADEEASY

Hostname: Dynamic DNS ID from DNS Made Easy

Username/Email: your DNS Made Easy email

Password/Key: your chosen DNSMadeEasy DDNS password

Once you save the new DDNS provider you should see the status to go “Normal” in a green color. This means the update was successful. You should now be able to PING the DNS record or if you log in to DNS Made Easy the IP address should have changed to the external IP of your DiskStation.

Upgrade or install SANE backends

Since the version of SANE in the Ubuntu 16.04LTS repos is not working for this scanner you either need to install from sources (see this blog) or from this PPA.sudo add-apt-repository ppa:rolfbensch/sane-git
sudo apt update
sudo apt install sane-backends tesseract-ocr gscan2pdf

Security

Add yourself to the ‘scanner’ group to be able to use the scanner.

sudo usermod -a -G scanner USERNAME

Checking SANE

Check for the libsane version (needs to be at least libsane.so.1.0.26 not libsane.so.1.0.25 which is in the Ubuntu repos)

Since there is now a supported Raspbian version without GUI and other unneeded add-ons available as Raspbian Lite the need to use other installers (with sometimes some downsides) is now not a necessity anymore. Below is a list of steps I like to perform before using them for any purpose as my Standard Operating Environment.