<html>
  <head>
    <meta content="text/html; charset=ISO-8859-15"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Nikolay,<br>
      <br>
      the documentation needs some updates, the vehicle type parameter
      is new.<br>
      <br>
      Easiest GPRS test is done by using the standard server and the iOS
      or Android App.<br>
      <br>
      To set up your own OVMS server, you need a public IP, a mysqld and
      perl. See "server" directory in the git repository.<br>
      <br>
      Set up some mysql schema e.g. "ovms" and access, prime the schema
      using "mysql ovms < ovms_server.sql" and change
      "ovms_server.conf" accordingly.<br>
      <br>
      To be able to connect your module, manually add an entry to the
      ovms_cars table like this:<br>
      <br>
      insert into ovms_cars set vehicleid='...', carpass='...',
      userpass='...', changed=now();<br>
      <br>
      The server is started by "./ovms_server.pl" (or "perl
      ovms_server.pl" if non-UNIX). Configure your module using "GPRS"
      and "SERVER" and you should see log output from the server
      (stdout).<br>
      <br>
      It's best to start without paranoid mode, so you can read what's
      happening.<br>
      <br>
      Btw: I had trouble with my first SIM card as well in the
      beginning. That was network/provider related, after letting the
      module on for some hours, the GPRS registration suddenly succeeded
      and has been quick + stable since.<br>
      <br>
      Regards,<br>
      Michael<br>
      <br>
      <br>
      Am 02.01.2013 10:05, schrieb Nikolay Shishkov:<br>
    </div>
    <blockquote
      cite="mid:1357117507.88430.YahooMailNeo@web142605.mail.bf1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:times
        new roman, new york, times, serif;font-size:12pt">
        <div>Thanks Mark, </div>
        <div>Looking at the code the VEHICLE TYPE is the 4th parameter
          of the MODULE command. </div>
        <div>I will test this today and report back.</div>
        <div><span style="background-color: transparent;">I was looking
            at the user guide for Tesla and the MODULE command has
            listed 3 parameters... </span><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          'times new roman', 'new york', times, serif; background-color:
          transparent; font-style: normal;"><span
            style="background-color: transparent;"><br>
          </span></div>
        <div>I forgot to mention that I tested 2 different sim cards in
          Sweden:</div>
        <div> 1- mini sim format (like iphone 4) with adapter, operator
          3 - did not work, the error code is blinking too fast for me
          to reliably count it.</div>
        <div> 2 - standard sim format, operator telia - worked for sms</div>
        <div><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          'times new roman', 'new york', times, serif; background-color:
          transparent; font-style: normal;">Still haven't tested the
          gprs function. Any good advice on how to test the GPRS
          function - can I setup a simple server to just register the
          incoming messages? </div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          'times new roman', 'new york', times, serif; background-color:
          transparent; font-style: normal;"><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          'times new roman', 'new york', times, serif; background-color:
          transparent; font-style: normal;">Nikolay</div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          'times new roman', 'new york', times, serif; background-color:
          transparent; font-style: normal;"><br>
        </div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          'times new roman', 'new york', times, serif; background-color:
          transparent; font-style: normal;"> </div>
        <div style="font-family: 'times new roman', 'new york', times,
          serif; font-size: 12pt;">
          <div style="font-family: 'times new roman', 'new york', times,
            serif; font-size: 12pt;">
            <div dir="ltr"> <font face="Arial" size="2">
                <hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
                Mark Webb-Johnson <a class="moz-txt-link-rfc2396E" href="mailto:mark@webb-johnson.net"><mark@webb-johnson.net></a><br>
                <b><span style="font-weight: bold;">To:</span></b> OVMS
                Developers <a class="moz-txt-link-rfc2396E" href="mailto:ovmsdev@lists.teslaclub.hk"><ovmsdev@lists.teslaclub.hk></a> <br>
                <b><span style="font-weight: bold;">Sent:</span></b>
                Wednesday, January 2, 2013 2:28 AM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                Re: [Ovmsdev] some partial success<br>
              </font> </div>
            <br>
            <meta http-equiv="x-dns-prefetch-control" content="off">
            <div id="yiv228268277">
              <div>Nikolay,
                <div><br>
                </div>
                <div>
                  <blockquote type="cite">
                    <div>
                      <div style="color: rgb(0, 0, 0); background-color:
                        rgb(255, 255, 255); font-family: 'times new
                        roman', 'new york', times, serif; font-size:
                        12pt;">
                        <div style="font-family: 'times new roman', 'new
                          york', times, serif; font-size: 16px; color:
                          rgb(0, 0, 0); background-color: transparent;
                          font-style: normal;">Unfortunately it did not
                          seem to work. On STAT request the response was
                          generated from the net_sms code and not my new
                          code for the Think EV.</div>
                      </div>
                    </div>
                  </blockquote>
                </div>
                <div><br>
                </div>
                <div>So long as you've registered the hook correctly, it
                  should work. Are you sure you set the module correctly
                  to TC so your vehicle module is the one actually used?
                  This is the SMS MODULE command (I think it is the last
                  parameter).</div>
                <div><br>
                </div>
                <div>You can SMS PARAMS? or MODULE? to see what
                  parameters are set.</div>
                <div><br>
                </div>
                <div>
                  <blockquote type="cite">
                    <div>
                      <div style="color: rgb(0, 0, 0); background-color:
                        rgb(255, 255, 255); font-family: 'times new
                        roman', 'new york', times, serif; font-size:
                        12pt;">
                        <div style="font-family: 'times new roman', 'new
                          york', times, serif; font-size: 16px; color:
                          rgb(0, 0, 0); background-color: transparent;
                          font-style: normal;">Also - what are the
                          capabilities used for?</div>
                        <div style="background-color:transparent;">What
                          does "C6,C200-207" mean? I get the 200 to 207
                          are the extra commands but how are they
                          plugged to the rest of the code?</div>
                      </div>
                    </div>
                  </blockquote>
                </div>
                <div><br>
                </div>
                <div>This is a new v2.x thing, used to tell the App what
                  the capabilities of the vehicle module are. We don't
                  use it at the moment, but plan to use this in the app
                  code in order to customise the functions and
                  appearance on a per-vehicle-module basis. For example,
                  if the vehicle module is able to support a lock/unlock
                  command, the capabilities will tell the Apps that, and
                  the apps can update the UI appropriately.</div>
                <div><br>
                </div>
                <div>
                  <blockquote type="cite">
                    <div>
                      <div style="color: rgb(0, 0, 0); background-color:
                        rgb(255, 255, 255); font-family: 'times new
                        roman', 'new york', times, serif; font-size:
                        12pt;">
                        <div style="background-color: transparent;
                          color: rgb(0, 0, 0); font-size: 16px;
                          font-family: 'times new roman', 'new york',
                          times, serif; font-style: normal;">f I
                          reprogram the board, do I need to restart it
                          somehow? Or is it enough to just reprogram it
                          from the mplab x and the board will restart?</div>
                      </div>
                    </div>
                  </blockquote>
                </div>
                <div><br>
                </div>
                <div>The board will restart automatically after being
                  programmed by MPLAB-X. If you want to restart it, you
                  can also SMS RESET or just pull the power.</div>
                <div><br>
                </div>
                <div>Regards, Mark.</div>
                <div><br>
                  <div>
                    <div>On 2 Jan, 2013, at 9:22 AM, Nikolay Shishkov
                      wrote:</div>
                    <br class="yiv228268277Apple-interchange-newline">
                    <blockquote type="cite">
                      <div>
                        <div style="color: rgb(0, 0, 0);
                          background-color: rgb(255, 255, 255);
                          font-family: 'times new roman', 'new york',
                          times, serif; font-size: 12pt;">
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 12pt;"><span>A
                              quick report.</span></div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;"><span>I
                              manged to flash the firmware and register
                              a phone.</span></div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;"><span>I
                              also started on a Think EV file based on
                              the Twizy one. I setup the CAN filters and
                              changed the code to handle a state of
                              charge message. </span></div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;">Unfortunately
                            it did not seem to work. On STAT request the
                            response was generated from the net_sms code
                            and not my new code for the Think EV.</div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;"><br>
                          </div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;">On
                            checking the code all seems fine - my stat
                            function was plugged correctly.</div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;"><br>
                          </div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;">I will
                            continue tomorrow, but wanted to ask if
                            anyone has good ideas to try?</div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;"><br>
                          </div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;">Also -
                            what are the capabilities used for?</div>
                          <div style="background-color:transparent;">What
                            does "C6,C200-207" mean? I get the 200 to
                            207 are the extra commands but how are they
                            plugged to the rest of the code?<br>
                          </div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: 'times new roman', 'new york',
                            times, serif; font-style: normal;"><br>
                          </div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: 'times new roman', 'new york',
                            times, serif; font-style: normal;">If I
                            reprogram the board, do I need to restart it
                            somehow? Or is it enough to just reprogram
                            it from the mplab x and the board will
                            restart?</div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: 'times new roman', 'new york',
                            times, serif; font-style: normal;"><br>
                          </div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: 'times new roman', 'new york',
                            times, serif; font-style: normal;">Any help
                            is appreciated,</div>
                          <div style="background-color: transparent;
                            color: rgb(0, 0, 0); font-size: 16px;
                            font-family: 'times new roman', 'new york',
                            times, serif; font-style: normal;">Nikolay</div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 16px;
                            color: rgb(0, 0, 0); background-color:
                            transparent; font-style: normal;"><br>
                          </div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 12pt;"><br>
                          </div>
                          <div style="font-family: 'times new roman',
                            'new york', times, serif; font-size: 12pt;">
                            <div style="font-family: 'times new roman',
                              'new york', times, serif; font-size:
                              12pt;">
                              <div dir="ltr"> <font face="Arial"
                                  size="2">
                                  <hr size="1"> <b><span
                                      style="font-weight:bold;">From:</span></b>
                                  Michael Balzer <<a
                                    moz-do-not-send="true"
                                    rel="nofollow"
                                    ymailto="mailto:dexter@expeedo.de"
                                    target="_blank"
                                    href="mailto:dexter@expeedo.de">dexter@expeedo.de</a>><br>
                                  <b><span style="font-weight:bold;">To:</span></b>
                                  <a moz-do-not-send="true"
                                    rel="nofollow"
                                    ymailto="mailto:ovmsdev@lists.teslaclub.hk"
                                    target="_blank"
                                    href="mailto:ovmsdev@lists.teslaclub.hk">ovmsdev@lists.teslaclub.hk</a>
                                  <br>
                                  <b><span style="font-weight:bold;">Sent:</span></b>
                                  Tuesday, January 1, 2013 9:37 PM<br>
                                  <b><span style="font-weight:bold;">Subject:</span></b>
                                  Re: [Ovmsdev] sprintf / crashes<br>
                                </font> </div>
                              <br>
                              <div id="yiv228268277">
                                <div> Mark,<br>
                                  <br>
                                  transparent chunk splitting seems to
                                  be non-trivial, so I split my data
                                  transfers. Everything's working fine
                                  again, so I'll merge into the master
                                  next if you don't object.<br>
                                  <br>
                                  Btw, AT+CIPSEND? gave me 1460 bytes,
                                  so that's supposed to be the size
                                  limit we should keep in mind until we
                                  find a better solution.<br>
                                  <br>
                                  @Nikolay: please note, that's the
                                  total size that can be sent within one
                                  net_msg_start() ... net_msg_send(),
                                  the buffer size (net_scratchpad)
                                  further limits a single MSG line to
                                  currently 199 bytes max.<br>
                                  <br>
                                  Regards,<br>
                                  Michael<br>
                                  <br>
                                  <br>
                                  <div
                                    class="yiv228268277moz-cite-prefix">Am
                                    31.12.2012 16:23, schrieb Michael
                                    Balzer:<br>
                                  </div>
                                  <blockquote type="cite">Mark, <br>
                                    <br>
                                    I think I found my link dropping
                                    problem: scanning a diag log I took,
                                    I found out CIPSEND will fail with a
                                    plain "ERROR" if the data size
                                    exceeds about 1500 bytes. I guess
                                    that's either the SIM908 buffer size
                                    or the max network packet size. I
                                    thought the SIM908 would handle
                                    dividing data into packets as
                                    needed. The SIM908 manual mentions
                                    the max packet size depends on
                                    network status and should be queried
                                    by "AT+CIPSEND?". After the overrun
                                    net_state_activity() will not
                                    recognize "ERROR" to terminate the
                                    pending msg, so will run into the
                                    timeout and start a network re-init.
                                    <br>
                                    <br>
                                    My battery status data exceeds 1500
                                    bytes on first run and later on if
                                    enough cells need updates. I'll
                                    think about how to split up data
                                    packets into multiple CIPSENDs.
                                    Would be nice if the net functions
                                    take care of this transparently. <br>
                                    <br>
                                    A secondary issue turned up from the
                                    diag log: the SIM908 crashed in the
                                    middle of a CIPSEND command while
                                    the module continued to run
                                    normally. The module still thought
                                    it's in NET_STATE_READY, so did not
                                    re-initalize the modem. The
                                    connection could then be established
                                    on the next CIPSTART, but the
                                    complete INIT stuff had not been
                                    done. So it seems independant SIM908
                                    resets need to be handled as well,
                                    and they can occur anytime. I'll see
                                    if I can solve that too. <br>
                                    <br>
                                    Regards, <br>
                                    Michael <br>
                                    <br>
                                    <br>
                                    Am 30.12.2012 15:42, schrieb Michael
                                    Balzer: <br>
                                    <blockquote type="cite">I hesitate
                                      to merge into the master because I
                                      currently have link / connectivity
                                      problems, especially during
                                      driving. I introduced a GPS
                                      logging to optimize my antenna
                                      positions and managed to get some
                                      really nice tracks three days ago,
                                      so I don't think this is related
                                      to my changes... but I'm not 100%
                                      sure. I tried different antenna
                                      positions and another GSM network,
                                      but the connection keeps dropping
                                      when moving the car, and GPS
                                      position updates need minutes.
                                      Could be weather conditions ...or
                                      some tricky race condition bug? <br>
                                    </blockquote>
                                    <br>
                                    <br>
                                    <br>
                                    <fieldset
                                      class="yiv228268277mimeAttachmentHeader"></fieldset>
                                    <br>
                                    <pre>_______________________________________________
OvmsDev mailing list
<a moz-do-not-send="true" rel="nofollow" class="yiv228268277moz-txt-link-abbreviated" ymailto="mailto:OvmsDev@lists.teslaclub.hk" target="_blank" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a moz-do-not-send="true" rel="nofollow" target="_blank" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
                                  </blockquote>
                                  <br>
                                  <pre class="yiv228268277moz-signature">-- 
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
                                </div>
                              </div>
                              <br>
_______________________________________________<br>
                              OvmsDev mailing list<br>
                              <a moz-do-not-send="true" rel="nofollow"
                                ymailto="mailto:OvmsDev@lists.teslaclub.hk"
                                target="_blank"
                                href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
                              <a moz-do-not-send="true" rel="nofollow"
                                target="_blank"
                                href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
                              <br>
                              <br>
                            </div>
                          </div>
                        </div>
                      </div>
                      _______________________________________________<br>
                      OvmsDev mailing list<br>
                      <a moz-do-not-send="true" rel="nofollow"
                        ymailto="mailto:OvmsDev@lists.teslaclub.hk"
                        target="_blank"
                        href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
                      <a class="moz-txt-link-freetext" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
            <meta http-equiv="x-dns-prefetch-control" content="on">
            <br>
            _______________________________________________<br>
            OvmsDev mailing list<br>
            <a moz-do-not-send="true"
              ymailto="mailto:OvmsDev@lists.teslaclub.hk"
              href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
            <a moz-do-not-send="true"
              href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev"
              target="_blank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
            <br>
            <br>
          </div>
        </div>
      </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>
    <br>
    <pre class="moz-signature" cols="50">-- 
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
  </body>
</html>