i have compiled lirc version 0.9.2-0.9.5 all have the same problems (Raspbian Jessie Lite Kernel 4.4.21)
when i start lirc with listen option
root@raspberrypi:/# lircd -l10.10.2.77:111
lircd: bad port number "111Uùv"root@raspberrypi:/# lircd -l0.0.0.0:8765
lircd: bad port number "8765 5úv"
when i start lirc with 'lircd -l0.0.0.0:111' is listen on port 111 and is working (port 1 - 999)
start lircd with 'lircd -l0.0.0.0:00008765' will lircd listen on port 8765 an works
can you fix the problem?
Hi!
hm... argument parsing problem? Can you first try with more recent source, lirc as as of now at 0.9.4c. Even if I doubt that an update fixes the problem, we need a fresh version in order to patch.
Also, please enable at least debug logging (-Ddebug), attach the lircd logs and report back.
with -Ddebug only this two lines i see in the logs
Some things:
Welcome back!
EDIT: Added more things
Last edit: Alec Leamas 2016-10-30
lirc_options.conf set listen to 0.0.0.0:8670 put lircd starts with port 8765
i have compiled on other machine Debian 8.0 32bit --> lircd: bad port number "111Uùv"
on Debian 8.0 64bit --> lircd with listen port is working
Sorry for not following up. If you are still on 0.9.2: Could you please try the current 0.9.4c version instead? IIRC, there was some command line parsing bugs which were resolved by post-release patches. Anyway, there is no need to spend time on the outdated 0.9l,2 these days.
It looks like a getopt_long() implementation that does not support optional parameters. I have the same issue with uClibc (in 0.9.4c).
Using --listen= instead works.
"Fixing" this would make the command line incompatible (e.g. trying to make -l without parameter and adding another one for the host:port).
See http://stackoverflow.com/questions/19604413/getopt-optional-arguments:
POSIX.1-2008, section 12.2, "Utility Syntax Guidelines", explicitly forbids this feature:
Guideline 7: Option-arguments should not be optional.
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
Last edit: Felix Schmidt 2016-12-22
Yes, this is a 15-20 year old syntax. Question is if problem is big enough to motivate a break. Re-phrasing issue.
I presume --listen "" also works then? If so, I tend to think we should live with this for now, besides documenting how it works on non-glibc platforms. After all, using lirc_options.conf (the primary usecase), this is a non-issue.
That is not to say I'm sure.
Documentation fix in [b148c3] (master). Time will tell if more work is needed w this issue.
Related
Commit: [b148c3]
Sorry, i didn't test thoroughly.
No, listen alone did not work (with the patch from #240). This fixes this as well:
https://paste.fedoraproject.org/511529/
A NULL string was assigned via options_set_opt() if no parameter is given, the previous patch did not take care of this.
Mid-air collision... I spotted that and it should be fixed in current master. Could you please verify.
Forget it, i see you already took care of this in the latest commit ..
tested, works
Actually, this is still buggy. However, my feeling is that it's not bad enough to motivate a change of the syntax.
Thoughts? Can we close thiis, basically as wontfix?
Last edit: Alec Leamas 2016-12-23
I think there are two issues (and jumping between different tasks got me a little bit confused):
1. The one reported here originally ("bad port number"). This is fixed with #249
2. -l parameter not accepting an argument. Just leave it and use --listen insted IMHO (This is likely just a behaviour in my environment, initially i wrongly thought it would be related to this issue).
Last edit: Felix Schmidt 2016-12-23
We have actually re-phrased this issue to cover the -l issue. Which we wont solve, just document.
Thanks for all help, reporting, patching... Merry Xmas!