On Mon, Jul 15, 2013 at 10:54 PM, Thomas Tsou tom@tsou.cc wrote:
On Mon, Jul 15, 2013 at 1:19 PM, Alexander Chemeris alexander.chemeris@gmail.com wrote:
On Mon, Jul 15, 2013 at 2:35 PM, Thomas Tsou ttsou@vt.edu wrote:
This is a very positive patch set. As you very well know, the power on/off handling was in a ugly state. One of the remaining issue with UHD start/stop is that the device clock is reset to zero at restart, but not all of the timestamp counters are reset in radioInterface. The radioInterface is not stopped at all until deallocation since 'POWEROFF' is an empty command.
I made an attempt to implement it in the 806a64b1 patch. If you check out this commit, you should get the assert during TURN ON/OFF/ON sequence. To start/stop transceiver I use scripts attached to this e-mail.
There does seem to be something strange going on with UHD. After restart and clock reset the device is reporting time correctly, but subsequent packets do not reflect the change. We've had similar issues before due to lingering packets in the socket buffers, but the same fix (flushing buffers after issuing STREAM_MODE_STOP) doesn't fix the issue.
Rx timestamp 10.3679 Rx timestamp 10.3698 ----POWEROFF---- ----POWERON---- UHD device time 0.00440694 Rx timestamp 10.3732
This may be a bug in UHD, or some oddity in the UHD streamer interface. I'm going to try it with an outside test case.
Worst case we should be able to align the transceiver clock with UHD instead of resetting UHD clock.
-- Regards, Alexander Chemeris. CEO, Fairwaves LLC / ООО УмРадио http://fairwaves.ru