Read response from ATHandler

Since i’ve figured out how to send commands to the BG69 modem, I now try to receive a response instead of reading them myself out of the commandline.
My hardware:

  • DISCO-L475VG-IoT-01A
  • Shiratech IoT Shield with the BG96 modem

I’m using the ATHandler with the
at_cmd_str("+QCFG=\"iotopmode\"", "", buf, buf_size)
function.
But when I print the value of buf, i just receive q.
Does anyone have a solve for this one?

The code I used above was wrong,
I should’ve used the following code.
But still, the buffer empty. Can someone help me out?

char buf[BUF_SIZE];
ssize_t read_res;
CellularInterface  *net = CellularInterface::get_default_instance();
CellularDevice *dev = CellularDevice::get_default_instance();
ATHandler *devat = dev->get_at_handler();
dev->soft_power_on();
devat->at_cmd_str("+QCFG=\"iotopmode\"", "", buf, BUF_SIZE);
printf("response %s\n", buf);

When debugging I receive this error,


in AThandler.cpp at line

159 in the function ok_to_proceed when reading a string.
Using mbedos 6.2.1