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

Set up a Raspberry Pi Zero headless

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. "Raspberry Pi Zero W" (CC BY-SA 2.0) by lespounder Download Raspbian Lite wget -O raspbian-lite-latest.zip https://downloads.raspberrypi.org/raspbian_lite_latest Download link: https://www.raspberrypi.org/downloads/raspbian/ Write Image to SD Card dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdb After this step there should be 2 additional mounts (if not mount the 2 SD card partitions manually). Set up network interfaces Create a new config file for the wireless interface. cd etc/network/interfaces.d/ vim wlan0.conf Add the following to the new file (if you want to use DHCP - change to static if you want to fix the IP): auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf Set up connection details for local wireless network vim etc/wpa_supplicant/wpa_supplicant.conf Check the file and ensure the network settings are as per the Wireless Network you are connecting to. country=AU ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="SSID" psk=HASHED_PSK_VALUE } You could use the clear-text PSK passphrase but I prefer not to do that in configuration files. Create a PSK hash using 'wpa_passphrase' this older article There could be other config values you might need depending on the network you are connecting to. More info: https://linux.die.net/man/5/wpa_supplicant.conf. Ensure there are DNS Servers configured sudo vim etc/resolv.conf Add the following to the new…

Continue ReadingSet up a Raspberry Pi Zero headless

Dropping the wires on the Raspberry PI

Testing the RPi for some remote sensing application I needed to use a wireless connection as it would have been a pain to reach with an Ethernet cable. Parts Raspberry Pi Series B 512MB Raspbian 3.6.11+ Kernel Comfast 802.11n - Realtek RTL8188CUS WLAN Adapter Install WPA Supplicant sudo apt-get install wpasupplicant See http://en.wikipedia.org/wiki/Wpa_supplicant Check for the USB adapter sudo lsusb This should show output similar to this (depending on your USB adapter) Bus 001 Device 004: ID 0bda:8176 Realtek SemicondRTL8188CUSuctor Corp. 802.11n WL:AN Adapter Generate PSK Key If you want to use the cleartext PSK you could probably skip this step. wpa_passphrase YOUR_SSID YOURCLEARTEXTWPAKEY This should show output similar to this: network={ ssid="YOUR_SSID" #psk="YOURCLEARTEXTWPAKEY" psk=c885c4288a0c68b989289586cb075c0ccd1729d2c035820d02ed813fc729f317 } Edit network configuration sudo vim /etc/network/interfaces auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid "YOUR_SSID" wpa-psk c885c4288a0c68b989289586cb075c0ccd1729d2c035820d02ed813fc729f317 Finish off sudo shutdown -h now Unplug ethernet cable Power up the RPi and you should see another wireless DHCP assignment on the router

Continue ReadingDropping the wires on the Raspberry PI

Nokia Bluetooth Keyboard on Android

One of my oldest pieces of hardware is a trusty Nokia SU-8W Bluetooth Keyboard. I have tried to revive it on an Android 1.6 & 2.0 device with not much luck. However I got it working successfully on a Gingerbread (2.3.4) Google Nexus S. Pre-requisites SU-8W Manual (http://nds1.nokia.com/phones/files/guides/Nokia_SU-8W_Wireless_Keyboard_UG_en.pdf) BlueKeyboard JP (https://market.android.com/details?id=elbrain.bluekeyboard.ime) Steps Install the BlueKeyboard JP from the Android Market Go to Settings > Wireless & Networks > Bluetooth Settings Scan for devices and click to pair the Nokia SU-8W Enter a passcode (I used the highly inventive 0000 combinaton) on the phone and click 'OK' Enter the same on the SU-8W (need to use green 'fn' keys for numbers) and hit enter The phone should show the Nokia SU-8W as paired but not connected Go to Settings > Language & keyboard > BlueKeyboard JP Settings Select the Nokia SU-8W as the keyboard and make any other changes you might need Click the 'Back' symbol and tick the option box to enable the 'BlueKeyboard JP' keyboard In any data entry field (i.e. GMail) hold the finger on the input box and click 'Input method' and select BlueKeyboard JP Wait for the keyboard to connect.   Enjoy !  

Continue ReadingNokia Bluetooth Keyboard on Android