app_rpt, when run in a raspberry pi 3B+ using chan_usbradio, does not run rpt fun commands.
This issue is caused by the ast_waitfor_nandfds function, used in rpt() and rpt_exec(), returning an active channel each time through the loop. This results in the loop not calculating the elapsed milliseconds properly. It is always calculating that no time has expired. There is a 20 millisecond wait used for ast_waitfor_nandfds; however it returns immediately with an active channel with no time expired. The ultimate result is that none of the internal app_rpt timers run.
I tested chan_simpleusb and pseudo and they did work properly. I did not check to see if the loop timing was correct with these channel drivers.
It appears to me that we should not be using ast_waitfor_nandfds to time the loop. I propose and have tested a solution that uses ast_tvnow() to calculate the elapsed time. This results in accurate calculations for elapsed time. As a result, the internal timers now run properly.
I will note that my dell 3040 does not exhibit this problem. The dell 3040 is more like a raspberry pi 4, although running 64 bit. I have confirmed with another ASL3 tester that app_rpt with chan usb_radio does work properly on a raspberry pi 4.
I will further note that I presently have an old version of app_rpt running on the raspberry pi 3B+ with chan_usbradio with no issues. Something is different in the ASL3 code base or the newer linux version that causes this issue.
app_rpt, when run in a raspberry pi 3B+ using chan_usbradio, does not run
rpt fun
commands.This issue is caused by the ast_waitfor_nandfds function, used in rpt() and rpt_exec(), returning an active channel each time through the loop. This results in the loop not calculating the elapsed milliseconds properly. It is always calculating that no time has expired. There is a 20 millisecond wait used for ast_waitfor_nandfds; however it returns immediately with an active channel with no time expired. The ultimate result is that none of the internal app_rpt timers run.
I tested chan_simpleusb and pseudo and they did work properly. I did not check to see if the loop timing was correct with these channel drivers.
It appears to me that we should not be using ast_waitfor_nandfds to time the loop. I propose and have tested a solution that uses ast_tvnow() to calculate the elapsed time. This results in accurate calculations for elapsed time. As a result, the internal timers now run properly.
I will note that my dell 3040 does not exhibit this problem. The dell 3040 is more like a raspberry pi 4, although running 64 bit. I have confirmed with another ASL3 tester that app_rpt with chan usb_radio does work properly on a raspberry pi 4.
I will further note that I presently have an old version of app_rpt running on the raspberry pi 3B+ with chan_usbradio with no issues. Something is different in the ASL3 code base or the newer linux version that causes this issue.