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?
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
Output:
DATA: [] 0
same device working perfectly with my c# code.
is there anything missing from my side? or its a bug?