Score:0

how to find serial port of my gps device?

in flag

in Ubuntu 20.04 lts, I'm using usb gps module. when I plugged, it can change between ttyACM[0..9]. How can I specifically detect usb gps? I used pyusb but it won't show serial port details.

Score:0
in flag

I solved the problem with searching GPS in descriptions on list_ports.

from serial.tools import list_ports


def get_port() -> str:
    try:
        for dev in list_ports.comports():
            if 'GPS' in dev.description:
                return dev.device
    except:
        return ''
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.