Program worked one day, but after the weekend and a reboot it broke.
So I currently have PHP program using PHP serial to send a TAP protocol message to a paging system. The PHP program calls a python program in order to get information from another serial port. This was working on Friday, but then I shutdown the server and went home for the weekend. I came back in today and booted it back up to find my program no longer works. On Friday I remember I started the GUI and got some error about access denied to the port that talks to the paging system.
Does anyone know why my program worked one day but not the other? Edit: So I swapped the ports, I had receiver on ttyS0, and pager on ttyUSB0. I swapped these around and edited the program to reflect the swap and everything worked. Anyone know how this solved the problem so don't have to do that swap in the future. It's fine for testing, but not for the final solution. |
Have you done a scan for gremlins?
scan gremlins |
Accidental working doesn't prove your program being good. So simply you have a problem to solve.
|
Quote:
|
Quote:
|
Quote:
|
So if I write a python script that runs at the start and opens the port that is connected to the paging system and then close it everything works as intended. So logically there must be an issue with PHP serials opening of the port for the first time or something that I am missing.
Perhaps I will remove PHP using serial all together then. |
Quote:
Quote:
Quote:
|
@proN00B: Welcome to LQ Programming forum.
Please keep posts in the Programming forum on topic and limit the amount of banter in response to other's questions. From the LQ Rules: Quote:
|
It might help knowing the distribution / version you are running.
Without knowing anything about the PHP program, serial port php class or your python script it is impossible to say what is wrong. At face value /dev/ttyS0 would indicate a hardware device and I find it strange that whatever was connected to it one day would change the next. Quote:
|
You do get issues with ports being reserved and reassigned - are devices always guaranteed to be the same number each time? Especially if connections are not closed at the right time.
|
All times are GMT -5. The time now is 12:13 PM. |