diff --git a/rotators/ioptron/rot_ioptron.c b/rotators/ioptron/rot_ioptron.c index 4a584ac95..7a5387279 100644 --- a/rotators/ioptron/rot_ioptron.c +++ b/rotators/ioptron/rot_ioptron.c @@ -310,7 +310,7 @@ const struct rot_caps ioptron_rot_caps = .copyright = "LGPL", .status = RIG_STATUS_ALPHA, .rot_type = ROT_TYPE_AZEL, - .port_type = RIG_PORT_SERIAL|RIG_PORT_NETWORK, + .port_type = RIG_PORT_SERIAL, .serial_rate_min = 9600, .serial_rate_max = 9600, .serial_data_bits = 8, diff --git a/src/amplifier.c b/src/amplifier.c index 4825baad2..5bd2c29cb 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -310,6 +310,13 @@ int HAMLIB_API amp_open(AMP *amp) rs->ampport.fd = -1; + // determine if we have a network address + if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5) + { + rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname); + rs->rotport.type.rig = RIG_PORT_NETWORK; + } + switch (rs->ampport.type.rig) { case RIG_PORT_SERIAL: diff --git a/src/rig.c b/src/rig.c index 90a73d6a0..0859975ac 100644 --- a/src/rig.c +++ b/src/rig.c @@ -568,6 +568,13 @@ int HAMLIB_API rig_open(RIG *rig) rs->rigport.fd = -1; + // determine if we have a network address + if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5) + { + rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname); + rs->rotport.type.rig = RIG_PORT_NETWORK; + } + if (rs->rigport.type.rig == RIG_PORT_SERIAL) { if (rs->rigport.parm.serial.rts_state != RIG_SIGNAL_UNSET diff --git a/src/rotator.c b/src/rotator.c index 29300f063..315006ac6 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -320,6 +320,7 @@ int HAMLIB_API rot_open(ROT *rot) const struct rot_caps *caps; struct rot_state *rs; int status; + int net1,net2,net3,net4,port; rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); @@ -338,6 +339,13 @@ int HAMLIB_API rot_open(ROT *rot) rs->rotport.fd = -1; + // determine if we have a network address + if (sscanf(rs->rotport.pathname,"%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4, &port)==5) + { + rig_debug(RIG_DEBUG_TRACE,"%s: using network address %s\n", __func__, rs->rotport.pathname); + rs->rotport.type.rig = RIG_PORT_NETWORK; + } + switch (rs->rotport.type.rig) { case RIG_PORT_SERIAL: