-
Notifications
You must be signed in to change notification settings - Fork 52
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
examples cause arduino mega r3 to loop unless #define DIAGNOSTICS true #12
Comments
I can confirm the same issue. Running IDE 1.8.5 with modem on Serial2. Copied from console output
Code:
|
Hi Justin According to the doc I will try some different baud rates and delay statements and see if that helps |
Hey msy380,
|
Hi! I'm having exactly the same problem, but I'm using AltSoftSerial instead of SoftwareSerial, and using an Arduino Nano. Any idea on how to solve this? |
I bought my rockblock from sparkfun and i’ve been working with them on
this also. They were also to reproduce the problem using an Arduino mega
2560 where none of the examples run properly unless diagnostics are set to
true. I also contacted rockblock and was told this is third-party
software they are not responsible for it. Was really hoping the author
Mikal would see the open issues and offer some advice.
…On Wed, Mar 28, 2018 at 3:15 PM AngeloACR ***@***.***> wrote:
Hi! I'm having exactly the same problem, but I'm using AltSoftSerial
instead of SoftwareSerial. Any idea on how to solve this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AjcN_XJ8I_m94GWJXdGeQHDoJLmxvqT6ks5ti-E4gaJpZM4Sh6sT>
.
|
That's a shame @msy380. My understanding was RockSeven helped make this library in the first place so it's a shame they can't contribute to diagnostics and resolution. I haven't had the chance to look through the library to see what might be causing this. It's on my todo list, but so are a heap of other things right now. |
Hi all-- I'll be looking at this in the next two weeks. Is the common thread here that everyone affected is using the Mega? @AngeloACR, are you using the Mega? If so, I was certainly suggest using one of the "hardware" serial ports in favor of the less reliable software serial implementations. |
Using Mega and hardware serial here |
I'm using a Nano and and AltSoftSerial. Also tried with SoftwareSerial and didn't work neither @mikalhart |
Hi friends-- I'm starting to maybe understand this. Most of the testing we do with IridiumSBD occurs on ARM processors, and I think there may be a difference between the way the ARM compilers handle undefined functions with the "weak" attribute and the Atmel core ones. Could I convince one or more of you to do the following experiment:
to
If my guess is right, this should fix the problem. Full explanation: These functions are defined as "weak" in the library to indicate that they should be called if and only if the user (or example writer) provides them in the sketch. On ARM systems, their absence simply causes nothing to happen, but I'm starting to guess that on Atmel core devices, the compiler actually generates a call to address 0, which would create the behavior you are reporting. |
I don't have a modem around at the moment but will have a new batch coming soon. I'll test it then unless someone else can test before then. |
I have tested the proposed solution on an Uno without a Modem, and looks like it works well. I get the "No modem detected" message, and when in the loop, it throws "unexpected error 3". I'll test it in a few days with a Nano and an Iridium Edge to see if it works well with a Modem. Lets see what happen |
Thank you @AngeloACR and @justinj0305. I am increasingly certain that this is the problem. The real solution will be a tiny bit of new code in the library to check whether those diagnostic functions have been provided by the user. That'll come soon once we get a bit more confirmation. |
Hello, I had originally posted an issue here: https://github.com/
mikalhart/IridiumSBD/issues having the same problem. I am using an arduino
mega 2560 R3 with the rockblock mk2, level shifter board, arduino IDE
1.8.1. I am trying to use the examples:
https://github.com/mikalhart/IridiumSBD/tree/master/examples but see the
same behavior where it just loops if diagnostics = false. All the examples
use SERIAL3 so I assumed the code was using an arduino mega R3 since it is
mentioned in the comments ? I also saw a post, I think by Mikal here:
#2 that not all the rx/tx
pins support interrupts so I was using the examples "as is" with serial3.
Oddly if i change diagnostics = TRUE the code runs fine.
Mikal, there are also a few open issues where the send routine is not
clearing the buffer after sending a message so if you later try and receive
a message it resends the old message. Rocklock advised to use AT+SBDD.
Perhaps that fix could also be included an the revision to prevent the
looping problem when DIAGNOSTICS = FALSE ?
I am not a programmer so I am at the mercy of someone to try and fix the
library/samples. Desperately trying to get this to work in the next few
weeks. This project was to go aboard a sailboat headed off shore in early
May. Any help would be greatly appreciated ! If there is a revision
someone wants me to test I would be happy to do so.
thank you
…On Sun, Apr 1, 2018 at 10:57 AM, Mikal Hart ***@***.***> wrote:
Thank you @AngeloACR <https://github.com/AngeloACR> and @justinj0305
<https://github.com/justinj0305>. I am increasingly certain that this is
the problem. The real solution will be a tiny bit of new code in the
library to check whether those diagnostic functions have been provided by
the user. That'll come soon once we get a bit more confirmation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AjcN_Z7gcNVwxhVTidf6b8JbEbsnfTaEks5tkOrOgaJpZM4Sh6sT>
.
|
Hi Mikal |
Hi Mikal, void ISBDConsoleCallback(IridiumSBD *device, char c) void ISBDDiagsCallback(IridiumSBD *device, char c) Question - if you are going to update the library any chance you could include a fix for the send routine to clear the buffer after sending a new message, AT+SBDD ? Thank you again for all your help on this ! |
Hi! I've already tested it with a Nano and an Iridium Edge. After a while, it throws the same error as I said before, so I want to ask how to properly connect the Arduino and the Iridium? Currently, these are the connections: Arduino - Iridium The pin 6 of the Iridium is floating Another thing I want to ask, the voltage levels of the Arduino Tx and Rx are high enough for the Iridium Edge to understand them? Or should I use some kind of level shifter? Thanks in advance for your help!! |
Eklavya-Foundation |
Eklavya-Foundation, |
Mikal Any chance you could include the clear buffer command AT+SBDD, in the send new message routine when the updated libraries get published ? Thank you |
Please try new release 2.0.0 and see if this is resolved. There was some misunderstanding about how the "weak" attribute works, and this has been changed. |
this is very puzzling. I bought a Rockblock, arduino mega r3 and a level shifting board from Sparkfun. I am try to use the example code in the IridiumSBD libraries, BasicSend, SendReceive and all I get in the serial monitor window (set at 115200, CR/LF) is random garbage. If a change the #define DIAGNOSTICS from false to true everything runs ok and I see output in the serial window.
arduino library was downloaded from here: https://github.com/mikalhart/IridiumSBD
this is V2 that was released around November 2017
I added a delay line in SETUP and a few lines like this:
Serial.println(F("RockBlock Test")); in the start of setup and then this line just before the modem.begin
Serial.println("Starting modem...");
err = modem.begin();
it appears it is starting up but somehow just gets stuck inmodem.begin and cause the program to reset over and over and never reaches the LOOP function, but I have no idea why
in the console window I see the "rockblock test" is coming from setup then I see "Sta" and it repeats that sequence over and over.
I think "Sta" is part of this string in setup: Serial.println("Starting modem...");
It does not appear to ever get the the loop function and never reaches the last couple of lines in setup which prints out my menu in setup()
very strange....
I am using IDE 1.8.1 the Serial3 with no changes in the sample code. For power I am using the USB cable from the PC for the arduino mega and for the rockblock power pins a 5v wall adapter 2000 ma. Since everything works ok when I set #define DIAGNOSTICS to true I feel the wiring/level shifting is ok.
any thoughts/comments greatly appreciated !
The text was updated successfully, but these errors were encountered: