Working with Siemens IoT2000 series from Linux

The Siemens IoT2000 series has been a very interesting development from Siemens and it's really encouraging to see the use of Open Source in the Automation sector definitely on the increase. And that can only be a good thing for developer productivity. Seeing a different IDE for each manufacturer of a PLC invokes some nasty memories of last century web-application development... Siemens Simatic IoT2000 Unfortunately, all the documentation for these units still assumes a Windows PC. And since I have not really been using a physical Windows machine for 10+ years now, that is really slowing things down. For the last few I didn't really have to fall back to a VM, largely due to the fact that in web-development nobody cares about OS any longer. But I have a feeling that shifting my focus to the IIoT space this VM will get a bit more useful as some of these manufacturers don't even bother with anything but Windows and are challenged enough to keep up with Windows upgrades. Download existing image The image can be downloaded from the Siemens support site (if you don't have an account with Siemens you might have to sign up for a login first. https://support.industry.siemens.com/cs/document/109741799/simatic-iot2000-sd-card-example-image Create image from sources If you want to create your own image from source you can find the instructions here: https://github.com/siemensHowever for getting around the system the example image has some additional software making it easier to find your way around the system. Create SD card image sudo dd…

Continue ReadingWorking with Siemens IoT2000 series from Linux

Setting up MultiTech LoRaWAN gateway on Ubuntu

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. lsusb Should show something like this: Bus 002 Device 006: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC Download the driver for the Exar site: https://www.exar.com/design-tools/software-drivers unzip xr_usb_serial_common_lnx-3.6-and-newer-pak.zip cd xr_usb_serial_common_lnx-3.6-and-newer-pak make sudo insmod ./xr_usb_serial_common.ko Ensure driver is loaded at startup sudo vim /etc/modules #Add the following xr_usb_serial_common ls /dev/tty* should now show another USB port ttyXRUSB0 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 Get EUI of your gateway mts-io-sysfs show lora/eui 2> /dev/null | sed 's/://g'

Continue ReadingSetting up MultiTech LoRaWAN gateway on Ubuntu

Microchip LoRaWAN Development Utility on Ubuntu

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. sudo apt install openjdk-8-jre-headless openjfx Download & install utility Download location: LoRa® Technology Evaluation Kit cd ~/Downloads/ chmod +x LoRaSuite-linux-1.0.run ./LoRaSuite-linux-1.0.run Fix User Preferences This step is required for the Utility to run. Unfortunately, this is documented NOWHERE... Change the following files to include the FilePath entry. The map is empty by default. /home/USERID/.java/.userPrefs/dfu/prefs.xml /home/USERID/.java/.userPrefs/fed/prefs.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd"> <map MAP_XML_VERSION="1.0"> <entry key="FilePath" value="/home/USERID/"/> </map> If you chose the default install location you can now start the utility java -jar ~/Microchip/LoRaSuite/Applications/LoRaDevUtility/LoRaDevUtility.jar 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!).

Continue ReadingMicrochip LoRaWAN Development Utility on Ubuntu

GrovePi Zero – connecting your IoT sensors

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…

Continue ReadingGrovePi Zero – connecting your IoT sensors

Connecting your LoPy to The Things Network in Australia

EDIT [2018-06-05]: I have updated the code with the Firmware 1.18.+ releases. The code is available at our Growing Data Foundation Github. 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. This channel plan is also implemented by the install script for the MultiTech Conduit Gateways which are currently the most common gateways installed across Australia (see https://github.com/TheThingsNetwork/gateway-conf/blob/master/AU-global_conf.json) Channel#DirectionFrequency MHzBandwidth…

Continue ReadingConnecting your LoPy to The Things Network in Australia