Closed anorna closed 3 years ago
uplink mode runs perfect
I fixed de issue, now this function works as I need:
String IO_WSSFM10::sendReceive(const void data, uint8_t size, String response){ uint8_t bytes = (uint8_t*)data; Sigfox.print("AT$SF="); char tmp[3] = {0}; // 2 hex characters + null terminator if(debug){ Serial.print("Bytes:"); } for(uint8_t i= 0; i<size; ++i){ sprintf(tmp, "%02X", bytes[i]); Sigfox.print(tmp); if(debug){ Serial.print(tmp); } } if(debug){ Serial.println(); }
Sigfox.print(",1\r");
while (!Sigfox.available()){
blink();
}
String res = getData();
response =res
;
if(res.indexOf("OK") >= 0) {
Serial.println("Message successfully sent");
Serial.println(res);
return res;
}
if(debug){
Serial.print("Status: ");
Serial.println(res);
}
return "false";
}
When I use this command:
bool statusSR = mySigfox.sendReceive(&p, sizeof(p), valor_recibido);
I get this response
But program gets frozen at this point when sigfox backend is ok
Same hapen using sendReceiveString
every try I did happens the same