-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Radically simplified modems in sketches by making a modem parent class #252
Conversation
Your sketch works fine for me on the GPRSBeeR6. There must be something different about the R7. It took me a bit to puzzle out all the odd numbers. I didn't get them until I actually hooked up the sonar. But they are just because I forgot to change one of the debugging statements in the MaxBotix cpp when I changed the way you turn on the debugging with flags. Those numbers are just the ascii number of the continuous stream from the sonar (824956534813=R1850\r). I've fixed that so you should only see that if you actually intentionally turn on the Maxbotix debugging. But that doesn't have anything to do with the modem issue. Are you sure you have TinyGSM 0.7.9? Turn on all the modem debugging, LoggerModem, GPRSBee, and GPRSBee deep. You can either open the library files and un-comment the defines or add this to your platformio.ini:
Your log will suddenly get really long with all of the AT commands for the modem. I want to see that. Also, are you seeing the light on your Bee go on and go to the "connected" blink? |
"name": "TinyGSM",
GPRSBee7 RTC syncs. Response code is 201, but modem status and signal are still -9999. Deep debug attached. If you have tips for exporting this from Atom/PlatformIO, I'm all ears, because copy/paste is only allowed page by page as far as I can figure out. |
Also, my Bee blinks when connected. |
Huh. It looks like I just wasn't waiting long enough to get an AT response from the modem. I have no idea why the R6 might respond faster than the R7, but I guess it does. The R6 also responded more slowly than I'd expected it to based on the manual. I increased the time-out for the GPRSBee in particular and the padding for all the modems. Try again. Also, turn on the deep debugging for the logger modem TeraTerm is a decent serial port monitor/terminal emulator that you can use to log the output much more easily than the PIO MiniTerm in Atom or VSCode. I've also tried RealTerm and a few others. |
Funny story... I've looked at a few terminal emulators, but they weren't MacOS friendly (including TeraTerm). Then I realized that I could use the Arduino IDE! It allows me to select all and paste the whole serial monitor log in one fell swoop. (In other words, build and upload in PlatformIO, monitor in ArduinoIDE.) The answer was right in front of me all along. I don't want to tell you how long it took to copy/paste all those pages... #facepalm "name": "TinyGSM", The result with the latest commit is the same. We have logging to EnviroDIY, 201 response, but still -9999 on the modem variables. |
Oh, it's actually that the status pin isn't coming on. I increased that buffer (more). Sorry. Try again. If that doesn't work, try setting your modem status pin to -1 and see what happens. |
@SRGDamia1, is there a new commit? The last one I see right now is from last night. |
Oops, forgot to push. Sorry!! |
The R7's status pin must not be connected to the SIM800 the way it is on the R6. In your code, set the status pin to -1 ( |
|
Yay! Now it would be very nice if we could get a schematic to let us know why the status pin wasn't working. You didn't put the GPRSBee on top of one of the new LTE adapter boards, did you? It's sitting right on the Mayfly, right? Looking at it, does it look like there are any traces wired up to pin 12? (That's the second from the bottom on the left when you're looking at it from the bottom where the sim card slot is.) |
Since it's finally working, and it seems to have been the R7's fault the whole time, I'm going to merge this pull request and make a new issue for the R7. |
I don't see traces in that spot. Tonight I will look at a version 6 and I could test it with the LTE adaptor if you are curious. (Now that I can copy/paste in one fell swoop, sharing the debugging is so much happier.) |
Here's a comparison of the two GPRSBee versions, with Rev. 6b on the left and Rev. 7b on the right. From my look, I would agree with Beth that Pin 12 (CTS for power status) does not seem to be wired to anything on Rev. 7b. I'll do some testing. |
This fixes #253! See #253 (comment) |
Now each modem is implemented as it's own instance of the modem class so all you need to do is create the modem object.