I am working with two boards having ESP32-WROOM-32U and I am using the example code of ESP-IDF-v3.1.3(examples/protocols/aws_iot). I have an AWS account which I am using for communication between board and server. I am facing a problem in data communication between the AWS server and my boards.
Trying to do:-
So when I am publishing from the server, both my boards are subscribing and getting the data sent from the server. But I want one-on-one communication.
I am trying the following things:
1. I have created an AWS account in which we created two IOT-things with different names and used the IOT-thing names as client ID for the two different board.
2. I have downloaded the AWS-root-ca certificate, Private key(`xxxx-private.pem.key`) and the Certificate file(`xxxx-certificate.pem.crt`) related to the two IOT-things. These keys I have loaded into the respective ESP32 boards by embedding the certificates into the app binary.
3. I have tried attaching different policies(one by one) to the IOT-things. Below are the policy document that I tried
a. policy document 1
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:*",
"Resource": "*"
}
]
}
b. policy document 2
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:Connect",
"Resource": "arn:aws:iot:us-west-2:157123841039:client/DEVICE2"
}
]
}
c. policy document 3
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iot:Connect",
"iot:Publish",
"iot:Subscribe"
],
"Resource": "arn:aws:iot:us-west-2:157123841039:thing/DEVICE1"
}
]
}
4. I am using same topic in both the IOT-things and different certificates are being used.
5. At the time of AWS connection, the devices are getting connected to the respective IOT-things which I am monitoring in the AWS activity window of the respective IOT-things. But while publishing the data from the server(from any IOT-thing MQTT client window) the data is getting received by both the two boards. And while I am publishing data form any one board, data is received on both the consoles of both the IOT-things in the MQTT Client window.
Is there any way in which I can make the communication one-on-one between the AWS server and respective board so that when I am publishing from the server both the boards should not get the data. And when I send data from my board can it be visible only on the particular MQTT client window for which I sent the data ?
Please help me with this issue. Thank You.
ESP32 AWS Data Communication Issue
-
- Posts: 7
- Joined: Wed May 15, 2019 7:36 am
Return to “General Discussion”
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: joglz8 and 169 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.