Skip to content

Instantly share code, notes, and snippets.

@pottava
Created January 30, 2018 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pottava/e09bce2bb4bd5dad72af2d51ec947974 to your computer and use it in GitHub Desktop.
Save pottava/e09bce2bb4bd5dad72af2d51ec947974 to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get -y upgrade
cat /etc/debian_version
sudo reboot
sudo rpi-update
sudo raspi-config
raspistill -o image.jpg
rsync -av -e ssh --progress --partial --append pi@192.168.0.1:/home/pi/image.jpg .
# AWS IoT
sudo apt-get -y install git
git clone https://github.com/aws/aws-iot-device-sdk-embedded-C.git -b release
cd aws-iot-device-sdk-embedded-C/external_libs/CppUTest/
git clone https://github.com/cpputest/cpputest.git
mv cpputest/* ./
rm -rf cpputest
cd ../mbedTLS/
git clone https://github.com/ARMmbed/mbedtls.git
mv mbedtls/* ./
rm -rf mbedtls
rsync -av -e ssh --progress --partial --append ./certs \
pi@192.168.0.1:/home/pi/aws-iot-device-sdk-embedded-C
sudo apt-get -y install vim
cd ~/aws-iot-device-sdk-embedded-C/samples/linux/subscribe_publish_sample/
vim aws_iot_config.h
```
#define AWS_IOT_MQTT_HOST "xxx.iot.ap-northeast-1.amazonaws.com"
#define AWS_IOT_MQTT_PORT 8883
#define AWS_IOT_MQTT_CLIENT_ID "RaspberryPi-xxx"
#define AWS_IOT_MY_THING_NAME "RaspberryPi-xxx"
#define AWS_IOT_ROOT_CA_FILENAME "root-CA.pem"
#define AWS_IOT_CERTIFICATE_FILENAME "yyy-certificate.pem.crt"
#define AWS_IOT_PRIVATE_KEY_FILENAME "yyy-private.pem.key"
```
make -f Makefile
./subscribe_publish_sample
# AWS Greengrass
sudo apt-get -y install sqlite3
sudo apt-get -y install cmake
sudo vim /etc/apt/sources.list.d/raspi.list
sudo apt-get -t jessie-backports install libssl-dev
vim /etc/sysctl.d/98-rpi.conf
sudo apt-get -y install oracle-java8-jdk --fix-missing
sudo ln -s /usr/bin/java /usr/bin/java8
sudo apt-get -y install nodejs
sudo ln -s /usr/local/bin/node /usr/bin/nodejs6.10
sudo apt-get -y install npm
sudo npm -g install n
sudo n stable
sudo modprobe configs
sudo reboot
git clone https://github.com/aws-samples/aws-greengrass-samples.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment