<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Hi Michael,<br>
      great! Thanks a lot for your effort and patience. <br>
      I first thought, that debugging the code without direct access to
      the hardware would be very difficult, but this really worked out
      fine.<br>
      <br>
      So, I will issue a PR.<br>
      <br>
      Best regards<br>
        Christian<br>
      <br>
      Am 30.03.2025 um 17:31 schrieb Michael Balzer via OvmsDev:<br>
    </div>
    <blockquote type="cite"
      cite="mid:520bdb20-a9ed-4e99-a0a6-b8a0320fc8be@expeedo.de">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      Christian,<br>
      <br>
      this looks very good now. I've mistreated my test modules in all
      ways I could think of including switching off the running modem
      via S1, the cellular system recovered nicely from all situations.<br>
      <br>
      Regards,<br>
      Michael<br>
      <br>
      <br>
      <div class="moz-cite-prefix">Am 30.03.25 um 16:01 schrieb Info via
        OvmsDev:<br>
      </div>
      <blockquote type="cite"
        cite="mid:d4b5fb95-352a-4e51-ba30-989db2b7288b@zeitnitz.eu">
        <meta http-equiv="Content-Type"
          content="text/html; charset=UTF-8">
        Hi Michael,<br>
        I think I found the problem which caused the 5360 not to
        powercycle correctly. Actually the T_on time was in that
        instance set to 1126913089 ms, so this will take a while!<br>
        This was caused by a stupid mistake with an incorrect modulo
        calculation of the timing index .<br>
        <br>
        I fixed the unused variables as well.<br>
        <br>
        Best regards<br>
           Christian<br>
        <br>
         <br>
        <br>
        <br>
        <div class="moz-cite-prefix">Am 30.03.2025 um 14:26 schrieb
          Michael Balzer via OvmsDev:<br>
        </div>
        <blockquote type="cite"
          cite="mid:85be048f-de3c-4859-bf53-444ed32a0591@expeedo.de">
          <meta http-equiv="Content-Type"
            content="text/html; charset=UTF-8">
          PS: please fix the two unused variables now in gsmnmea.cpp:<br>
          <br>
          <font face="monospace">/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_cellular/src/gsmnmea.cpp:
            In member function 'void
            GsmNMEA::IncomingLine(std::__cxx11::string)':<br>
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_cellular/src/gsmnmea.cpp:148:40:
            warning: variable 'vdop' set but not used
            [-Wunused-but-set-variable]<br>
                 float lat=0, lon=0, alt=0, hdop=0, vdop=0, pdop=0;<br>
                                                    ^<br>
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_cellular/src/gsmnmea.cpp:148:48:
            warning: variable 'pdop' set but not used
            [-Wunused-but-set-variable]<br>
                 float lat=0, lon=0, alt=0, hdop=0, vdop=0, pdop=0;<br>
                                                            ^</font><br>
          <br>
          Regards,<br>
          Michael<br>
          <br>
          <br>
          <div class="moz-cite-prefix">Am 30.03.25 um 14:21 schrieb
            Michael Balzer via OvmsDev:<br>
          </div>
          <blockquote type="cite"
            cite="mid:d805fb76-6abc-46bc-af33-ed207e9947d3@expeedo.de">
            <meta http-equiv="Content-Type"
              content="text/html; charset=UTF-8">
            Christian,<br>
            <br>
            the user way to power off/on the modem is via "power
            cellular off/on", that's what I test/ed, and that works.<br>
            <br>
            After having no issues now with the 7600, I did the tests
            with my old 5360 module.<br>
            <br>
            That generally also worked, with one exception: on one of
            four crash reboots, the cellular system got stuck in
            PowerOffOn state, with state ticker at 0 and no more
            activity.<br>
            <br>
            Logs attached.<br>
            <br>
            Regards,<br>
            Michael<br>
            <br>
            <br>
            <div class="moz-cite-prefix">Am 30.03.25 um 13:08 schrieb
              Info via OvmsDev:<br>
            </div>
            <blockquote type="cite"
cite="mid:05d580ce-8050-4471-a696-6362be6efc2d@zeitnitz.eu">
              <meta http-equiv="Content-Type"
                content="text/html; charset=UTF-8">
              Michael,<br>
              one more thing: if you are performing another test, please
              check from the console, that the powering of the modem
              works as well.<br>
              <br>
              cellular setstate PoweringOff <br>
              cellular setstate PoweringOn<br>
              <br>
              It did not work when I started with the 7670 and I had to
              modify ovms_cellular (set m_powermode according to the
              state) to get it going.<br>
              <br>
              Thanks<br>
                Christian<br>
              <br>
              <br>
              <br>
              <div class="moz-cite-prefix">Am 30.03.2025 um 12:02
                schrieb Info via OvmsDev:<br>
              </div>
              <blockquote type="cite"
cite="mid:42fc0d46-6aec-42eb-8d3d-04ef05ca9b5f@zeitnitz.eu">
                <meta http-equiv="Content-Type"
                  content="text/html; charset=UTF-8">
                OK, thanks Michael. <br>
                At least this was an easy fix.<br>
                <br>
                Had a look at the NMEA code and I screwed up the
                istringstream object when checking for the CGNSSINFO
                string.<br>
                Fixed it and I hope this works now as well.<br>
                <br>
                Best regards<br>
                  Christian<br>
                <br>
                <br>
                <br>
                <div class="moz-cite-prefix">Am 29.03.2025 um 18:42
                  schrieb Michael Balzer via OvmsDev:<br>
                </div>
                <blockquote type="cite"
cite="mid:619a71a4-51dd-4a6a-a62c-1a432948f76d@expeedo.de">
                  <meta http-equiv="Content-Type"
                    content="text/html; charset=UTF-8">
                  Christian,<br>
                  <br>
                  the GSM/PPP part now works smoothly with all standard
                  situations tested so far.<br>
                  <br>
                  But the GPS part doesn't work. It looks like the NMEA
                  sentences are received in the MUX channel, but not
                  forwarded to the NMEA module.<br>
                  <br>
                  V (794230) gsm-mux: ProcessFrame(CHAN=3, ADDR=0d,
                  CTRL=ff, FCS=fa, LEN=78)<br>
                  V (794230) gsm-mux: ProcessFrame(CHAN=3, ADDR=0d,
                  CTRL=ff, FCS=f4, LEN=82)<br>
                  <br>
                  These should be the NMEA sentences, but there are no
                  corresponding log entries from gsm-nmea.<br>
                  <br>
                  New logs attached.<br>
                  <br>
                  Regards,<br>
                  Michael<br>
                  <br>
                  <br>
                  <div class="moz-cite-prefix">Am 29.03.25 um 15:13
                    schrieb Info via OvmsDev:<br>
                  </div>
                  <blockquote type="cite"
cite="mid:644ac35a-168c-44a5-8320-5a65f3f72d9e@zeitnitz.eu">
                    <meta http-equiv="Content-Type"
                      content="text/html; charset=UTF-8">
                    Hi Michael,<br>
                    thanks for testing.<br>
                    <br>
                    The results look odd, so I went back to the
                    schematics of OVMS modules and realized, that I was
                    mistaken. The PWRKEY pin is actually inverted in the
                    modules as well. This definetly explains the strange
                    behaviour. <br>
                    <br>
                    I changed now the logic in simcom_powering.h and the
                    inverted PWRKEY level is now the default.<br>
                    <br>
                    Could you please run another test?<br>
                    <br>
                    Best regards<br>
                      Christian<br>
                    <br>
                    <div class="moz-cite-prefix">Am 29.03.2025 um 09:25
                      schrieb Michael Balzer via OvmsDev:<br>
                    </div>
                    <blockquote type="cite"
cite="mid:1651ee05-ec1d-4677-a57c-a9ec7cfbbd6d@expeedo.de">
                      <meta http-equiv="Content-Type"
                        content="text/html; charset=UTF-8">
                      Christian,<br>
                      <br>
                      well done on the 7670 support :-)<br>
                      <br>
                      I've just done some first tests of your branch on
                      the 7600, which turned up some issues. Logs
                      attached:<br>
                      <ul>
                        <li>Cold boot failed in 2 of 3 test boots, with
                          the driver getting stuck in a loop (poweredon
                          / identify / muxstart)</li>
                        <li>Regular shutdown fails to power down the
                          modem in time -- for a deep sleep phase, this
                          would mean the modem will remain powered on</li>
                        <li>After a crash, the modem driver gets somehow
                          stuck in PowerOffOn state<br>
                        </li>
                      </ul>
                      It seems the test for reaction ("AT") sometimes
                      gets skipped, even though the modem isn't ready
                      yet.<br>
                      <br>
                      On the failed cold boot log, you can see this at
                      the end:<br>
                      <br>
                      <font face="monospace"><b>I (389178)
                          cellular-modem-auto: Power Cycle</b><br>
                        I (389178) Simcom: Power Cycle - T_off 2500 ms -
                        T_on 200 ms<br>
                        D (389178) events:
                        Signal(system.modem.poweringon)<br>
                        D (389188) events: Signal(egpio.output.0.low)<br>
                        D (391678) events: Signal(egpio.output.0.high)<br>
                        D (396678) events: Signal(egpio.output.0.low)<br>
                        D (396878) events: Signal(egpio.output.0.high)<br>
                        <b>I (396878) cellular: State: Enter Identify
                          state<br>
                          D (396978) cellular: tx-cmd: AT+CGMM</b><br>
                        D (396978) cellular: tx-cmd: AT+CGMM<br>
                        D (396978) cellular: tx-cmd: AT+CGMM<br>
                        D (396978) cellular: tx-cmd: AT+CGMM<br>
                        D (396978) cellular: tx-cmd: AT+CGMM<br>
                        D (396978) cellular: tx-cmd: AT+CGMM<br>
                        D (396978) cellular: tx-cmd: AT+CGMM<br>
                        I (397008) cellular: Identified cellular modem:
                        SIM7600/Experimental support for SIMCOM SIM7600<br>
                        D (397008) cellular: Remove old 'auto' modem
                        driver<br>
                        I (397008) cellular: Set modem driver to
                        'SIM7600'<br>
                        <b>I (397008) cellular: State: Enter PoweredOn
                          state</b><br>
                        D (397008) events:
                        Signal(system.modem.installed)<br>
                        D (397008) events:
                        Signal(system.modem.poweredon)<br>
                        D (406178) cellular: tx-cmd:
AT+CPIN?;+CREG=1;+CGREG=1;+CEREG=1;+CTZU=1;+CTZR=1;+CLIP=1;+CMGF=1;+CNMI=1,2,0,0,0;+CSDH=1;+CMEE=2;+CSQ;+AUTOCSQ=1,1;E0;S0=0<br>
                        D (408178) cellular: tx-cmd: AT+CGMR;+ICCID<br>
                        D (416178) cellular: tx-cmd: AT+CMUX=0;+CATR=6<br>
                        D (434808) cellular: mux-rx-line #0 (2/46): OK<br>
                        <b>D (434808) cellular: mux-rx-line #0 (3/39):
                          RDY</b><br>
                        D (434808) cellular: mux-rx-line #0 (12/23):
                        +CPIN: READY<br>
                        D (434808) cellular: mux-rx-line #0 (8/11): SMS
                        DONE<br>
                        D (434808) cellular: mux-rx-line #0 (7/0): PB
                        DONE<br>
                        I (434808) cellular: State: Enter MuxStart state<br>
                        D (434808) events: Signal(system.modem.muxstart)</font><br>
                      <br>
                      <br>
                      Regards,<br>
                      Michael<br>
                      <br>
                      <br>
                      <div class="moz-cite-prefix">Am 26.03.25 um 13:13
                        schrieb Info Zeitnitz via OvmsDev:<br>
                      </div>
                      <blockquote type="cite"
cite="mid:d5cf7822-c7a8-4729-b16d-a9cf74aaab00@zeitnitz.eu">Dear all, <br>
                        I finished to integrate the Simcom 7670 modem
                        into the OVMS code. <br>
                        See <a class="moz-txt-link-freetext"
href="https://github.com/zbchristian/Open-Vehicle-Monitoring-System-3.git"
                          moz-do-not-send="true">https://github.com/zbchristian/Open-Vehicle-Monitoring-System-3.git</a>
                        branch update_cellular. <br>
                        <br>
                        Modem Powering <br>
                        =============== <br>
                        I had problems to get the 7670 working with the
                        current code. The modem was stuck in a power
                        cycle loop. <br>
                        <br>
                        I checked the Simcom documentation for the 4
                        models 5360, 7000 series, 7600, 7670 and the
                        powering procedure via the PWRKEY pin is the
                        same, but with different on/off timing.
                        Depending on the hardware, the PWRKEY can be
                        inverted as well. This is the case for my Lilygo
                        TCall board, but I think not for the OVMS HW
                        versions. At least version 3.1 connects the
                        corresponding MAX7317 pin directly to the modem.
                        <br>
                        <br>
                        Assuming, that all hardware versions use the
                        PWRKEY procedure for powering, I streamlined the
                        code and moved the corresponding functions into
                        separate files (simcom_powering.cpp and
                        simcom_powering.h). This avoids the duplication
                        of the code. <br>
                        <br>
                        All this leads to substantial changes in
                        ovms_cellular and ovms_cellular_modem_driver as
                        well. <br>
                        <br>
                        The code works now perfectly for the 7670, but
                        testing is required for all other models. <br>
                        If my assumptions about the OVMS HW versions are
                        not correct, or the modems do not work as
                        documented, some modifications might be needed.
                        <br>
                        <br>
                        GNSS Location <br>
                        ============ <br>
                        The 7670 no longer accepts the currently used AT
                        commands to obtain the location  as a GRMC
                        sentence. So, I added code to the new 7670 class
                        to request the location via the AT+CGNSSINFO
                        command. <br>
                        Since this has to be send explicitly again and
                        again,  I implemented a corresponding call in
                        the StatusPoller of the 7670. <br>
                        All the NMEA related code has been adapted to
                        handle the corresponding CGNSSINFO response. <br>
                        <br>
                        <br>
                        In conclusion, before doing a pull request, it
                        would make sense that the code is tested with
                        the other hardware and modem models. <br>
                        <br>
                        So, tell me what you think and if the general
                        strategy of the mods make sense to you. <br>
                        <br>
                        Best regards <br>
                          Christian <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        _______________________________________________
                        <br>
                        OvmsDev mailing list <br>
                        <a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
                          href="mailto:OvmsDev@lists.openvehicles.com"
                          moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
                        <br>
                        <a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                          moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
                        <br>
                      </blockquote>
                      <br>
                      <pre class="moz-signature" cols="72">-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
                      <br>
                      <fieldset class="moz-mime-attachment-header"></fieldset>
                      <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
                      href="mailto:OvmsDev@lists.openvehicles.com"
                      moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                      moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
                    </blockquote>
                    <br>
                    <br>
                    <fieldset class="moz-mime-attachment-header"></fieldset>
                    <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
                    href="mailto:OvmsDev@lists.openvehicles.com"
                    moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                    moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
                  </blockquote>
                  <br>
                  <pre class="moz-signature" cols="72">-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
                  <br>
                  <fieldset class="moz-mime-attachment-header"></fieldset>
                  <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
                  href="mailto:OvmsDev@lists.openvehicles.com"
                  moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                  moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
                </blockquote>
                <br>
                <br>
                <fieldset class="moz-mime-attachment-header"></fieldset>
                <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
                href="mailto:OvmsDev@lists.openvehicles.com"
                moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
                moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
              </blockquote>
              <br>
              <br>
              <fieldset class="moz-mime-attachment-header"></fieldset>
              <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
              href="mailto:OvmsDev@lists.openvehicles.com"
              moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
              moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
            </blockquote>
            <br>
            <pre class="moz-signature" cols="72">-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
            <br>
            <fieldset class="moz-mime-attachment-header"></fieldset>
            <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
            href="mailto:OvmsDev@lists.openvehicles.com"
            moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
            moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
          </blockquote>
          <br>
          <pre class="moz-signature" cols="72">-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
          <br>
          <fieldset class="moz-mime-attachment-header"></fieldset>
          <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
          href="mailto:OvmsDev@lists.openvehicles.com"
          moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
          href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
          moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
        </blockquote>
        <br>
        <br>
        <fieldset class="moz-mime-attachment-header"></fieldset>
        <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
        href="mailto:OvmsDev@lists.openvehicles.com"
        moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext"
        href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"
        moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
      </blockquote>
      <br>
      <pre class="moz-signature" cols="72">-- 
Michael Balzer * Am Rahmen 5 * D-58313 Herdecke
Fon 02330 9104094 * Handy 0176 20698926</pre>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>