-
Notifications
You must be signed in to change notification settings - Fork 3
Raspberry PI
This readme explains the installation of Raspberry PI, Node.js and the Streembit Zigbee Gateway.
Burn the latest Raspbian OS to a micro SD card.
https://www.raspberrypi.org/documentation/installation/installing-images/
Add an ssh file to the Raspbian boot image at the SD card. Step 3 in this tutorial: https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0
List the available WiFi networks
sudo iwlist wlan0 scanEdit the WiFi configuration file
sudo nano /etc/wpa_supplicant/wpa_supplicant.confSet the SSID and WPA-PSK password
network={
ssid="YOUR_WIFI_NETWORK"
psk="WIFI_NETWORK_PASSWORD"
}
ifconfig wlan0If you are connected the "inet addr" should be a 192.168.xxx.xxx IP address
wlan0 Link encap:Ethernet HWaddr 74:da:38:2b:1c:3d
inet addr:192.168.1.216 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::8727:5526:a190:b339/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6917 errors:0 dropped:229 overruns:0 frame:0
TX packets:2931 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10001000 (9.5 MiB) TX bytes:295067 (288.1 KiB)
Login to the Raspberry PI via SSH using your Linux/MAC SSH client or PUTTY on Windows. If you don't have access to the router to lookup the IP address, use the Advanced IP Scanner application to find your Raspberry PI device http://www.advanced-ip-scanner.com.
The default user name: pi, password: raspberry. Once you logged in via SSH:
sudo raspi-config-
Enable SSH: select Interfacing Options. Navigate to and select SSH, and select "Yes".
-
Enable serial port: select Interfacing Options. Navigate to Advanced Options/Serial set "No" to “Would you like a login shell to be accessible over serial?” and select "Yes" to Would you like the serial port hardware to be enabled?" question. Refer to the "For latest Jessie version" section at https://hallard.me/enable-serial-port-on-raspberry-pi/
Check the available serial ports and serial port aliases.
ls -l /devttyS0 should be listed in dev directory.
To take advantage of the latest Node.js framework we suggest you install Node.js from source.
sudo apt-get updatesudo apt-get install build-essential checkinstallcd /usr/local/srcDownload the latest Node.js source. Substitute 9.10.0 with the latest Node.js version number.
sudo wget https://nodejs.org/dist/v9.10.0/node-v9.10.0.tar.gzsudo tar -xvzf node-v9.10.0.tar.gzcd node-v9.10.0sudo ./configuresudo make installnode -vThe version should be 9.10.0
sudo npm install -g pm2 Install git.
sudo apt-get install git