<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 11.12.2017 um 06:47 schrieb Mark
      Webb-Johnson:<br>
    </div>
    <blockquote type="cite"
      cite="mid:09363C1F-A02D-4E5D-835D-D041DABD4B26@openvehicles.com">Under
      the principle of ‘keep everything powered off unless explicitely
      asked to power it on’, I think we should default enable.gps and
      enable.gpstime to FALSE.
      <div class=""><br class="">
      </div>
      <div class="">Thinking about the arrangement of a vehicle
        requiring GPS, perhaps this can be signalled somehow in
        vehicle.{h,cpp}? Have the vehicle module define there that it
        requires modem GPS and/or GPSTIME, and then have the nmea module
        enable appropriately? We can still retain modem/enable.gps(time)
        for explicitly enabling (I had a use case for this when a
        roadster owner on v2 had a broken car GPS, but the v2
        tesla_roadster module doesn't enable the modem gps).</div>
      <div class=""><br class="">
      </div>
      <div class="">So the logic in nmea becomes: If ((vehicle module
        needs modem GPS)||(modem enable.gps)) Then enable gps.</div>
      <div class=""><br class="">
      </div>
    </blockquote>
    <br>
    The SIMCOM module now listens to these events:<br>
    <ul>
      <li><tt>vehicle.require.gps</tt></li>
      <li><tt>vehicle.release.gps</tt></li>
      <li><tt>vehicle.require.gpstime</tt></li>
      <li><tt>vehicle.release.gpstime</tt><br>
      </li>
    </ul>
    If a vehicle needs GPS provided by the system, it does for example:<br>
    <br>
    <tt>    MyEvents.SignalEvent("vehicle.require.gps", NULL);</tt><br>
    <tt>    MyEvents.SignalEvent("vehicle.require.gpstime", NULL);</tt><br>
    <br>
    The SIMCOM module will in turn automatically power on and start the
    GPS subsystem as necessary, regardless of the "enable.gps" config.
    The signal normally will be added to the vehicle init but can be
    sent any time. The release signals can be used to shutdown the
    service when it's no longer needed.<br>
    <br>
    The "simcom status" command shows both enabled & required
    status.<br>
    <br>
    <tt>OVMS > simcom status</tt><tt><br>
    </tt><tt>SIMCOM</tt><tt><br>
    </tt><tt>  Network Registration: NotRegistered</tt><tt><br>
    </tt><tt>  State: PoweredOff</tt><tt><br>
    </tt><tt>  Ticker: 3</tt><tt><br>
    </tt><tt>  User Data: 0</tt><tt><br>
    </tt><tt>  Mux Open Channels: 0</tt><tt><br>
    </tt><tt>  PPP Not Connected</tt><tt><br>
    </tt><tt>  PPP Last Error: Undefined</tt><tt><br>
    </tt><tt>  GPS: <b>disabled</b></tt><tt><br>
    </tt><tt>  GPS time: disabled</tt><tt><br>
    </tt><tt>  NMEA (GPS/GLONASS) Not Connected</tt><tt><br>
    </tt><tt><br>
      OVMS > vehicle module RT</tt><tt><br>
    </tt><tt>I (46062) v-renaulttwizy: Renault Twizy vehicle module</tt><tt><br>
    </tt><tt>I (46062) events: Signal(power.can1.on)</tt><tt><br>
    </tt><tt>I (46072) v-renaulttwizy: battmon subsystem init</tt><tt><br>
    </tt><tt>I (46072) v-renaulttwizy: pwrmon subsystem init</tt><tt><br>
    </tt><tt>I (46082) events: Signal(<b>vehicle.require.gps</b>)</tt><tt><br>
    </tt><tt>I (46082) events: Signal(power.simcom.on)</tt><tt><br>
    </tt><tt>I (46082) simcom: State: Enter PoweringOn state</tt><tt><br>
    </tt><tt>I (46082) simcom: Power Cycle</tt><tt><br>
    </tt><tt>I (46562) events: Signal(vehicle.charge.mode)</tt><tt><br>
    </tt><tt>I (46562) events: Signal(vehicle.charge.state)</tt><tt><br>
    </tt><tt>I (47082) events: Signal(vehicle.require.gpstime)</tt><tt><br>
    </tt><tt>I (52562) simcom: State: Enter PoweredOn state</tt><tt><br>
    </tt><tt>I (72572) simcom: State: Enter MuxStart state</tt><tt><br>
    </tt><tt>I (72572) gsm-mux: Start MUX</tt><tt><br>
    </tt><tt>I (72572) gsm-mux: StartChannel(0)</tt><tt><br>
    </tt><tt>I (72572) gsm-mux: Channel #0 is open</tt><tt><br>
    </tt><tt>I (72572) gsm-mux: StartChannel(1)</tt><tt><br>
    </tt><tt>I (72582) gsm-mux: Channel #1 is open</tt><tt><br>
    </tt><tt>I (72582) gsm-mux: StartChannel(2)</tt><tt><br>
    </tt><tt>I (72592) gsm-mux: Channel #2 is open</tt><tt><br>
    </tt><tt>I (72592) gsm-mux: StartChannel(3)</tt><tt><br>
    </tt><tt>I (72602) gsm-mux: Channel #3 is open</tt><tt><br>
    </tt><tt>I (72602) gsm-mux: StartChannel(4)</tt><tt><br>
    </tt><tt>I (72612) gsm-mux: Channel #4 is open</tt><tt><br>
    </tt><tt>I (73562) simcom: State: Enter NetWait state</tt><tt><br>
    </tt><tt>I (73562) gsm-nmea: Startup</tt><tt><br>
    </tt><tt>I (80182) events: Signal(<b>gps.lock.acquired</b>)</tt><tt><br>
    </tt><tt>I (80192) notify: Raise text data:
RT-GPS-Log,0,86400,51.30230713,7.38993549,332,0,0,1,120,-97,0,0,0,0,0,0,40,0,0,1.000,1.000,0,0</tt><tt><br>
    </tt><tt>I (80192) events: Signal(system.modem.gotgps)</tt><tt><br>
    </tt><tt><br>
      OVMS > simcom status </tt><tt><br>
    </tt><tt>SIMCOM</tt><tt><br>
    </tt><tt>  Network Registration: RegisteredRoaming</tt><tt><br>
    </tt><tt>  State: NetMode</tt><tt><br>
    </tt><tt>  Ticker: 107</tt><tt><br>
    </tt><tt>  User Data: 0</tt><tt><br>
    </tt><tt>  Mux Open Channels: 4</tt><tt><br>
    </tt><tt>  PPP Connected on channel: #2</tt><tt><br>
    </tt><tt>  PPP Last Error: None</tt><tt><br>
    </tt><tt>  GPS: disabled, <b>required</b></tt><tt><br>
    </tt><tt>  GPS time: disabled, required</tt><tt><br>
    </tt><tt>  NMEA (GPS/GLONASS) Connected on channel: #1</tt><br>
    <br>
    <br>
    Regards,<br>
    Michael<br>
    <br>
    <br>
    <blockquote type="cite"
      cite="mid:09363C1F-A02D-4E5D-835D-D041DABD4B26@openvehicles.com">
      <div class="">Regards, Mark.<br class="">
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">On 10 Dec 2017, at 10:33 PM, Michael Balzer
              <<a href="mailto:dexter@expeedo.de" class=""
                moz-do-not-send="true">dexter@expeedo.de</a>> wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta http-equiv="Content-Type" content="text/html;
                charset=utf-8" class="">
              <div text="#000000" bgcolor="#FFFFFF" class=""> Works,
                pushed:<br class="">
                <br class="">
                <tt class="">OVMS > config list modem</tt><tt
                  class=""><br class="">
                </tt><tt class="">modem</tt><tt class=""><br class="">
                </tt><tt class="">  apn: hologram</tt><tt class=""><br
                    class="">
                </tt><tt class="">  apn.password: </tt><tt class=""><br
                    class="">
                </tt><tt class="">  apn.user: </tt><tt class=""><br
                    class="">
                </tt><b class=""><tt class="">  enable.gps: yes</tt></b><b
                  class=""><tt class=""><br class="">
                  </tt></b><b class=""><tt class="">  enable.gpstime:
                    yes</tt></b><tt class=""><br class="">
                </tt><tt class="">  <a href="http://enable.net"
                    class="" moz-do-not-send="true">enable.net</a>: yes</tt><tt
                  class=""><br class="">
                </tt><tt class="">  enable.sms: yes</tt><tt class=""><br
                    class="">
                </tt><tt class=""><br class="">
                </tt><tt class="">OVMS > power simcom on</tt><tt
                  class=""><br class="">
                </tt><tt class="">Power mode of simcom is now on</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (28084) events:
                  Signal(power.simcom.on)</tt><tt class=""><br class="">
                </tt><tt class="">I (28084) simcom: State: Enter
                  PoweringOn state</tt><tt class=""><br class="">
                </tt><tt class="">I (28084) simcom: Power Cycle</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (34414) simcom: State: Enter
                  PoweredOn state</tt><tt class=""><br class="">
                </tt><tt class="">I (53514) simcom: State: Enter MuxMode
                  state</tt><tt class=""><br class="">
                </tt><tt class="">I (53514) gsm-mux: Start MUX</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53514) gsm-mux: StartChannel(0)</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53524) gsm-mux: Channel #0 is open</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53524) gsm-mux: StartChannel(1)</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53534) gsm-mux: Channel #1 is open</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53534) gsm-mux: StartChannel(2)</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53544) gsm-mux: Channel #2 is open</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53544) gsm-mux: StartChannel(3)</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53544) gsm-mux: Channel #3 is open</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53544) gsm-mux: StartChannel(4)</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (53554) gsm-mux: Channel #4 is open</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (54514) simcom: State: Enter
                  NetStart state</tt><tt class=""><br class="">
                </tt><tt class="">I (54514) gsm-nmea: Startup</tt><tt
                  class=""><br class="">
                </tt><b class=""><tt class="">I (62414) events:
                    Signal(system.modem.gotgps)</tt></b><tt class=""><br
                    class="">
                </tt><tt class=""><br class="">
                </tt><tt class="">OVMS > metrics list utc</tt><tt
                  class=""><br class="">
                </tt><tt class="">m.time.utc                              
                  1512915059Sec</tt><tt class=""><br class="">
                </tt><tt class=""><br class="">
                </tt><tt class="">OVMS > metrics list .p.</tt><tt
                  class=""><br class="">
                </tt><tt class="">v.p.altitude                            
                  346m</tt><tt class=""><br class="">
                </tt><tt class="">v.p.direction                           
                  341.2°</tt><tt class=""><br class="">
                </tt><tt class="">v.p.gpshdop                             
                  1</tt><tt class=""><br class="">
                </tt><tt class="">v.p.gpslock                             
                  yes</tt><tt class=""><br class="">
                </tt><tt class="">v.p.gpsmode                             
                  AA</tt><tt class=""><br class="">
                </tt><tt class="">v.p.gpsspeed                            
                  0Kph</tt><tt class=""><br class="">
                </tt><tt class="">v.p.latitude                            
                  51.3023</tt><tt class=""><br class="">
                </tt><tt class="">v.p.longitude                           
                  7.39013</tt><tt class=""><br class="">
                </tt><tt class="">v.p.odometer                           
                </tt><tt class=""><br class="">
                </tt><tt class="">v.p.satcount                            
                  11</tt><tt class=""><br class="">
                </tt><tt class="">v.p.speed                              
                </tt><tt class=""><br class="">
                </tt><tt class="">v.p.trip                               
                </tt><tt class=""><br class="">
                </tt><tt class=""><br class="">
                </tt><tt class="">OVMS > power simcom sleep</tt><tt
                  class=""><br class="">
                </tt><tt class="">Power mode of simcom is now sleep</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (103104) events:
                  Signal(power.simcom.sleep)</tt><tt class=""><br
                    class="">
                </tt><tt class="">I (103514) simcom: State: Enter
                  NetSleep state</tt><tt class=""><br class="">
                </tt><tt class="">I (103514) gsm-ppp: Shutting down
                  (soft)...</tt><tt class=""><br class="">
                </tt><tt class="">I (103514) gsm-nmea: Shutdown (direct)</tt><tt
                  class=""><br class="">
                </tt><b class=""><tt class="">I (103514) events:
                    Signal(system.modem.lostgps)</tt></b><tt class=""><br
                    class="">
                </tt><tt class=""><br class="">
                </tt><tt class="">OVMS > power simcom on</tt><tt
                  class=""><br class="">
                </tt><tt class="">Power mode of simcom is now on</tt><tt
                  class=""><br class="">
                </tt><tt class="">I (154494) events:
                  Signal(power.simcom.on)</tt><tt class=""><br class="">
                </tt><tt class="">I (154514) simcom: State: Enter
                  NetStart state</tt><tt class=""><br class="">
                </tt><tt class="">I (154514) gsm-nmea: Startup</tt><tt
                  class=""><br class="">
                </tt><b class=""><tt class="">I (159414) events:
                    Signal(system.modem.gotgps)</tt></b><tt class=""><br
                    class="">
                </tt><tt class="">I (160544) simcom: PPP Connection is
                  ready to start</tt><tt class=""><br class="">
                </tt><tt class="">I (161514) simcom: State: Enter
                  NetMode state</tt><tt class=""><br class="">
                </tt><tt class="">I (161514) gsm-ppp: Startup</tt><br
                  class="">
                <br class="">
                <br class="">
                I've changed direction & altitude to float, missed
                those on the previous rework.<br class="">
                <br class="">
                I've removed setting "m.time.utc" from the Twizy and Kia
                modules. On the Roadster, set "enable.gpstime" to "no".<br
                  class="">
                <br class="">
                I'm getting around 10 satellites all the time with my
                GSM antenna and our currently very snowy weather, so it
                seems we don't need active GPS antennas with this
                module. But I haven't had it on the road yet.<br
                  class="">
                <br class="">
                Regards,<br class="">
                Michael<br class="">
                <br class="">
                <br class="">
                <div class="moz-cite-prefix">Am 10.12.2017 um 09:23
                  schrieb Michael Balzer:<br class="">
                </div>
                <blockquote type="cite"
                  cite="mid:1dc9a452-f2c3-0b5b-d119-c75e4c1af5c5@expeedo.de"
                  class="">
                  <meta http-equiv="Content-Type" content="text/html;
                    charset=utf-8" class="">
                  Toms comment made me test my GSM antenna, lo and
                  behold, it works:<br class="">
                  <br class="">
                  <tt class="">D (298314) gsm-nmea: IncomingLine:
                    $GPGSV,2,1,06,01,,,31,08,26,174,30,14,45,082,37,19,01,323,23*42</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298314) gsm-nmea: IncomingLine:
                    $GPGSV,2,2,06,22,68,234,25,32,,,35*44</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298324) gsm-nmea: IncomingLine:
                    $GLGSV,2,1,06,66,19,039,43,82,56,144,38,75,11,007,34,81,07,142,16*6A</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298334) gsm-nmea: IncomingLine:
                    $GLGSV,2,2,06,67,73,053,46,68,45,213,31*6F</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298334) gsm-nmea: IncomingLine:
$GPGGA,080552.0,5118.139329,N,00723.395918,E,1,02,2.1,316.7,M,47.0,M,,*50</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298344) gsm-nmea: IncomingLine:
                    $GNGNS,080552.0,5118.139329,N,00723.395918,E,AA,06,2.1,316.7,47.0,,*60</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298344) gsm-nmea: IncomingLine:
                    $GPVTG,,T,0.0,M,0.0,N,0.0,K,A*0D</tt><tt class=""><br
                      class="">
                  </tt><tt class="">D (298354) gsm-nmea: IncomingLine:
                    $GPRMC,080552.0,A,5118.139329,N,00723.395918,E,0.0,,101217,,,A*49</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298354) gsm-nmea: IncomingLine:
                    $GPGSA,A,2,08,14,,,,,,,,,,,2.3,2.1,0.9*35</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298364) gsm-nmea: IncomingLine:
                    $GNGSA,A,2,08,14,,,,,,,,,,,2.3,2.1,0.9*2B</tt><tt
                    class=""><br class="">
                  </tt><tt class="">D (298364) gsm-nmea: IncomingLine:
                    $GNGSA,A,2,66,67,75,82,,,,,,,,,2.3,2.1,0.9*2F</tt><br
                    class="">
                  <br class="">
                  <br class="">
                  My GPS antenna is an active one for V2, it seems the
                  current module does not support active antennas.<br
                    class="">
                  <br class="">
                  Actice GPS antennas are the standard choice over here.
                  If the SIM5360 can do without, that will eliminate
                  another energy drain, so is good. Users will need to
                  know they'll need another antenna.<br class="">
                  <br class="">
                  Regards,<br class="">
                  Michael<br class="">
                </blockquote>
                <br class="">
                <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
              </div>
              _______________________________________________<br
                class="">
              OvmsDev mailing list<br class="">
              <a href="mailto:OvmsDev@lists.teslaclub.hk" class=""
                moz-do-not-send="true">OvmsDev@lists.teslaclub.hk</a><br
                class="">
              <a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br
                class="">
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </body>
</html>