After some experimenting and reading source codes I tried to connect to my GPS device as follows (from a QGIS plugin):


def connectGPS(self):
    port = u'\\\\.\\COM4'
    #port = u'localhost:2947:'
    self.detector = QgsGPSDetector(port)
    print 'detected, connection functions'
    print '---'
    print 'advance'

def connectionSucceed(self, connection):
    print 'connection Succeed'
    print QgsGPSConnectionRegistry.instance().connectionList()[0].currentGPSInformation().utcDateTime.toString()

def connectionFailed(self):
    print 'connection failed.'

Pressing my above referred button results in

enter image description here

Note the output on the python console, minidump occurs at QgsGPSConnectionRegistry.instance().registerConnection(connection)

Related post: Connect / Disconnect GPS device via PyQGIS

What is it that causes the minidump? I think similiar c++ code of the GPS Information panel works pretty well...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.