ThingsBoard + Raspberry Pi + Thingy52

Gatewayhtml

https://thingsboard.io/docs/iot-gateway/install/rpi/node

host :"IP"linux

accessToken: "token"git

remoteConfiguration: truegithub

Delete extentionssql

 

sudo chown thingsboard:thingsboard tb-gateway.ymlapache

http://www.treselle.com/blog/thingsboard-gateway-iot/json

 

======================tcp

================ide

In raspberry Pi, tb-gateway:

/etc/mosquitto: mosquitto.conf

        port 8883

/etc/tb-gateway/conf: tb-gateway.yml

        mqtt:

          enabled: true

            configuration: mqtt-config.json

/etc/tb-gateway/conf: mqtt-config.json

                            port: 8883

 

In Thingsboard server:

/etc/mosquitto: mosquitto.conf

        port 8883

/etc/thingsboard/conf: thingsboard.yml

                         mqtt, port 1883

In upload mqtt example json file:

                         mqtt, port: 8883

 

Command in Gateway:

 mosquitto_pub -h localhost -p 8883 -t "sensors" -m '{"serialNumber":"SN-001", "model":"T1000", "temperature":36.6}'

 產生公鑰密鑰:https://blog.csdn.net/ustccw/article/details/76905459#t8

sudo tcpdump -nvX src net *.*.*.* and dst net *.*.*.* 查 traffic

 

================Cassandra==================

installation: http://cassandra.apache.org/download/

 

https://f.ruuvi.com/t/integrating-ruuvitag-with-thingsboard-iot-platform/505/7

 

Configure Cassandra as main data storage: https://thingsboard.io/docs/user-guide/install/linux/#optional-configure-thingsboard-to-use-the-external-database

 

sudo service thingsboard restart

csqlsh < describe keyspaces;

csqlsh < select * from system_schema.tables where keyspace_name = 'thingsboard';

csqlsh < use thingsboard;

csqlsh < select * from ts_kv_cf;

 

===============Thingy52 node.js mqtt===============

 Add certificate:

https://gist.github.com/pcan/e384fcad2a83e3ce20f9a4c33f4a13ae

================ Implement mqtt over SSL in thingsboard =============

https://thingsboard.io/docs/user-guide/mqtt-over-ssl/

https://thingsboard.io/docs/user-guide/certificates/

 第三方嗅探 sniffing:

Arpspoof -i eth0 -t 172.19.80.83 (Pi, Gateway) 172.19.80.25 (sat-iot, Server): This command is used to let the network traffic between the gateway and the server can also go through the third server (sat-asset)

Sudo tcpdump -i eth0 -s 0 -XX -vv dst port 1883 and dst host 172.19.80.25

 SSl/TLS 協議運行概述:

http://www.ruanyifeng.com/blog/2014/02/ssl_tls.html

 雙向ssl驗證以下: https://thingsboard.io/docs/user-guide/certificates/

相關文章
相關標籤/搜索