This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to config MQTT Broker on Thread Border Router to AWS

Hi all,

I am using Thread SDK3.1 and running successfull with MQTT-SN example (Border Router + 1 MQTT public + 1 MQTT subscribe)

Now, I want to change MQTT broker from paho to AWS.

I modified paho-mqtt-sn-gateway.conf to 

#**************************************************************************
# Copyright (c) 2016, 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
# IPv4 Address of iot.eclipse.org
BrokerName=52.26.126.221
BrokerPortNo=1883
BrokerSecurePortNo=8883

ClientAuthentication=YES
#ClientsList=/path/to/your_clients.conf

RootCAfile=/etc/ssl/certs/AmazonRootCA1.pem
RootCApath=/etc/ssl/certs/
CertsFile=/etc/ssl/certs/09b40e94f9-certificate.pem.crt
PrivateKey=/etc/ssl/certs/09b40e94f9-private.pem.key

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

# UDP
GatewayPortNo=10000
MulticastIP=225.1.1.1
MulticastPortNo=8883

# GatewayUDP6Broadcast address is set to all Thread devices address
# in order to enable Thread Sleepy Devices to receive multicast messages
# sent from the gateway.
# UDP6
GatewayUDP6Port = 47193
GatewayUDP6Broadcast = ff33:40:fdde:ad00:beef:0:0:1
GatewayUDP6If = wpan0

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

# LOG
ShearedMemory=NO;

But 2 Node send "CONNECT" message fail to MQTT-Gateway (Border Router).

52.26.126.221 obtained by switching from my thing : xxxxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com

So, please show me a solution.

Thank very much !!

Parents
  • Hi Giang,

    I am not familiar with AWS from before unfortunately, but I would start by sniffing the traffic between the raspberry pi and the cloud and check what exactly is send back from the cloud, maybe there is an error code or something?
    Did you find a tutorial for setting up the AWS? Can you share the link to that? You should check if you using the right getaway configuration and make sure you are using the right IP address and ports.

    Did you test the example using Eclipse's paho as default, did that work fine or did you have trouble with that as well?

    Best regards,

    Marjeris

  • Hi ,

    I tested with paho as default, it work fine. But paho not use ssl and certificate. So It simple. Now I want use AWS. It use ssl and certificate.

    The first, I create my thing (broker) on AWS as below link : 

    https://www.youtube.com/watch?v=y6W9QfiEY2E

    Next, I download certificate and test connection with MQTT Fx software. I can pub, sub success.

    Next, I modify paho-mqtt-sn-gateway.conf to AWS as above post and copy certificate to raspi.

    But I don't success for test. Cli node can't connect to MQTT Gateway.

    How I can see debug from rasberry pi ?

    Can you try connect to AWS and show me solution ? Thank !!

Reply Children
No Data
Related