Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Cal

Forum Replies Created

Viewing 10 posts - 11 through 20 (of 32 total)
  • Author
    Posts
  • in reply to: Trouble initializing XBee3 LTE-M #13890
    Cal
    Participant

      Yep – I had a problem with my library.  All is good now. Sorry for the fire drill.

      in reply to: Trouble initializing XBee3 LTE-M #13880
      Cal
      Participant

        Sara noted above that she re-wrote TinyGsm – so I decided it was a good time to update all my code with new libraries.  Trouble is, I can’t get TinyGSM with templates from EnviroDIY GitHub to compile on the Arduino IDE (I’m not using PlatformIO).  I’m sure I’m making a simple mistake or compiler option but can’t figure it out being a novice C++ programmer. Here’s the the start of a long list of errors:

        In file included from ….\libraries\TinyGSM\src/TinyGsmClientXBee.h:26:0,
        from ….\libraries\TinyGSM\src/TinyGsmClient.h:93,
        from ….\my_sketch.ino:229:
        ….\libraries\TinyGSM\src/TinyGsmModem.tpp:15:7: error: ‘TinyGsmModem’ is not a template
        class TinyGsmModem {
        ^~~~~~~~~~~~
        In file included from ….\libraries\TinyGSM\src/TinyGsmBattery.tpp:12:0,
        from ….\libraries\TinyGSM\src/TinyGsmClientXBee.h:24,
        from ….\libraries\TinyGSM\src/TinyGsmClient.h:93,
        from …\my_sketch.ino:229:
        ….\libraries\TinyGSM\src/TinyGsmCommon.h:208:7: note: previous declaration here
        class TinyGsmModem
        ^~~~~~~~~~~~
        In file included from ….\libraries\TinyGSM\src/TinyGsmClient.h:93:0,
        from ….\my_sketch.ino:229:
        ….\libraries\TinyGSM\src/TinyGsmClientXBee.h:69:40: error: expected template-name before ‘<‘ token
        class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,…..

        in reply to: Trouble initializing XBee3 LTE-M #13861
        Cal
        Participant

          More news:

          1. The cutting and soldering of the Mayfly and XBeee adapter mentioned above works great!  I can now programmatically reset the modem if it gets into a non-responsive state.  I’m thinking of ditching my Sleep Mode code and instead doing a Shutdown(SD) and power off via A5 between communications. It may be less error prone and it does use slightly less power.  So far my experience is that it reconnects quickly.
          2. CP=1 has been working.  I’ll know better after a week of continuous testing 2 Mayflies – one with modem at FW-11413 and the other with 11415.
          3. For Matt – maybe you are right that PSM is getting “stuck”. From the manual:

          Note The cellular module comes out of the PSM low-power state whenever any network activity occurs, including Remote Manager activity

          I have code that does a Lookup Address (LA) whenever AI=2C (PSM).  That should get it out of PSM – and I’ve seen it get triggered on occasion.  But if the XBee is getting stuck in PSM,  I now have the ability to power cycle the XBee, that should work around this problem.

           

          in reply to: Trouble initializing XBee3 LTE-M #13850
          Cal
          Participant

            I had something interesting happen to me last week – a brand new XBee  (with brand new firmware 11415) + brand new SIM card would NOT connect to the tower for days.  In desperation, I changed the Carrier Profile from 0 to 2 (AT&T) and it connected immediately.  After that, I changed the CP back to 0 and it connects fine.

            All of my installation run with CP=0.  I think that was the advice I got from Hologram – provider of my SIMs. CP=0 has been working fine and I never had to use a change of CP to get it to work.

            But from the DIGI manual:

            “The 1 (No Profile) setting should be used if the module is not able to join the network because the underlying cellular modem does not have a predefined profile that supports the inserted SIM card. The 1 (No Profile) setting does not use any predefined profiles, which forces the module to attempt to join an appropriate network based on the module’s current configuration.”

            Now I’m thinking that CP=1 is the correct setting for all my installations!  Does anybody have advice/experience with this?

            ps – (from post above) I’m planning on ordering XBee adapters and trying to set one up  to be able to power on/off the modem.  Sara/anybody – please let me know if you’ve had a chance to test the process.

            in reply to: Trouble initializing XBee3 LTE-M #13835
            Cal
            Participant

              From time to time, some of my XBee radios in the field get into a state that won’t communicate.  Even though I can successfully execute AT commands nothing I’ve found but a power recycle will get it out of that state and communicating again.  One thing that can cause the problem is a power brownout but there are other causes that I don’t understand yet. Until I do, I’d like to put some code in my sketch that will power recycle the modem without requiring manual intervention.

              I know from above that I can control the RESET of the XBee by soldering a wire from Pin 5 of the XBee socket to an analog pin.  This method seems simple, but I’m not sure that RESET will clear all the problems that a power cycle does.

              I’d like to confirm that I can control the XBee power with Analog Pin A5 by:

              • using the XBee adapter
              • cutting trace 2-3 and soldering lands 1-2 on SJ1 of the XBee adapter, and
              • soldering ASSOC to A5 of SJ7 on the Mayfly

              I’d appreciate any corrections, suggestions and comments about this method.

              in reply to: Low power project #12954
              Cal
              Participant

                From what I read in the documentation, the following sketch should include these libraries for concurrent SDI-12 and RTC support.

                #include <SDI12_PCINT3.h>
                #include<Sodaq_PcInt_PCINT0.h>
                void setup() {}
                void loop() {}

                But I get compile error:

                libraries\EnviroDIY_PCInt_PCINT0\Sodaq_PcInt_PCINT0.cpp.o (symbol from plugin): In function PcInt::attachInterrupt(unsigned char, void (*)())’:
                (.text+0x0): multiple definition of
                __vector_4′
                libraries\EnviroDIY_SDI12_PCINT3\SDI12_PCINT3.cpp.o (symbol from plugin):(.text+0x0): first defined here
                collect2.exe: error: ld returned 1 exit status
                exit status 1
                Error compiling for board EnviroDIY Mayfly 1284p.

                I can get a sketch to compile (and work) with old SDI12_Mod.h instead of SDI12_PCINT3.h

                What is wrong?

                Cal

                in reply to: Battery Power Options #12904
                Cal
                Participant

                  Thanks, Shannon, for your response, clarifications and tremendous work with the Mayfly. Addressing your questions:

                  I’m powering the CS451 with the same 12v battery that powers the Mayfly from the 12-5v USB converter. The ground (-) of the Mayfly & battery are common. I could not find anywhere in the Campbell Sci specs the voltage level for the signal. But I did find in the SDI-12 Serial-Digital Interface Standard (SDI-12 Support Group, Utah) that the standard for the signal is essentially 0-5v. So, I plugged the signal line in Digital Pin #7 and it’s been working fine. If I had an oscilloscope I could confirm the voltages.

                  Cal

                  in reply to: Battery Power Options #12899
                  Cal
                  Participant

                    Next week I’m deploying several units – Mayfly with XBee using Hologram SIM, logging data from CS451 SDI-12 pressure transducers. They are replacing old 12v systems with Microhard 3G modems and CR300 Dataloggers. The old modems are power hungry and unreliable. The AT&T service is expensive and 3G will go away eventually. The dataloggers have trouble switching power to the modems and their solar charging circuit is unreliable. So I’m getting more reliability at a FAR lower equipment cost and monthly charge while using the existing sensors, enclosures & power (solar/12v batteries). I’m also getting more flexibility since I own the Mayfly sketch and the Internet server code.

                    I’d like to confirm a few things I think I know before connecting the power of Mayfly v0.5b:
                    1. the Ext 12v input will NOT charge a connected Lipo battery.
                    2. the voltage on the solar JST must be <= 6v, not the 20v-1a that’s listed on the LIPO CHARGER section of the hardware diagram
                    3. best option is to use a 12-5v USB charger (that Shannon has suggested in other posts) to power the Mayfly and charge the Lipo.

                    Thanks, Cal

                    in reply to: GPRSBee #12886
                    Cal
                    Participant

                      After a few months of successful communication with the DIGI XBee3, I am now starting to get failures with longer and successive Internet messages. Delays between sending messages helps.

                      I believe the problem is power related even though I’ve made the solder jumper. Once the XBee fails to transmit, I have to power-cycle it or airplane mode on/off to get out of the lockup. I’m invested in modules and software, so I need to make this solution work this summer rather than to start over with some other modem.

                      I think I should be able to solder an additional jumper wire or a capacitor from somewhere on the Mayfly to the Bee socket to increase the power supply to the XBee. Does anybody know if this would work? If so, where should I make the connections? How big of a capacitor?

                      Cal

                      in reply to: Battery Power Options #12848
                      Cal
                      Participant

                        Thanks Sara. I think a cheap 12v to 5v phone charger will work well for me then.
                        As for the LiPo battery – I will use a small one. Our transmissions are short and the LiPo will be recharged from the lead-acid battery.

                        I have the V0.5b version of the Mayfly – so I could use the 12v input. But I’m a little worried though that the voltage may spike above 14v during sunny days. Do you think that would be a problem?

                        I have a small disagreement with your last comment: “the modem wouldn’t be powered at all”. I often run my Mayfly + Digi modem WITHOUT a battery! It works (most of the time) so it does get power from my USB source – but I know it’s on the edge. I have the SJ13 soldered.

                        Cal

                      Viewing 10 posts - 11 through 20 (of 32 total)