summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsd.rules2
-rw-r--r--serial.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/gpsd.rules b/gpsd.rules
index 04e148d4..fada69e0 100644
--- a/gpsd.rules
+++ b/gpsd.rules
@@ -43,6 +43,8 @@ ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", SYMLINK="gps%n", RUN+="/lib/u
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug"
# u-blox AG, u-blox 6 (tested with GNSS Evaluation Kit TCXO) [linux module: cdc_acm]
ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a6", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug"
+# MediaTek (tested with HOLUX M-1200E) [linux module: cdc_acm]
+ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="3329", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug"
diff --git a/serial.c b/serial.c
index 585e0d9d..ab5ecd0d 100644
--- a/serial.c
+++ b/serial.c
@@ -420,8 +420,10 @@ int gpsd_serial_open(struct gps_device_t *session)
* We have to make an exception for ptys, which are intentionally
* opened by another process on the master side, otherwise we'll
* break all our regression tests.
+ *
+ * We also exclude bluetooth device because the bluetooth daemon opens them.
*/
- if (session->sourcetype != source_pty) {
+ if (!(session->sourcetype == source_pty || session->sourcetype == source_bluetooth)) {
/*
* Try to block other processes from using this device while we
* have it open (later opens should return EBUSY). Won't work