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

how to clear the buffers ? AT+SBDD #11

Open
JimKruk opened this issue Mar 8, 2018 · 2 comments
Open

how to clear the buffers ? AT+SBDD #11

JimKruk opened this issue Mar 8, 2018 · 2 comments

Comments

@JimKruk
Copy link

JimKruk commented Mar 8, 2018

I think this is the same issue that PaulZC reporton on 2/4/2018. the problem I am having is when I send a new message e.g. err = modem.sendSBDText(indata); it is not clearing something in a buffer somewhere. So later if I try and receive message it first sends a message that I had sent earlier in the day, then I receive a new message. I contact RockBlock and they suggested to use the function AT+SBDD but I have no idea how to implement this :( Would it be possible to modify the modem.sendSBDText routine to clear the buffer or add another function to do this ? If I power down the device and power back up and try to receive a new message the outbound buffer is clear so something must be left in memory somewhere in the rockblock ? thanks !

@PaulZC
Copy link

PaulZC commented Mar 8, 2018

Hi,
This does sound like the same 'issue' #10.
I have the 9603 connected to Serial2 on a SAMD21 M0. I'm forcing the AT+SBDD with a serial write that bypasses the IridiumSBD library. The relevant bits are:

#include <IridiumSBD.h>
...
HardwareSerial &ssIridium(Serial2);
...
IridiumSBD isbd(ssIridium, IridiumSleepPin);
...
ssIridium.begin(19200);
...
...
// Very messy work-around to clear MO buffer
ssIridium.println("AT+SBDD0");
delay(5000);
while(ssIridium.available()) { // Flush RX buffer
ssIridium.read(); // Discard anything in the buffer
//Serial.write(ssIridium.read()); // Or use this for debugging
}

I hope this is of use,
Paul

@JimKruk
Copy link
Author

JimKruk commented Mar 8, 2018

Hi Paul
Thank you for the quick reply and sample code !

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