Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getRX - size of incoming data #52

Open
haddock443 opened this issue Feb 5, 2018 · 1 comment
Open

getRX - size of incoming data #52

haddock443 opened this issue Feb 5, 2018 · 1 comment

Comments

@haddock443
Copy link

haddock443 commented Feb 5, 2018

Hey,

i have a problem while using this library. If i send a message to the arduino, i can only send a payload under 16 characters. As soon as I send anything above 15 characters, my String is empty.
I just want to store a message like this:
text = myLora.getRX();
and then work with it.
Am i doing something wrong?
I know this is not much information from my side, but i dont know where to start.

One thing that i noticed is: When i restart the arduino, i can receive a longer message once. After that i can only receive 15 characters.

Code:

switch(myLora.txCnf("!"))
{
case TX_SUCCESS:
{
Serial.println("TX successful and acknowledged");
break;
}
case TX_WITH_RX:
{
String received = myLora.getRx();
received = myLora.base16decode(received);
debugSerial.println("debug" + received);
delay(100);
//here i just cut the string and store the parts in global variables
int commaIndex = received.indexOf('$');
int secondCommaIndex = received.indexOf('$', commaIndex + 1);
int thirdCommaIndex = received.indexOf('$', secondCommaIndex +1);
var1 = received.substring(0, commaIndex);
var2 = received.substring(commaIndex+1, secondCommaIndex);
var3 = received.substring(secondCommaIndex + 1, thirdCommaIndex);
var3 = received.substring(thirdCommaIndex + 1); //To the end of the string

    break;
  }
  default:
  {
    Serial.println("Unknown response from TX function");
  }
}
@DenniZr
Copy link
Contributor

DenniZr commented Feb 14, 2018

did you check if your memory is full?
https://github.com/maniacbug/MemoryFree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants