I have the following scenario:
- Rasperry pi connected to a device via Serial port
- 3g Dongle connected to the raspberry (with the ability to make/recieve calls)
- One process reading the data from the serial port and redirecting it to a server (using 3g)
- Another process waiting for a incoming call, and when someone calls the program takes the data from the serial port and redirect it via the 3g dongle using AT commands ( like fax-call). When someone calls, the call is made using AT commands and the caller should be able to "speak" with the final device connected to the serial port.
The problem is that the two processes can not live together since they are using the same serial port, and when one process is already started, the other can not read the data from the serial (port busy).
Is there a way to achieve this ? Can i make like a "fake" serial port, or something that redirects the data?
Thank you very much