Skip to content

Unable to read AT command response on windows 10 machine using 8 Port USB Modem Pool #114

Description

@mateors

I am using windows 10 operating system and send AT+COPS? command to my USB modem pool device connected to my machine. It seems AT command is sending and working properly but still response receive empty.

seemy code and command output

c := &serial.Config{Name: "COM7", Baud: 115200, Parity: 'N', StopBits: 1, ReadTimeout: time.Second * 3}

port, err := serial.OpenPort(c)
if err != nil {
	fmt.Println("OpenError: ", err)
}
defer port.Close()

n, err := port.Write([]byte("AT+COPS?\n"))
if err != nil {
	fmt.Println("ERROR: ", err)
}
time.Sleep(1 * time.Second)

buffer := make([]byte, 1024)
n, err = port.Read(buffer)
if err != nil {
	fmt.Println("ERROR: ", err)
}
fmt.Printf("DATA: %v %d", buffer[:n], n)

Output:
DATA: [] 0

same device working perfectly with my c# code.

is there anything missing from my side? or its a bug?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions