Quectel BC95 echo test fixes

Fixing get host by name and iterate send/recv socket operations.
pull/6291/head
Mirela Chirica 2018-03-08 13:00:14 +02:00
parent 84cd5c1000
commit be95f47636
1 changed files with 3 additions and 1 deletions

View File

@ -150,7 +150,8 @@ nsapi_size_or_error_t QUECTEL_BC95_CellularStack::socket_sendto_impl(CellularSoc
_at.write_string(hexstr, false);
_at.cmd_stop();
_at.resp_start();
socket->id = _at.read_int();
// skip socket id
_at.skip_param();
sent_len = _at.read_int();
_at.resp_stop();
@ -182,6 +183,7 @@ nsapi_size_or_error_t QUECTEL_BC95_CellularStack::socket_recvfrom_impl(CellularS
_at.read_string(hexstr, sizeof(hexstr));
// remaining length
_at.skip_param();
_at.resp_stop();
if (!recv_len || (recv_len == -1) || (_at.get_last_error() != NSAPI_ERROR_OK)) {
return NSAPI_ERROR_WOULD_BLOCK;