I am a beginner to MQTT and IoT, but I am experimenting with a project to see if MQTT is a possible solution. We have some scanners and other peripheral devices on a factory floor. We use AWS, so I'm looking into using AWS IoT Greengrass to orchestrate communication from these devices. I understand that I can set up an MQTT core device as an EC2 instance and have full control of that.
However, I'm not sure if I can really access the operating system of the devices. For some of them, I think I may have an option to turn on "MQTT forwarding" through a Windows tool, and I can set an MQTT topic, but this hardly seems enough to set up this device as a client device. From my understanding, when setting up a client device for IoT Greengrass, I'd need to actually access the OS and install IoT SDKs + programs + certificates onto the device itself.
My question is this: is it a definitive prerequisite that I'll need access to a device's OS in order to set it up as an IoT client device? If I don't have access to the OS, is that a deal breaker?
Even if MQTT is "enabled" on a device, doesn't the device need a Python/Java/Lambda running on the device in order to control the MQTT payload? The MQTT payload can't be static. Please correct me if I'm wrong.
I tried going through AWS IoT tutorials but the client device is either virtual, which I can access, or the client device is a Raspberry Pi. These make sense as I can directly access it, but my device IRL is a barcode scanner. Seems like a basic prereq but i can't find a definitive answer in IoT docs. Thanks!
Yes, client devices will need the ability to send and receive MQTT messages. For example, you could use the AWS IoT SDK, which requires Python on the device, as well as the client device's IoT Thing certificate.
https://docs.aws.amazon.com/greengrass/v2/developerguide/test-client-device-communications.html#test-client-device-communications-python
So it seems like the peripheral devices themselves can't be client devices directly.
However, you could setup some other device (e.g. raspberry pi) as a client device, which would be responsible for communicating with the sensors and forwarding their data to the MQTT broker.