<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>電子資料>連接到AWS IoT的RIOT-OS應用程序

連接到AWS IoT的RIOT-OS應用程序

2023-06-29 | zip | 0.08 MB | 次下載 | 免費

資料介紹

描述

請注意,本教程假設您使用的是 Linux PC。

先決條件

這個項目建立在這個項目中開發的云基礎設施之上。

1-您必須遵循以下步驟:

2-您必須安裝 Git。如果沒有安裝 Git,可以在這里下載。

搭建 MQTT-SN 透明網關

1- 打開終端并運行以下命令來設置網關:

> git clone -b experiment https://github.com/eclipse/paho.mqtt-sn.embedded-c
> cd paho.mqtt-sn.embedded-c/MQTTSNGateway
> make SENSORNET=udp6
> make install
> make clean

2-打開gateway.conf文件并以這種方式編輯內容:

#**************************************************************************
# Copyright (c) 2016-2019, Tomoaki Yamaguchi
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Eclipse Distribution License v1.0 which accompany this distribution.
#
# The Eclipse Public License is available at
#    http://www.eclipse.org/legal/epl-v10.html
# and the Eclipse Distribution License is available at
#   http://www.eclipse.org/org/documents/edl-v10.php.
#***************************************************************************
#
# config file of MQTT-SN Gateway
#

#BrokerName=mqtt.eclipse.org
#BrokerPortNo=1883
#BrokerSecurePortNo=8883

BrokerName=localhost
BrokerPortNo=1884
#BrokerSecurePortNo=8883

#
# When AggregatingGateway=YES or ClientAuthentication=YES,
# All clients must be specified by the ClientList File  
#

ClientAuthentication=NO
AggregatingGateway=NO
QoS-1=NO
Forwarder=NO

#ClientsList=/path/to/your_clients.conf

PredefinedTopic=NO
#PredefinedTopicList=/path/to/your_predefinedTopic.conf

#RootCAfile=/etc/ssl/certs/ca-certificates.crt
#RootCApath=/etc/ssl/certs/
#CertsFile=/path/to/certKey.pem
#PrivateKey=/path/to/privateKey.pem

GatewayID=1
GatewayName=PahoGateway-01
KeepAlive=900
#LoginID=your_ID
#Password=your_Password


# UDP
GatewayPortNo=10000
MulticastIP=225.1.1.1
MulticastPortNo=1883

# UDP6
#GatewayUDP6Bind=FFFF:FFFE::1
GatewayUDP6Bind=fec0:affe::1/64
#GatewayUDP6Port=10000
GatewayUDP6Port=1885
GatewayUDP6Broadcast=FF02::1
GatewayUDP6If=wpan0

# XBee
Baudrate=38400
SerialDevice=/dev/ttyUSB0
ApiMode=2

# LOG
ShearedMemory=NO;

基本上,您必須配置 MQTT 部分(我們將與之交互的代理,在我的情況下它是一個localhost并在1884端口中運行)。

poYBAGN7H8eAO21nAAAXbCsNWBA451.png
?

另一件重要的事情是您必須綁定 upd6 地址(fec0:affe::1/64與您在 RIOT-OSREADME文件中看到的用于 MQTT-SN 連接的地址相同)和端口(1885是允許您從 RIOT 接收消息的端口實例)。

poYBAGN7H82AcjmoAAA2dDKToII692.png
?

3- 要執行網關,請從安裝 Paho 的目錄打開終端并運行以下命令:

> ./MQTT-SNGateway

將 Mosquitto MQTT 代理橋接到 AWS IoT

1- 安裝 Mosquitto 代理。你可以在這里下載。

2- 現在,您需要配置網橋,以便 Mosquitto 代理可以創建到 AWS IoT 的連接。為此,您必須創建一個新mosquitto_bridge.conf文件并在其中寫入以下行:

# =================================================================
# Bridges to AWS IOT
# =================================================================

# AWS IoT endpoint
connection awsiot
address a6as4ru7uhh5u-ats.iot.us-east-1.amazonaws.com:8883

# Specifying which topics are bridged
# topic awsiot_to_localgateway in 1
# topic localgateway_to_awsiot out 1
# topic both_directions both 1
topic sensor/values both 1

# Setting protocol version explicitly
bridge_protocol_version mqttv311
bridge_insecure false

# Bridge connection name and MQTT client Id,
# enabling the connection automatically when the broker starts.
cleansession true
clientid bridgeawsiot
start_type automatic
notifications false
log_type all

# =================================================================
# Certificate based SSL/TLS support
# -----------------------------------------------------------------
#Path to the rootCA
bridge_cafile ./AWS-certs/rootCA.pem

# Path to the PEM encoded client certificate
bridge_certfile ./AWS-certs/fc278d0e63-certificate.pem.crt

# Path to the PEM encoded client private key
bridge_keyfile ./AWS-certs/fc278d0e63-private.pem.key

用您自己的端點替換此部分很重要:

pYYBAGN7H9CAaOuAAAAjXmNQIGo375.png
?

在這里你必須插入你的證書的路徑:

poYBAGN7H9KAaWOyAAB3DI1QTzs251.png
?

請記住,您已在步驟中下載并保存了證書:

poYBAGN7H9SAQzSrAACOoW-Ie-c654.png
?

3- 要在端口上運行 Mosquitto 代理1884,請從配置文件的根目錄打開終端,然后執行以下命令:

> sudo mosquitto -c ./mosquitto_bridge.confp 1884

防暴應用

初步要求

您必須已安裝:


下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1山景DSP芯片AP8248A2數據手冊
  2. 1.06 MB  |  532次下載  |  免費
  3. 2RK3399完整板原理圖(支持平板,盒子VR)
  4. 3.28 MB  |  339次下載  |  免費
  5. 3TC358743XBG評估板參考手冊
  6. 1.36 MB  |  330次下載  |  免費
  7. 4DFM軟件使用教程
  8. 0.84 MB  |  295次下載  |  免費
  9. 5元宇宙深度解析—未來的未來-風口還是泡沫
  10. 6.40 MB  |  227次下載  |  免費
  11. 6迪文DGUS開發指南
  12. 31.67 MB  |  194次下載  |  免費
  13. 7元宇宙底層硬件系列報告
  14. 13.42 MB  |  182次下載  |  免費
  15. 8FP5207XR-G1中文應用手冊
  16. 1.09 MB  |  178次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234315次下載  |  免費
  3. 2555集成電路應用800例(新編版)
  4. 0.00 MB  |  33566次下載  |  免費
  5. 3接口電路圖大全
  6. 未知  |  30323次下載  |  免費
  7. 4開關電源設計實例指南
  8. 未知  |  21549次下載  |  免費
  9. 5電氣工程師手冊免費下載(新編第二版pdf電子書)
  10. 0.00 MB  |  15349次下載  |  免費
  11. 6數字電路基礎pdf(下載)
  12. 未知  |  13750次下載  |  免費
  13. 7電子制作實例集錦 下載
  14. 未知  |  8113次下載  |  免費
  15. 8《LED驅動電路設計》 溫德爾著
  16. 0.00 MB  |  6656次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935054次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537798次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420027次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234315次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191187次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183279次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138040次下載  |  免費
亚洲欧美日韩精品久久_久久精品AⅤ无码中文_日本中文字幕有码在线播放_亚洲视频高清不卡在线观看
<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>