Hi @Sai Devaraj Manoharan Thank you for posting the question here.
only one connection can be done to single device at a time
Your understanding is correct that the device connection string can be used by only one application. If two applications try to connect using this string, one of them disconnects.
if it is not possible any other option available like backend
You can use the IoT Hub Service Client which uses IoT Hub Service connection string from Shared Access policy to establish a connection. Please refer the below image for reference.
Using the service client, you can send the cloud to device message. Here is a reference snippet of the method that sends the message.
private async static Task SendCloudToDeviceMessageAsync()
{
var commandMessage = new
Message(Encoding.ASCII.GetBytes("Cloud to device message."));
await serviceClient.SendAsync(targetDevice, commandMessage);
}
For more details, please refer to the article section Send a cloud-to-device message. If you prefer a Python implementation, for the Azure function Cloud to device message, please refer here
You can then use the device connection string to receive this message from your Python application.
Hope this helps! Please let us know if you have any additional questions or need further assistance.
If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.