[Ovmsdev] CAN bus logging not working
Michael Geddes
frog at bunyip.wheelycreek.net
Tue Feb 7 15:13:35 HKT 2023
You can get the sdcard out and in with the help of something to push it
with, without opening it up.
Michael
On Tue, 7 Feb 2023, 2:42 pm Christos Oscar Kambiselis, <
ckambiselis at gmail.com> wrote:
> This is the latest return
>
> vfs ls /sd
> 191.4M 09-Jan-2004 14:20 191.4M 09-Jan-2004 14:20 191.4M 09-Jan-2004 14:20
> 191.4M 09-Jan-2004 14:20 ! 191.4M 09-Jan-2004 14:20 ) 191.4M 09-Jan-2004
> 14:20 1 191.4M 09-Jan-2004 14:20 9 191.4M 09-Jan-2004 14:20 A 191.4M
> 09-Jan-2004 14:20 i 191.4M 09-Jan-2004 14:20 Q 191.4M 09-Jan-2004 14:20 y
> 191.4M 09-Jan-2004 14:20 a 191.4M 09-Jan-2004 14:20 i 191.4M 09-Jan-2004
> 14:20 ��� r 191.4M 09-Jan-2004 14:20 y
>
> I guess I have to open the covers again.
>
> Thanks for the help
> Oscar
>
> On Tue, Feb 7, 2023 at 8:22 AM Mark Webb-Johnson <mark at webb-johnson.net>
> wrote:
>
>>
>> That SD looks messed up. There is no ‘format’ command that I know of in
>> the ESP IDF. I did try a while (years) ago, but it wasn’t trivial at the
>> time. If it detects an empty SDCARD it will format automatically, or you
>> will need to format on a workstation.
>>
>> Your ‘can can1 status’ is showing packets, so I suggest you try:
>>
>> can log start vfs crtd /sd/can.crtd
>>
>> (Wait a minute)
>>
>> can log stop
>>
>> vfs ls /sd
>>
>> (and see if /sd/can.crtd has data)
>>
>>
>> Regards, Mark
>>
>> On 7 Feb 2023, at 2:16 PM, Christos Oscar Kambiselis <
>> ckambiselis at gmail.com> wrote:
>>
>> Hi,
>>
>> The first time I tested it I started logging from the Web UI and stopped
>> it from there too and the next time I tested it I did it from the shell,
>> running status commands to make sure it had started and stopped.
>>
>> vfs ls /sd gives,
>> 0 30-Nov-1979 00:00 log 0 30-Nov-1979 00:00 0 30-Nov-1979 00:00 0
>> 30-Nov-1979 00:00 0 30-Nov-1979 00:00 ! 0 30-Nov-1979 00:00 ) 0 30-Nov-1979
>> 00:00 1 0 30-Nov-1979 00:00 9 0 30-Nov-1979 00:00 A 0 30-Nov-1979 00:00 i 0
>> 30-Nov-1979 00:00 Q 0 30-Nov-1979 00:00 y 0 30-Nov-1979 00:00 a 0
>> 30-Nov-1979 00:00 i 0 30-Nov-1979 00:00 ���r 0 30-Nov-1979 00:00 y
>>
>>
>> which I noticed on the "Editor", and the reason I wanted to format the
>> card in the OVMS.
>>
>> can can1 status
>> CAN: can1 Mode: Active Speed: 500000 DBC: none Interrupts: 214034 Rx pkt:
>> 120472 Rx ovrflw: 0 Tx pkt: 90774 Tx delays: 0 Tx ovrflw: 0 Tx fails: 254
>> Err flags: 0x008040d9 Rx err: 0 Tx err: 128 Rx invalid: 0 Wdg Resets: 0 Wdg
>> Timer: 2 sec(s) Err Resets: 0
>> can can2 status
>> CAN: can2 Mode: Listen Speed: 500000 DBC: none Interrupts: 0 Rx pkt: 0 Rx
>> ovrflw: 0 Tx pkt: 0 Tx delays: 0 Tx ovrflw: 0 Tx fails: 0 Err flags:
>> 0x00000000 Rx err: 0 Tx err: 0 Rx invalid: 0 Wdg Resets: 91 Wdg Timer: 3
>> sec(s) Err Resets: 0
>> The command to start logging is the all CAN messages command from the
>> guide
>> *can log start vfs crtd /sd/can.crtd *
>>
>> and it returns
>> CAN logging to VFS active: Type:vfs Format:crtd(discard) Vehicle:KN
>> Path:/sd/can.cr
>>
>> also
>> can log status
>> #2: open Type:vfs Format:crtd(discard) Vehicle:KN Path:/sd/can.crtd
>> Messages:214 Dropped:0 Filtered:0 Rate:0.0% /sd/can.crtd: running
>> Messages:214 Discarded:0 Dropped:0 Filtered:0 Rate:0.0%
>>
>>
>> On Tue, Feb 7, 2023, 02:08 Mark Webb-Johnson <mark at webb-johnson.net>
>> wrote:
>>
>>> First guess is that you have to ‘can log stop’ to close the logging file
>>> before you will be able to see the content.
>>>
>>> If that is not it, please provide details of the logging commands you
>>> are typing, and what ‘vfs ls /sd’, ‘can can1 status’, ‘can can2 status’,
>>> show.
>>>
>>> Regards, Mark.
>>>
>>> P.S. If you have a modern OVMS module, I also suggest you double-check
>>> the sdcard maxfreq.khz setting to optimise performance:
>>>
>>>
>>> https://docs.openvehicles.com/en/latest/userguide/logging.html?highlight=sdcard#performance-impact
>>>
>>>
>>> On 7 Feb 2023, at 4:08 AM, Christos Oscar Kambiselis <
>>> ckambiselis at gmail.com> wrote:
>>>
>>> Hi,
>>> Has anyone had any problems with CAN bus logging?
>>>
>>> I have a 32GB SD card installed and "SD status" gives:
>>>
>>> *SD CARD is inserted*
>>> *Status: available*
>>> *Name: SD32G*
>>> *Size: 30419 MB*
>>> *Free: 29767 MB*
>>>
>>> *Card type: SDHC/SDXC*
>>> *Max speed: 25000 kHz*
>>> *Capacity: 30436 MB*
>>> *CSD: ver=1; sector_size=512; capacity=62333952 read_bl_len=9*
>>> *SCR: sd_spec=2; bus_width=5*
>>>
>>> I have setup CAN1 and 2 to "listen" and started the logging like it's
>>> mentioned in the user guide, checked the status, I stopped it some time
>>> later, and when I go to open it from the Web UI it is empty, also tried
>>> from the Editor and it is also empty, removing the card is a bit tricky
>>> since the hardware is pretty tucked away in the console. I searched the
>>> manual for a format command but can't find anything.
>>>
>>> I do get messages and readings on the OVMS Android app, so at least the
>>> OBD CAN is fine.
>>>
>>> Oscar
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.openvehicles.com
>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>
>>>
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.openvehicles.com
>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
>>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230207/d6482ca1/attachment-0001.htm>
More information about the OvmsDev
mailing list