-
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
IridiumSBD code problem with Arduino Mega2560 #2
Comments
Hi Tom-- I suspect your problem is a simple one. You can't use SoftwareSerial on all the pins on the Mega. See http://arduino.cc/en/Reference/SoftwareSerial for details. Happily, the solution is an easy one. Change the RX pin to one that supports pin change interrupts. Also (and this is just as important), make sure you haven't got your tx and rx lines mixed up. This is VERY easy to do, because the RockBLOCK people recently relabeled their devices so that TX means "TX from the RockBLOCK's point of view", i.e. should be hooked up to the RX line on the Arduino. Of course if you have an older RockBLOCK, it's just the opposite. Mikal |
Hi Mikal, Thank you for the incredibly fast response. I'll look into your reference Thanks again, Tom On Thu, Jun 12, 2014 at 2:26 PM, Mikal Hart [email protected]
Tom Eldredge |
Hi Mikal, Those pins are already in use in my application, so I will try others until By the way, 14 and 15 are listed as ones that support change interrupts on Thank you SO much! On Thu, Jun 12, 2014 at 2:26 PM, Mikal Hart [email protected]
Tom Eldredge |
Hi Tom. Thanks for the kind words. Great news! If I were porting this application to one of the Mega varieties, I would take advantage of the fact that these provide more than one /Hardware/ Serial port. The sample code for IridiumSBD assumes Uno, which only has one hardware port but needs to talk to /two/ Serial devices, the GPS module and the RockBLOCK. On Mega I /think/ you could hook up the RockBLOCK to the second HW serial port and simply change one line of code: SoftwareSerial nss(18, 19); Make sense? |
Hi Mikal, I need to use pins 14 and 15, or pins 16 and 17. Pins 18 and 19 are So, I would I put the line: "HardwareSerial &nss(Serial2); " in place of Thank you again. I'm an old man who never learned C. Only Paschal, Tom On Thu, Jun 12, 2014 at 3:41 PM, Mikal Hart [email protected]
Tom Eldredge |
Thank you again, Mikal, I have it working on the hardware serial2, per your instructions! I am Gratefully, Tom On Thu, Jun 12, 2014 at 3:53 PM, Tom Eldredge [email protected] wrote:
Tom Eldredge |
Fiddlers gotta support each other. :) |
Hi Mikal, In June you helped me, (a fellow fiddler) get my design going with the Now I am back on the project, and I have communication between my Mega2560 InternalBegin: success!
Waiting for response OK << AT+CSQ +CSQ:5 OK Starting loop Starting loop
Waiting for response OK << AT OK
Waiting for response OK << ATE1 OK
Waiting for response OK << AT&D0 OK
Waiting for response OK << AT&K0 OK
Waiting for response OK << AT+SBDWT=37.827682,-91.835983,220.00,0.1,0 OK
Waiting for response OK << AT+CSQ +CSQ:5 OK
Waiting for response OK << AT-MSSTM -MSSTM: a15518c6 I am wondering why I am not transmitting this GPS data to the satellite. Thanks, Tom Eldredge On Thu, Jun 12, 2014 at 4:29 PM, Tom Eldredge [email protected] wrote:
Tom Eldredge |
Hi TomEldredge, You could refer to the docs about "Erratum Workarounds and other Tweaks" at http://arduiniana.org/libraries/iridiumsbd/ |
Thank you for the tip. I will try it in the morning! Tom Eldredge On Tue, Nov 25, 2014 at 6:47 PM, mountain8848 [email protected]
Tom Eldredge |
Hi Mikal, and mountain8848: Thank you for the tip. Yesterday was a stressful day for me as I struggled Your tip worked! I have forwarded this info to Rockblock support. Thank you again. Tom Eldredge On Tue, Nov 25, 2014 at 9:44 PM, Tom Eldredge [email protected] wrote:
Tom Eldredge |
Hi Mikal, Thank you and mountain8848 for solving my problem. I was stuck without Is it sufficient to have this "isbd.useMSSTMWorkaround(false); code only Thank you again for contributing this great software to enable fiddlers Sincerely, Tom On Wed, Nov 26, 2014 at 9:12 AM, Tom Eldredge [email protected] wrote:
Tom Eldredge |
Another user (gizmoberg) has suggested a fix: see release 1.04. |
@TomEldredge , if isbd is a global variable you should only have to call useMSSTMWorkaround once, i.e. in setup(). If you send the console log, that may be a more useful way of determining why you aren't getting messages through. M |
Hi Mikal, Per your suggestion in the email from Nov 26, I am sending the console Console Log: Calling internalBegin
Waiting for response OK << AT OK
Waiting for response OK << ATE1 OK
Waiting for response OK << AT&D0 OK
Waiting for response OK << AT&K0 OK
Waiting for response OK << AT+CSQ +CSQ:5 OK Starting loop Starting loop
Waiting for response OK << AT OK
Waiting for response OK << ATE1 OK
Waiting for response OK << AT&D0 OK
Waiting for response OK << AT&K0 OK
Waiting for response OK << AT+SBDWT=37.827892,-91.835800,260.80,0.2,0 OK
Waiting for response OK << AT+CSQ +CSQ:5 OK
Waiting for response OK << AT+SBDIX +SBDIX: 0, 30, 0, 0, 0, 0 OK
Waiting for response OK << AT*F OK Starting loop
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT Starting loop
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT
Waiting for response OK << AT Starting loop
Waiting for response OK << AT End of Console Log. The Arduino code I am using is pretty much the code you provided, except //DRGlobalBeacon_ino #define BEACON_INTERVAL 60 //360 //0 // Seconds between transmissions HardwareSerial &nss(Serial2); void setup() // Setup the RockBLOCK int signalQuality =-1; isbd.begin(); void loop() // Step 1: Reset TinyGPS++ and begin listening to the GPS // Step 2: Look for GPS signal for up to 7 minutes // Step 3: Start talking to the RockBLOCK and power it up
} // Sleep On Wed, Nov 26, 2014 at 8:03 PM, Mikal Hart [email protected]
Tom Eldredge |
The hangup of the modem while running the above code seems to be caused by holding the sleep input to the modem to +5 volts all the time. As soon as I connected it to pin 2 it allowed multiple transmissions without any interruptions. So, if you are running this code for GlobalBeacon.ino maybe you must connect the sleep pin so that the MEGA2560 can put the modem to sleep then wake it up. I will do some final verification of this tomorrow. |
I think another followup to the problems I was having yesterday and reported to this forum is appropriate, since I have taken the precious time of others to look at this issue with me. Hopefully this will be helpful to someone. With the code in the GlobalBeacon.ino, I have found that I cannot pull the sleep input to the Rockblock modem high (to +5v) and run the code as it is. In my setup, keeping the sleep input pulled high allows one transmission to be sent to the satellite, then the modem is hung up and the configuration produces an error, "No modem detected" after the program tried to address the modem for another transmission. Maybe some part of the code could be changed to prevent this, but I am not familiar with the programming well enough yet. Also, I noted that when the sleep input to the Rockblock is connected to output pin 2 of my Mega2560, the Rockblock tends to keep the output floating near +5v, or as my digital multimeter read, +4.2 volts when the Mega2560 was not telling the rockblock to wake up. So this was a confusing output which I would interpret as a high. When my digital multimeter was connected to monitor this output, the modem would also hang up, so, I think the rockblock was not being really put to sleep, and thus it hung up just like when I intentionally kept the sleep input held at +5v all the time. When the Mega2560 was telling the Rockblock to wake up, the voltage was a solid +5v. So, I inserted a 10k resistor between this Mega2560 output signal and ground, and now I can monitor the output with my digital multimeter and the modem will not hang up. The voltage monitored switches from 0 volts to +5v distinctly whether it is being awakened or put to sleep. I do not exactly know why this happens, but it does. I verified it this morning. So now I think I have a reliable configuration. |
Another followup. Even after all of these tests, it seems my Rockblock still is hanging up after one successful transmission. I do not know what the issues are. It was working last night after I hooked up the sleep line to the Mega2560 rather than pulling it high to +5v all the time. I just tested it several times and after one successful transmission, it reported "No modem detected" on the next cycle of attempted transmission. I'm very puzzled. I will try the brand new rockblock I just received from England. It will take me a while to hook it up in my box. I need to assemble the connector etc. |
@TomEldredge, if you're still watching, try the new version 2.0 of the library. It turns out that the sleep() code was doing a full device shutdown, and you can only "wake" from that by removing power for several minutes to let the supercap dissipate. |
Thank you.
Tom
…On Sat, Oct 21, 2017 at 12:19 PM, Mikal Hart ***@***.***> wrote:
@TomEldredge <https://github.com/tomeldredge>, if you're still watching,
try the new version 2.0 of the library. It turns out that the sleep() code
was doing a full device shutdown, and you can only "wake" from that by
removing power for several minutes to let the supercap dissipate.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgj8HzByJ7IiGTF0TBQkuZ-P2T4azw0ks5suieLgaJpZM4CDwcc>
.
--
Tom Eldredge
Edge Solutions LLC
(573) 341 1528
(573) 368 7399
[email protected]
[email protected]
|
I just connected my new Rockblock to an arduino Mega, and uploaded the example code SendReceive. I have the tx and Rx on 18 and 19, respectively, using 5 volts from Arduino (measured it with VOM), and sleep line either pin 10 or 5 volts steady. The code compiles, In the serial monitor I get “Waiting for Response OK” messages, then after about 9 or 10 messages (I think) I finally receive the message: ” <<NO modem Detected. Powering off RockBlOCK…!, SignalQuality failed:error 10"
I tried two different MEGA2560 boards with same results. This is about as simple as could be. Any ideas? I had this set up with full sky view and antenna facing the sky. Is there some way I can do a simple querry of the RockBlock to see if I can get any response?
As in my post above, there seems to be problems with the Arduino MEGA2560 board and this code. I have been talking with the support staff at RockBlock and they acknowledged that another user has had difficulty also. They are trying to recall the solution, and I have forwarded them the complete configuration I am using. They passed the problem to a technical guy, and hopefully he will be able to help. I can see the MEGA2560 transmitting, but we never get a response from RockBlock. We tested the RockBlock by interfacing to it with a usb cable and sending it AT commands using a serial terminal (TeraTerm). It responded correctly to those commands in that configuration. If anyone else has any ideas or experience like this, I’d appreciate receiving them, and so would RockBlock support, I’m sure.
These two posts have been placed at the end of the IridiumSBD code description. Could you fiddle with these questions? They are my present day puzzle box. I hope to make a presentation on Monday of this technology to my brother, and five of my sons who work together in a company I founded and they have developed. Thank you for fiddling with this stuff.
The text was updated successfully, but these errors were encountered: