<html><body><div style="color:#000; background-color:#fff; 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;">Thanks for all the advice!</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: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">After I issued the MODULE command, I was able to get results from my code.</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;">So to the next problem.</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 changed one of the CAN filters
to match a 0x30? message, and then in a switch run a piece of code for message 0x301. This code should extract data from the 8 bytes of the CAN message. </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;">The thing is - the result from the extraction was ok the first couple of times, and since then no matter how I update the expression to fetch the value I get exactly the same value as before... </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;">So I wonder - have I crashed the CAN bus transceiver? Do I need to supply a confirmation, that I handle the message or is this handled by the framework?</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;">Or is this something to do with saving variables in a place where suddenly I can not write anymore?</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 - the volt/ampera and the tesla files have </div><div style="background-color: transparent;"><div style="background-color: transparent;">#pragma udata overlay vehicle_overlay_data</div><div style="background-color: transparent;">As I understand to reduce RAM usage, while<span style="font-size: 16px; background-color: transparent;"> the twizy file does not... I added it to my Think file, but am not sure - could that have messed up the stuff?</span></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;"><span style="font-size: 16px; background-color: transparent;"><br></span></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;">What is the correct car_* variable to put the pack voltage and pack current in?</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;">Thanks again,</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="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> <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 size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Michael Balzer <dexter@expeedo.de><br> <b><span style="font-weight: bold;">To:</span></b> ovmsdev@lists.teslaclub.hk <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, January 2, 2013 11:43 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="yiv673931390">
<div>
<div class="yiv673931390moz-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
<a target="_blank" href="http://ovms_server.pl/">ovms_server.pl</a>" 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 type="cite">
<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>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 rel="nofollow" class="yiv673931390moz-txt-link-rfc2396E" ymailto="mailto:mark@webb-johnson.net" target="_blank" href="mailto:mark@webb-johnson.net"><mark@webb-johnson.net></a><br>
<b><span style="font-weight:bold;">To:</span></b> OVMS
Developers <a rel="nofollow" class="yiv673931390moz-txt-link-rfc2396E" 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>
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>
<div id="yiv673931390">
<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="yiv673931390Apple-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 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 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="yiv673931390">
<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="yiv673931390moz-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="yiv673931390mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
OvmsDev mailing list
<a rel="nofollow" class="yiv673931390moz-txt-link-abbreviated" ymailto="mailto:OvmsDev@lists.teslaclub.hk" target="_blank" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a 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="yiv673931390moz-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 rel="nofollow" ymailto="mailto:OvmsDev@lists.teslaclub.hk" target="_blank" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a 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 rel="nofollow" ymailto="mailto:OvmsDev@lists.teslaclub.hk" target="_blank" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a rel="nofollow" class="yiv673931390moz-txt-link-freetext" target="_blank" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
OvmsDev mailing list<br>
<a rel="nofollow" ymailto="mailto:OvmsDev@lists.teslaclub.hk" target="_blank" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a 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>
<br>
<fieldset class="yiv673931390mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
OvmsDev mailing list
<a rel="nofollow" class="yiv673931390moz-txt-link-abbreviated" ymailto="mailto:OvmsDev@lists.teslaclub.hk" target="_blank" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a>
<a rel="nofollow" class="yiv673931390moz-txt-link-freetext" target="_blank" href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="yiv673931390moz-signature">--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
</pre>
</div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>OvmsDev mailing list<br><a ymailto="mailto:OvmsDev@lists.teslaclub.hk" href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" target="_blank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br><br><br> </div> </div> </div></body></html>