Pi Minimal_Cayenne_Gateway - SteveCossy/IOT GitHub Wiki

1/. Pi Lite Image

sudo apt-gcolspan="2"et update sudo apt-get upgrade -y

sudo raspi-config Configure: Option 5 – Interface Options P2 – to Enable SSH (this is now set OFF by default with Jessie ) Option 5 – Interface Options P3 – VNC to Enable VNC (VNC is Very handy, Any OS device reader ) Option 5 – Interface Options P6 – No to enable login shell over serial port

Then select YES to Enable the Serial Port Option 7 – Advanced Option A5 – VNC remote video resolution recommend 16 for starters (optional)

Exit the Raspi-Config utility and choose Yes to reboot or Manually reboot the Pi using

sudo reboot

2/. Serial Port Taming and Configuration – Optional but a Vital tool for debugging… sudo apt-get install minicom -y

Start a serial terminal session on the GPIO pins serial port at 2400 baud for a Raspberry Pi 3, Pi 0, Pi 0w minicom -b 2400 -o -D /dev/ttyS0

Or for earlier Raspberry - Pi B, B+, 2

minicom -b 2400 -o -D /dev/ttyAMA0

do a loop back test by short circuit looping pins 8 (Tx Out From Pi Data) looped to pin 10 (Rx InTo Pi Data) Type something and you will see it on the screen as you type.

3/. Prereq esp if running Rasparian ‘Lite’ image then…

sudo apt-get install git

sudo apt-get install python-serial sudo apt install python-pip

sudo apt install python3-pip

pip install cayenne-mqtt

4/. To make Cayenne MQTT work

git clone https://github.com/myDevicesIoT/Cayenne-MQTT-Python

cd Cayenne-MQTT-Python

sudo python setup.py install

~ Andrew 2020 0911