digi.xbee module is really slow when using threading

Viewed 14

I have two devices connected to my pc, and I want to configure my DigiMesh device (one is on transparent mode and one is on API mode) I want to send Remote AT commands to the transparent device and AT commands to the API mode device. In my system I first open the connection to classify the devices to find the MAC address and COM automatically for this, I open a connection to them, get the data and close it.

when I run my test script that configures them, after opening a couple of threads, the time of the AT and Remote AT commands increases drastically, and also is not very stable and sometimes doesn't work, in addition to the opening of the device (DigiMeshDevice.open()) takes a long time and most of the time, timeouts. When I run it before the threads it works perfectly.

When looking in the task manager before running the threads and after, the CPU usage didn't go up by much, so I don't think it's a resource problem, do you have any idea what can cause this? Do I need to move to multiprocessing instead? Can this be related to the USB drivers or something like that?

0 Answers
Related