ATLib
ATLib copied to clipboard
I'm gettign Timout expcetion often, should I close modem and serial for each command or keep it open ? my app sould be run 24h/24 7d/7
my app sould be run 24h/24 7d/7 I'm gettign Timout expcetion often, should I close modem and serial for each command or keep it open ?
I think in order to receive SMS messages, the serial port must be open. It would be nice if the application had a service to periodically check the availability of the serial port.
I got the same error several times, but I can't pinpoint the specific timeout issue. I tried sending AT commands using SerialPort.Write() (without ATLib) and it works fine.
You should not need to close the modem connection between commands. What modem do you use? Does it happen after a certain command?
Modem : Fona USB : Huawei e303
Hello, I was also getting a lot of Timeout exceptions because i was sending too much commands to the channel. Then i have tried to use semaphores to get exclusive access between sending each commands and everything seems to work. However I am not sure if this is right solution (or solution at all).
I was looking to source code specifically AtChannel.cs
there is a waitingForCommandResponse semaphore to check for timeout but it is after sending the command itself. As I understood many calls of this method can be done and many commands can be then sent simultaneously. Can this cause the issue? I am not expert on serial communication so can't tell if this could be a problem or not.