The Vinduino gateway receives LoRaLAN sensor data from the Vinduino sensor stations and forwards via WiFi to a ThingSpeak account. To date, the Vinduino project has been using an Electric Imp solution, which required some soldering and PCB assembly.
The following project update, describes a gateway that uses a LD20-H USB LoRa dongle from Globalsat, and does not require any electronics tinkering. This dongle is basically a USB version of the Globalsat LM-210 LoRa module used in the Vinduino sensor station, and, alike the module, works as a wireless UART. Combined with a serial terminal program, this makes a great debug tool to check out the LoRa network and sensor stations.
The Vinduino LoRa gateway can handle up to 300 sensor stations within a range of 5 miles, and can be made for less than $100, assuming that an old PC’s useful life can be extended for the task of working as gateway. Because the software is based on the operating agnostic Python-3 programming language, the supported PC platforms that can function as gateway include Windows, MacOS, Ubuntu Linux, and of course Raspberry Pi. For increased traffic handling, more USB dongles can be added, working on different frequencies.
The Python-3 gateway script, although tested to be working reliable for its basic gateway function, can be customized/improved as needed. For locations where access to Internet is not reliable, or intermittent, we added a SQLite database to store all sensor data locally.
One possible application could be to store data locally and upload when an internet connection is available. This may also be a good starting point for developing smart irrigation algorithms.
The Globalsat LD20-H is available on Tindie
PS: This LoRaLAN gateway is not compatible with LoRaWAN sensor stations.
- Ultra-high sensitive receiving ability by LoRa spread spectrum modulation technology
- Long-distance transmission (1KM to 10KM)
- Easy to use and easy to configure
- Multiple dongles for multi-channel gateway
- Programmable parameters:
- Frequency: 862-1020 MHz
- RF data rate: 0.81K, 1.46K, 2.6K, 4.56K, 9.11K, 18.23K bps
- Max TX power: 5-20 dBm (100mW max)
- UART baud rate: 1200-57600 bps, parity non, odd, even
Python modules needed for the Vinduino gateway script:
- thingspeak (linux install: $ sudo pip3 install thingspeak)
Linux install: $ sudo apt-get install sqlitebrowser
For Windows, install the Cypress USB serial driver
Linux does not require a special drivers for the USB serial interface, however ensure that you have qt4, gcc, and libusb installed. The USB driver stack in Linux has a built-in driver for CDC-ACM class devices. The Cypress chip inside the LD-20 supports CDC-ACM class, CDC-ACM driver gets automatically bound to the device and creates a device node in /dev/ttyACM*(* -The name of device node will vary based on the number of devices connected).
Here is a good description for testing the USB serial connection in Linux:
I found that Ubuntu and RPI recognized the USB serial port, but assumed it was an AT-command modem.
A solution that worked for me is to bypass the ModemManager:
sudo systemctl mask ModemManager.service