The OccamSmart Packet Forwarder implements a LoRaWAN 1.0 Class A gateway based on the OccamSmart mPCIe Smart Gateway Card.
Binaries are currently available for Ubuntu 16.04 and Windows 10 on the Releases page.
-
Download the latest release for Ubuntu 16.04.
-
(Optional) If you would like to install a systemd service file for the Packet Forwarder, run the
install_service.shscript as root, e.g.sudo ./install_service.sh
-
Proceed to Configuration.
-
Download and extract the latest release for Windows 10.
-
Download the Cygwin x86_64 setup.
-
(Optional) If you would like to install the Packet Forwarder as a Windows Service, you will need to install the cygrunsrv package. On the Select Packages screen of the Cygwin setup, set the View to Not Installed, and search for
cygrunsrv. Set the package to be installed by clicking the circular arrow symbol under New.
-
(Optional) To install the service, run the
install_service.batscript. The service can then be managed using the Windows Services app or using Powershell. To uninstall the service, rununinstall_service.bat. -
Complete the Cygwin setup, and all of the necessary dependencies should be installed.
-
Add the Cygwin bin directory, e.g.
C:\cygwin\bin, to your Path. -
Now you may continue to Configuration.
To configure the Packet Forwarder to properly connect to the OccamSmart Smart Gateway Card, the configuration file global_conf.json (/var/lib/occamsmart/global_conf.json if the service was installed) will need to be edited.
-
serial_device_nameOn Ubuntu, the Gateway Card often enumerates as
/dev/ttyACM0, which should be the default inglobal_conf.json. If the Packet Forwarder runs successfully, no configuration of this option is necessaryIn the case that it does not, to locate the correct value for the
serial_device_nameoption look in/dev/serial/by-id:ls /dev/serial/by-idThe usb serial device will enumerate as something similar to
usb-Microchip_Technology_Inc._MCP2200_USB_Serial_Port_Emulator_SOMEIDENTIFIER-if00
So the
serial_device_namein this case would be/dev/serial/by-id/usb-Microchip_Technology_Inc._MCP2200_USB_Serial_Port_Emulator_SOMEIDENTIFIER-if00{ "gateway_conf": { "serial_device_name": "/dev/serial/by-id/usb-Microchip_Technology_Inc._MCP2200_USB_Serial_Port_Emulator_SOMEIDENTIFIER-if00", "gateway_ID": "ABCDEF000000000", ... }, ... }On Windows 10, the serial device name can be found by opening Device Manager, and expanding Ports (COM & LPT). Look for a USB Serial Port.
Because Windows numbers COM ports starting from
COM1, while Cygwin numbers serial ttys starting from/dev/ttyS0,COM1will actually be/dev/ttyS0,COM2will be/dev/ttyS1, etc.So for example, if the Gateway Board has enumerated as
COM4, yourserial_device_nameshould look as follows:{ "gateway_conf": { "serial_device_name": "/dev/ttyS3", "gateway_ID": "ABCDEF000000000", ... }, ... } -
Gateway ID: You should configure a unique 16 hexadecimal digit Gateway ID for your gateway, e.g.
{ "gateway_conf": { ... "gateway_ID": "1234ABCD1234ABCD", ... }, ... } -
Frequency configuration
The Smart Gateway Board is based on the Semtech SX1301, which contains two Radios,
radio_0andradio_1, and 8 channels,chan_multiSF_0throughchan_multiSF_7, each of which can be attached to one of the two radios.Each of the two radios is specified in the config file as below:
{ "SX1301_conf": { ... "radio_0": { "enable": true, "type": "SX1257" "freq": 902700000, /* Center frequency (Hz) */ "rssi_offset": -166.0, "tx_enable": true, "tx_freq_min": 902000000, "tx_freq_max": 928000000 }, ... } }The most important field is the
freqfield, which determines the base frequency in Hz which each attached channel's offset is added to.The channels are specified as below:
{ "SX1301_conf": { ... "chan_multiSF_3": { /* Lora MAC channel, 125kHz, all SF, 902.9 MHz */ "enable": true, "radio": 0, "if": 200000 }, ... } }The
iffield specifies the offset from the center frequency of the radio the channel is attached to. For instance, ifradio_0hasfreqset to902700000, andchan_multiSF_3hasifset to200000, then channel 3 will receive all LoRa packets sent at902700000 + 200000 = 902900000 Hz, (902.3 MHz).
This software is licensed under the Apache 2.0 License, with some components licensed under the BSD or MIT licenses. See the LICENSE file.