Answer the question
In order to leave comments, you need to log in
One serial port and multiple web connections - how (php, python, ..)?
Colleagues,
I have a small web server on a mini device (OpenWRT Linux, Carambola2) that needs to read from (and write to) the serial port. There is only one port, but several clients (via a browser) can be connected. This means that it is necessary to make sure that the changes recorded by one client are automatically displayed for the others, as well as that there are no collisions when reading-writing from the port. php or python are seen as the environment. Both have components for working with the port, but for some reason there are no ready-made solutions for such multithreading.
Where to dig?
Answer the question
In order to leave comments, you need to log in
Organize a command queue. Notify clients via websocket. All this can be easily done on twisted + cyclone.io for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question