 +	gpsd_log(&session->context->errout, LOG_INF,
 +		 "QRTR open: Found PDS at %d %d.\n", pds_node, pds_port);
 +
++	sq.sq_family = AF_QIPCRTR;
++	sq.sq_node = pds_node;
++	sq.sq_port = pds_port;
++	ret = connect(sock, (struct sockaddr *)&sq, sizeof(sq));
++	if (ret < 0) {
++		gpsd_log(&session->context->errout, LOG_ERROR,
++			 "QRTR open: Failed to connect socket.\n");
++		close(sock);
++		return -1;
++	}
++
 +	gpsd_switch_driver(session, "Qualcomm PDS");
 +	session->gpsdata.gps_fd = sock;
 +	session->sourcetype = source_qrtr;
 +	session->servicetype = service_sensor;
-+
-+	session->driver.pds.node = pds_node;
-+	session->driver.pds.port = pds_port;
 +
 +	return session->gpsdata.gps_fd;
 +}

 	      source_pty,	/* PTY: we don't require exclusive access */
 	      source_tcp,	/* TCP/IP stream: case detected but not used */
 	      source_udp,	/* UDP stream: case detected but not used */
@@ -699,6 +701,12 @@ struct gps_device_t {
 	    unsigned char sid[8];
 	} nmea2000;
 #endif /* NMEA2000_ENABLE */
+#ifdef PDS_ENABLE
+	struct {
+		unsigned int node;
+		unsigned int port;
+	} pds;
+#endif /* PDS_ENABLE */
 	/*
 	 * This is not conditionalized on RTCM104_ENABLE because we need to
 	 * be able to build gpsdecode even when RTCM support is not
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 85b8d86a..4f6a11ed 100644
--- a/libgpsd_core.c

     &driver_rtcm104v2,
 #endif /* RTCM104V2_ENABLE */
diff --git a/gpsd.h b/gpsd.h
index 2bd5f4c0..8e22e509 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -163,12 +163,13 @@ struct gps_lexer_t {
