[Ovmsdev] Debug logging via diag serial port
Michael Balzer
dexter at expeedo.de
Sat Nov 3 03:35:57 HKT 2012
I wanted to get some direct debug logging. It took me some time to
figure out the diag port only echoes what is sent from the SIM908 to the
PIC18, I first thought it tapped RX+TX so I could see the complete
communication.
Next problem was the modem switches echos off (after COPS I think), so I
need to re-enable them at least once in a while.
I'm now using this scheme in can_state_ticker1():
#ifdef OVMS_DEBUG
// CAN debug log via DIAG port SIM908 command echo:
// ATT: could be a problem for running data transfers,
// should not be enabled for production/live firmware images!
net_puts_rom( "ATE1\r" );
sprintf( net_scratchpad,
(rom far char*) "# ERR=%u SOC=%u RNG=%u SPD=%d PWR=%d
CHG=%u\r",
RXERRCNT, can_soc, can_range, can_speed, can_power,
car_chargestate );
net_puts_ram( net_scratchpad );
#endif
My questions: am I right with the suspected problem, and is there a
better way?
Regards,
Michael
--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dexter.vcf
Type: text/x-vcard
Size: 206 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20121102/3d6c57e5/attachment-0002.vcf>
More information about the OvmsDev
mailing list