summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dff10a3)
Don't respond to K-commands with HM-LAN-IF by default but respond with
the actual string returned by the USB device (HM-USB-IF). This breaks
compatibility with Fhem-versions before 2015-06-19 and possibly other
software (Homegear, eQ-3 rfd). To restore compatibility with these
software-packages, add the new command-line switch "-I" which restores
old behaviour.
- impersonate_hmlanif = 1;
-
sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (sock == -1) {
perror("Can't open socket");
sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (sock == -1) {
perror("Can't open socket");
fprintf(stderr, "\t-D\t\tdebug mode\n");
fprintf(stderr, "\t-d\t\tdaemon mode\n");
fprintf(stderr, "\t-h\t\tthis help\n");
fprintf(stderr, "\t-D\t\tdebug mode\n");
fprintf(stderr, "\t-d\t\tdaemon mode\n");
fprintf(stderr, "\t-h\t\tthis help\n");
+ fprintf(stderr, "\t-I\t\tpretend to be HM-LAN-IF for compatibility with client-software (previous default)\n");
fprintf(stderr, "\t-i\t\tinteractive mode (connect HM-CFG-USB to terminal)\n");
fprintf(stderr, "\t-l ip\t\tlisten on given IP address only (for example 127.0.0.1)\n");
fprintf(stderr, "\t-L logfile\tlog network-communication to logfile\n");
fprintf(stderr, "\t-i\t\tinteractive mode (connect HM-CFG-USB to terminal)\n");
fprintf(stderr, "\t-l ip\t\tlisten on given IP address only (for example 127.0.0.1)\n");
fprintf(stderr, "\t-L logfile\tlog network-communication to logfile\n");
- while((opt = getopt(argc, argv, "DdhiPp:Rr:l:L:vV")) != -1) {
+ while((opt = getopt(argc, argv, "DdhIiPp:Rr:l:L:vV")) != -1) {
switch (opt) {
case 'D':
debug = 1;
switch (opt) {
case 'D':
debug = 1;
case 'd':
flags |= FLAG_DAEMON;
break;
case 'd':
flags |= FLAG_DAEMON;
break;
+ case 'I':
+ impersonate_hmlanif = 1;
+ break;
case 'i':
interactive = 1;
break;
case 'i':
interactive = 1;
break;
break;
case 'V':
printf("hmland " VERSION "\n");
break;
case 'V':
printf("hmland " VERSION "\n");
- printf("Copyright (c) 2013 Michael Gernoth\n\n");
+ printf("Copyright (c) 2013-15 Michael Gernoth\n\n");
exit(EXIT_SUCCESS);
case 'h':
case ':':
exit(EXIT_SUCCESS);
case 'h':
case ':':