You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have an issue that the code acts weird when sending different data types, in this case, string and char using my RockBLOCK Mk2 9602 module. So my project is sending data from the SD CARD file, the idea is to read the file using iteration (for loop) and save it to variable char. It will try to send data until it succeeds. When I send string data ex. ("Test"), the Arduino will return 0/ISBD_SUCCESS to tell us that the server has already received the data. When I Send char data, the server receives the same data as on serial monitor, and Arduino sends 0 value to. But, my code act like it failed and tries to send data again and again. I don't know why, just like what I said, it acts weird.
Here is the "Important" part of the code.
char readSDC[162]; //this is variable I use to storage the value
//Read file from SD Card, and storage it to readSDC variable
if (myFile)
{Serial.println(F("start reading SD Card.txt"));
while(myFile.available())
{
for(int i=0; i<=160; i++){
readSDC[i]+= myFile.read();
}
delay(1000);
Serial.println(readSDC);
delay(1000);}
}
//Sending Massage block Program
Serial.println("Try to find signal");
err = isbd.getSignalQuality(signalQuality);
if(err!= ISBD_SUCCESS){
Serial.print("Signal Quality failed: error");
Serial.println(err);
return;
}
delay(1000);
Serial.print("Signal around here is ");
Serial.println(signalQuality);
//Start Sending Message
Serial.println(F("Start Sending Message"));
err = isbd.sendSBDText(readSDC);
delay(2000);
if(err =! ISBD_SUCCESS){
Serial.println("Failed sending message");
Serial.println(err);
if(err == 0){
Serial.println("Success sending message");
}
if(err == ISBD_SENDRECEIVE_TIMEOUT){
Serial.println("Try again with a better view of the sky");
return;
}
}else{
Serial.println("Success sending message");
}
Just like I said, it works well both Arduino Serial Monitor and Server when I put string on err = isbd.sendSBDText("Test");, but when I use my char variable, it acts like what I said above. Any solution?
The text was updated successfully, but these errors were encountered:
Hello, I have an issue that the code acts weird when sending different data types, in this case, string and char using my RockBLOCK Mk2 9602 module. So my project is sending data from the SD CARD file, the idea is to read the file using iteration (for loop) and save it to variable char. It will try to send data until it succeeds. When I send string data ex. ("Test"), the Arduino will return 0/ISBD_SUCCESS to tell us that the server has already received the data. When I Send char data, the server receives the same data as on serial monitor, and Arduino sends 0 value to. But, my code act like it failed and tries to send data again and again. I don't know why, just like what I said, it acts weird.
Here is the "Important" part of the code.
Just like I said, it works well both Arduino Serial Monitor and Server when I put string on
err = isbd.sendSBDText("Test");
, but when I use my char variable, it acts like what I said above. Any solution?The text was updated successfully, but these errors were encountered: