简体   繁体   中英

How to figure out the country of a device connected to AWS IoT Core

Hey Stackoverflow crowd,

does anybody know a mechanism on how to identify the country in which a device connected to AWS IoT core is located? Is it possible to get this information out of the box or do I need to implement this manually by storing the country information in an attribute when provisioning the device?

Thanks a lot and best regards The Smart Home Maker

Not sure what you mean on getting information out of the box,- I don't know about any possibility to detect country in AWS IoT core without adding this information manually.

There are at least two ways how you can achieve this:

  • As you mention - save this information in attribute on device. But this can be not very handy if you manage some dynamic installations of devices as example,- in case of changing location every device should be updated (and not all devices can store this).

  • Example that we using in our solution - Enrich event on the fly by AWS IoT Core rule and DynamoDB. Here the idea is:

    • every device can be identified by MAC or SN as example (we setting this to topic name).
    • DynamoDB with device list (indexed by SN or MAC) - which is holding information you want to add to event.
    • AWS IoT core rule that getting every incoming event, on the fly requestion dynamoDB for additional info using get_dynamodb() , adding this to event and follow with action (as example republish to different topic).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM