Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIFO file questions? #290

Open
CensorKo opened this issue Mar 20, 2022 · 3 comments
Open

FIFO file questions? #290

CensorKo opened this issue Mar 20, 2022 · 3 comments
Labels

Comments

@CensorKo
Copy link

@wangyu-

1.When write mode/timeout/queue-len to fifo file, after checking log file found that queue-len parameter still keep default value 200.
In below logs, print_parameter function printed 'fec_queue_len=200'. But expected queue-len=2.

echo mode 0 > a.fifo
echo timeout 10 > a.fifo
echo queue-len 2 > a.fifo

[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:handle_command,line:275]got data from fifo,len=30,s=[mode 0
timeout 10
queue-len 2]
[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:handle_command,line:327]got command [mode]
[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:print_parameter,line:265]jitter_min=0 jitter_max=0 output_interval_min=10 output_interval_max=10 fec_timeout=10 fec_mtu=1250 fec_queue_len=200 fec_mode=0

2.Only write fec to fifo file will reset all parameters to default value.

echo fec 20:4 > a.fifo

[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:print_parameter,line:266]fec_str=20:4
[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:print_parameter,line:267]fec_inner_parameter=1:4,2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:4,11:4,12:4,13:4,14:4,15:4,16:4,17:4,18:4,19:4,20:4
[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:handle_command,line:275]got data from fifo,len=9,s=[fec 20:4]
[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:handle_command,line:279]got command [fec]
[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:print_parameter,line:265]jitter_min=0 jitter_max=0 output_interval_min=10 output_interval_max=10 fec_timeout=8 fec_mtu=1250 fec_queue_len=200 fec_mode=0

@wangyu-
Copy link
Owner

wangyu- commented Apr 22, 2022

1.When write mode/timeout/queue-len to fifo file, after checking log file found that queue-len parameter still keep default value 200.

[2022-03-20 23:28:28][INFO][UDPspeeder/misc.cpp,func:handle_command,line:275]got data from fifo,len=30,s=[mode 0
timeout 10
queue-len 2]

For your first question, it seems like you are writing those parameters by a script. And the script writes too fast, then the 3 commands are combined into a str of 3 lines.

It's my bad, I should handle this correctly. Before I fixed this, you can add sleeps between those echo commands, so that the 3 command are not combined into a single str.

2.Only write fec to fifo file will reset all parameters to default value.

I think I have found the reason in the code, I will fix it later.

Thanks for reporting.

@wangyu- wangyu- added the bug label Apr 22, 2022
wangyu- added a commit that referenced this issue Feb 7, 2023
@wangyu-
Copy link
Owner

wangyu- commented Feb 7, 2023

Hi @CensorKo ,

2 should have been fixed.

I didn't fix 1 since the work around is easy, and in future I am going to rework the --fifo option. I might switch from fifo to a udp socket, so that the feature can be used on window/mac as well. With udp socket the problem will automatically gone.

@alou-S
Copy link

alou-S commented Mar 21, 2023

@wangyu- There is also a small problem with the FIFO where settings preinitialized via command line arguments are overridden for the first time when using the FIFO.

Example:

  1. Speeder is started with --mtu 1386 --mode 1 -f 1:4 --fifo fifo.file
  2. echo fec 1:2 > fifo.file
  3. Speeder changes fec_str=1:2 but also changes fec_mtu=1250 and fec_mode=0 (Reset to default values)

Other Notes:

  • Changes made via fifo are persistent when more fifo changes are issued

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants