<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">My bad. Here are the commands from v2:<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Andale Mono" class="">// The command strings are prefixed with a security control flag:</font></div><div class=""><font face="Andale Mono" class="">//   space: no security control</font></div><div class=""><font face="Andale Mono" class="">//   1:     the first argument must be the module password</font></div><div class=""><font face="Andale Mono" class="">//   2:     the caller must be the registered telephone</font></div><div class=""><font face="Andale Mono" class="">//   3:     the caller must be the registered telephone, or first argument the module password</font></div><div class=""><font face="Andale Mono" class=""><br class=""></font></div><div class=""><font face="Andale Mono" class="">rom char sms_cmdtable[][NET_SMS_CMDWIDTH] =</font></div><div class=""><font face="Andale Mono" class="">  { "3REGISTER?",</font></div><div class=""><font face="Andale Mono" class="">    "1REGISTER",</font></div><div class=""><font face="Andale Mono" class="">    "3PASS?",</font></div><div class=""><font face="Andale Mono" class="">    "2PASS ",</font></div><div class=""><font face="Andale Mono" class="">    "3GPS",</font></div><div class=""><font face="Andale Mono" class="">    "3STAT",</font></div><div class=""><font face="Andale Mono" class="">    "3PARAMS?",</font></div><div class=""><font face="Andale Mono" class="">    "2PARAMS ",</font></div><div class=""><font face="Andale Mono" class="">    "1AP ",</font></div><div class=""><font face="Andale Mono" class="">    "3MODULE?",</font></div><div class=""><font face="Andale Mono" class="">    "2MODULE ",</font></div><div class=""><font face="Andale Mono" class="">    "3VEHICLE?",</font></div><div class=""><font face="Andale Mono" class="">    "2VEHICLE ",</font></div><div class=""><font face="Andale Mono" class="">    "3GPRS?",</font></div><div class=""><font face="Andale Mono" class="">    "2GPRS ",</font></div><div class=""><font face="Andale Mono" class="">    "3GSMLOCK?",</font></div><div class=""><font face="Andale Mono" class="">    "2GSMLOCK",</font></div><div class=""><font face="Andale Mono" class="">    "3SERVER?",</font></div><div class=""><font face="Andale Mono" class="">    "2SERVER ",</font></div><div class=""><font face="Andale Mono" class="">    "3DIAG",</font></div><div class=""><font face="Andale Mono" class="">    "3FEATURES?",</font></div><div class=""><font face="Andale Mono" class="">    "2FEATURE ",</font></div><div class=""><font face="Andale Mono" class="">#ifndef OVMS_NO_HOMELINK</font></div><div class=""><font face="Andale Mono" class="">    "2HOMELINK",</font></div><div class=""><font face="Andale Mono" class="">#endif // OVMS_NO_HOMELINK</font></div><div class=""><font face="Andale Mono" class="">#ifndef OVMS_NO_LOCK</font></div><div class=""><font face="Andale Mono" class="">    "2LOCK",</font></div><div class=""><font face="Andale Mono" class="">    "2UNLOCK",</font></div><div class=""><font face="Andale Mono" class="">    "2VALET",</font></div><div class=""><font face="Andale Mono" class="">    "2UNVALET",</font></div><div class=""><font face="Andale Mono" class="">#endif // OVMS_NO_LOCK</font></div><div class=""><font face="Andale Mono" class="">#ifndef OVMS_NO_CHARGECONTROL</font></div><div class=""><font face="Andale Mono" class="">    "2CHARGEMODE ",</font></div><div class=""><font face="Andale Mono" class="">    "2CHARGESTART",</font></div><div class=""><font face="Andale Mono" class="">    "2CHARGESTOP",</font></div><div class=""><font face="Andale Mono" class="">    "2COOLDOWN",</font></div><div class=""><font face="Andale Mono" class="">#endif // OVMS_NO_CHARGECONTROL</font></div><div class=""><font face="Andale Mono" class="">    "3VERSION",</font></div><div class=""><font face="Andale Mono" class="">    "3RESET",</font></div><div class=""><font face="Andale Mono" class="">#ifndef OVMS_NO_CTP</font></div><div class=""><font face="Andale Mono" class="">    "3CTP",</font></div><div class=""><font face="Andale Mono" class="">#endif //OVMS_NO_CTP</font></div><div class=""><font face="Andale Mono" class="">    "3TEMPS",</font></div><div class=""><font face="Andale Mono" class="">#ifdef OVMS_ACCMODULE</font></div><div class=""><font face="Andale Mono" class="">    "2ACC ",</font></div><div class=""><font face="Andale Mono" class="">#endif</font></div></div><div class=""><div class=""><font face="Andale Mono" class="">    "3HELP",</font></div><div class=""><font face="Andale Mono" class="">    "" };</font></div></div></blockquote><div class=""><br class=""></div><div class="">You are correct. Everything is privileged.</div><div class=""><br class=""></div><div class="">Regards, Mark</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 4 Nov 2017, at 9:57 PM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">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="">
    Thanks for checking.<br class="">
    <br class="">
    But... I checked before & again: STAT was privileged in V2, in
    fact there were no unprivileged standard commands.<br class="">
    <br class="">
    Also the command should still be privileged because I don't want any
    person knowing my SIM number to be able to read my charge status
    & odometer. That info can be used to precisely track a vehicle
    when combined with other data.<br class="">
    <br class="">
    Or did I get the security concept wrong?<br class="">
    <br class="">
    Regards,<br class="">
    Michael<br class="">
    <br class="">
    <br class="">
    <div class="moz-cite-prefix">Am 04.11.2017 um 14:02 schrieb Mark
      Webb-Johnson:<br class="">
    </div>
    <blockquote type="cite" cite="mid:63803BFB-BD40-44F5-A611-755B11ACC148@webb-johnson.net" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
      Looks good.
      <div class=""><br class="">
      </div>
      <div class="">Only change I made was to make it ‘non privileged’
        (to match ovms v2).</div>
      <div class=""><br class="">
      </div>
      <div class="">The way these are going to be implemented is using
        the BufferedShell() class. This implements an OvmsWriter that
        simply buffers the output for later collection. The SMS system
        will receive a command, then pass it to the OvmsCommandApp
        system using this BufferedShell() as the writer. Once the
        command completes execution, the output in BufferedShell() will
        be collected, and sent back out in an SMS reply. Privileged
        commands will be slightly different than OVMS v2. To run a
        privileged command, you either send it from the registered phone
        number, or prefix the command with the module password. Either
        will cause the IsSecure() to be set true on the BufferedShell(),
        before the command is executed.</div>
      <div class=""><br class="">
      </div>
      <div class="">Regards, Mark.</div>
      <div class=""><br class="">
        <div class="">
          <blockquote type="cite" class="">
            <div class="">On 4 Nov 2017, at 5:51 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=""> I've added
                a default implementation for the "stat" command.<br class="">
                <br class="">
                <tt class="">    virtual vehicle_command_t
                  CommandStat(int verbosity, OvmsWriter* writer);</tt><br class="">
                <br class="">
                I thought about letting the vehicle module generate a
                std::string, but it would still need the verbosity and
                would always need another memory buffer, so I think
                passing the writer to vehicle methods generating output
                is better -- please correct me if there is a system
                design decision I'm breaking with this.<br class="">
                <br class="">
                Regards,<br class="">
                Michael<br class="">
                <br class="">
                <br class="">
                <div class="moz-cite-prefix">Am 30.10.2017 um 07:06
                  schrieb Mark Webb-Johnson:<br class="">
                </div>
                <blockquote type="cite" cite="mid:95054693-82AD-44D4-A22C-34798F9BDB53@webb-johnson.net" class="">
                  <meta http-equiv="Content-Type" content="text/html;
                    charset=utf-8" class="">
                  I’ve implemented these standard commands in vehicle
                  framework:
                  <div class=""><br class="">
                  </div>
                  <blockquote style="margin: 0 0 0 40px; border: none;
                    padding: 0px;" class="">
                    <div class="">
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t
                            CommandSetChargeMode(vehicle_mode_t mode);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t
                            CommandSetChargeCurrent(uint16_t limit);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandStartCharge();</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandStopCharge();</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandSetChargeTimer(bool
                            timeron, uint16_t timerstart);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandCooldown(bool
                            cooldownon);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandWakeup();</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandLock(const char*
                            pin);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandUnlock(const char*
                            pin);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandActivateValet(const
                            char* pin);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t
                            CommandDeactivateValet(const char* pin);</span></font></div>
                      <div class=""><font class="" face="Andale Mono"><span style="font-size: 18px;" class="">virtual
                            vehicle_command_t CommandHomelink(uint8_t
                            button);</span></font></div>
                    </div>
                  </blockquote>
                  <div class=""><br class="">
                  </div>
                  <div class="">Also implemented most of these for the
                    Tesla Roadster, as an example implementation.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">I haven’t changed ovms_server_v2 yet, to
                    implement the standard command processor for these,
                    but that should be trivial.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Vehicle modules are able to implement
                    handlers for these standardised commands, as well as
                    their own custom commands (if required).</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Regards, Mark.</div>
                </blockquote>
                <br class="">
                <pre class="moz-signature" cols="72">-- 
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 class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
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 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="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>