Hi,
I am starting my R&D on ESP32 modules with the ESP32-EVB.
I have loaded the subscribe_publish esp-idf example. I have setup device as per aws/esp requirements, and set the app config.
The device is completing the connection procedure and I can see publish events coming in on the AWS MQTT test page from the device.
However, I cannot seem to get the device to receive any published messages. The subscribe callback is never called. I can confirm the subscription is at least initially connected, as if I change the policy to a different sub topic, the unit does not connect.
Have tried different topics as well as separate pub and sub topics.
Is there some sort of filtering happening? Or is the subscribe just not working?
Cheers,
Grant
AWS Pub/Sub example - Subscribe not getting test messages
-
- Posts: 2
- Joined: Mon Apr 09, 2018 3:32 am
-
- Posts: 2
- Joined: Mon Apr 09, 2018 3:32 am
Re: AWS Pub/Sub example - Subscribe not getting test messages
I have figured out the issue. For anyone else that may run into this, it was a policy/permissions issue on AWS server-side.
In the policy setup, I tried to only allow permissions to subscribe/publish the specific topic 'test_topic/esp32'
The way policy file is written, there is a different format for subscribe and publish rules (topic/topicfilter). I couldn't get a multi-level subscribe rule working.
Using a 'wildcard' policy (allow all iot related actions) allowed sub/pub on all topics and I received the messages published from the test platform with the ESP32.
In the policy setup, I tried to only allow permissions to subscribe/publish the specific topic 'test_topic/esp32'
The way policy file is written, there is a different format for subscribe and publish rules (topic/topicfilter). I couldn't get a multi-level subscribe rule working.
Using a 'wildcard' policy (allow all iot related actions) allowed sub/pub on all topics and I received the messages published from the test platform with the ESP32.
Code: Select all
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iot:Publish",
"iot:Connect",
"iot:Receive",
"iot:Subscribe",
"iot:GetThingShadow",
"iot:DeleteThingShadow",
"iot:UpdateThingShadow"
],
"Resource": [
"*"
]
}
]
}
Re: AWS Pub/Sub example - Subscribe not getting test messages
Hello,there is the demo for ardunio .Actually,I made it work well.https://exploreembedded.com/wiki/AWS_IO ... uino_ESP32 The source code is at the bottom.
Who is online
Users browsing this forum: Bing [Bot] and 73 guests