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

Receiving message to the modem #36

Open
infinitemind2 opened this issue Oct 12, 2020 · 1 comment
Open

Receiving message to the modem #36

infinitemind2 opened this issue Oct 12, 2020 · 1 comment

Comments

@infinitemind2
Copy link

Having trouble reliably receiving messages.
My data is mainly going out-bound but i check if there is incoming message to act on.
So far i get some messages, this is a problem.

A successful receive debug output...
+SBDIX: 0, 10, 1, 1, 11, 0

OK
SBDIX MO code: 0
SBDIX success!
Incoming message!

AT+SBDRB
Waiting for response AT+SBDRB
<< .AT+SBDRB.[Binary size:11]............[csum:1176]Waiting for response OK

A failed one with a message wait (i thought)
+SBDIX: 0, 11, 1, 2, 11, 0

OK
SBDIX MO code: 0
SBDIX success!
Stopping Modem

Next success...
+SBDIX: 0, 13, 1, 3, 11, 0

OK
SBDIX MO code: 0
SBDIX success!
Incoming message!

AT+SBDRB

These three messages, the failed one was using
int sendReceiveSBDText(const char *message, uint8_t *rxBuffer, size_t &rxBufferSize);
with message set to a string, whereas the other 2 did happen to be message set to NULL.
And just tested it with a text message and it worked.

Any ideas what is wrong

Thanks

@infinitemind2
Copy link
Author

have had a play with the source code of the library and separated if (mtCode == 1 && rxBuffer)

if (mtCode == 1) // retrieved 1 message
{
diagprint(F("Incoming message!\r\n"));
if (rxBuffer)
return doSBDRB(rxBuffer, prxBufferSize);
if (prxBufferSize)
*prxBufferSize = 0;
}

It seem to work now??????

Doesn't make sense?

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

1 participant