Send command to multiple hub at the same time. #355
-
Hello all, Is it possible to send a command to multiple hub at the same time the same way as I can to multiple ports on a hub. I'm running multiple hubs (4) on a RP3 B+. Right now I run the command for each hub one after the other and this creates a pretty long delay when sending the command. I know I can can to multiple ports on the same hub. os.sytem ("sudo ./uhubctl -a 1 -l 1-1.3 -p 1,2") How can I run these two lines at the same time? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
That would require completely changing command line syntax. And even if it did support it, it wouldn't make it any faster as uhubctl would process it serially. Instead, I recommend you to call uhubctl from multiple threads of your application targeting separate hubs - that would make it get your result faster overall. |
Beta Was this translation helpful? Give feedback.
-
For future reference. This works perfectly to open multiple ports on multiple hub at the same time. import os def BLUEon(): def BLUEoff(): def BLUEon1( threadName, delay ): SwitchBleu = Button(6) |
Beta Was this translation helpful? Give feedback.
That would require completely changing command line syntax. And even if it did support it, it wouldn't make it any faster as uhubctl would process it serially.
Instead, I recommend you to call uhubctl from multiple threads of your application targeting separate hubs - that would make it get your result faster overall.