How to design Mobile App to connect to MQTT Broker

0
  • I am trying to make professional app. User purchases our IoT device. It connects to the IoT device with the mobile application we developed. I am able to design my IoT(ESP32) device to connect AWS IoT with JITR feature. The IoT device can successfully connect to the cloud with own certificate associated our CA. Also Every IoT device will have a unique policy generated automatically by Lambda function.
  • There is no problem with the above steps.
  • The user will sign in to the mobile application to connect our IoT device. How can I pair this user with the own IoT device? Thus user is able to control IoT device, even if sign in from another phone. Do I have to do anything in AWS console for this(like creating Lambda function)? Is there such an example android code or blog?
  • Should IoT device send own certificate and thing ID to the mobile application via Bluetooth? But in this case, IoT will have to send it again when user sign in from the other phone.
  • We gonna use only Pub/Sub method(not shadow)
3개 답변
1

You need to authenticate the mobile user to use MQTT. You can use Cognito to do this. This Blogpost describes this in more Detail: https://aws.amazon.com/blogs/iot/configuring-cognito-user-pools-to-communicate-with-aws-iot-core/

AWS
Marco
답변함 2년 전
1

Have a look at this blog where i guide you through on setting this up using BLE and iOS app: https://aws.amazon.com/blogs/iot/connecting-with-mobile-ble-to-aws-iot-core-using-freertos-and-nordic/

AWS
답변함 2년 전
0

How are your web application users being authenticated?. If using Cognito with API Gateway then the userId is provided in the request to your backend. You could map the userId and the deviceIds in a DynamoDB table. This allows the user to access its devices, independently of the device he uses for login.

Hope this may help.

Best regards,

jgg
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠