Not so much an issue....
Is it possible to use your library to decode DM1s from a BLF file recorded with Vector tools?
Do you have any examples of doing this?
Hu Dan,
I don't have any code to convert a .blf capture from the vector tools but I believe that Brians python-can (https://python-can.readthedocs.io/en/master/) can convert the log to an ascii format for you. Specifically look at https://python-can.readthedocs.io/en/master/listeners.html#blf-binary-logging-format
Once you have an ascii dump decoding DM1 messages is pretty simple but pretty much you just follow the DM1 PGN definition in j1939-73 (5.7.1)
Happy decoding!
Miller
From: tractorDan @.> Sent: Wednesday, October 6, 2021 3:20 AM To: milhead2/python-j1939 @.> Cc: Subscribed @.***> Subject: [milhead2/python-j1939] Not so much an issue.... (#16)
External Email Think Before You Click.
Is it possible to use your library to decode DM1s from a BLF file recorded with Vector tools?
Do you have any examples of doing this?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmilhead2%2Fpython-j1939%2Fissues%2F16&data=04%7C01%7Cmiller.lowe%40polaris.com%7C33ea7906413d4a7dbae708d988b2f524%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691124472636904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=h7rYc0jmyNQU1xTRhzWZ%2FG4EWS2B%2BG%2FEb1GNLMxdknE%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEWRWU4JJCWQ4G4FDIVOAGTUFQPHZANCNFSM5FOE3O5A&data=04%7C01%7Cmiller.lowe%40polaris.com%7C33ea7906413d4a7dbae708d988b2f524%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691124472636904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8i%2FqZCDCFToZrIFJGOWUDElgosA7PSxHVPsn85uE6vU%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cmiller.lowe%40polaris.com%7C33ea7906413d4a7dbae708d988b2f524%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691124472646900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fI%2B3D5AvHRbATxdAxBcKqNAT908czo8zHN54zt47SG8%3D&reserved=0 or Androidhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cmiller.lowe%40polaris.com%7C33ea7906413d4a7dbae708d988b2f524%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691124472646900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3LydENPnvojg6ctV3PSnPWhMi2%2F8gYUny8NulX1yQBA%3D&reserved=0.
CONFIDENTIAL: The information contained in this email communication is confidential information intended only for the use of the addressee. Unauthorized use, disclosure or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return email and destroy all copies of this communication, including all attachments.
Thanks for the response - I'll look at that.
The main problem is that, if a DM1/FECAh is 8 bytes or less, it shows up as a FECAh with 8 bytes of data following (in a Vector log). However, if the DM1 is longer than 8 bytes, it no longer shows up as an FECAh with n bytes of data; you have to, instead, decode the "multi-packet" transport protocol messaging used, instead.
I wondered whether there was a J1939 library for Python that can automatically 'reconstruct' these TP messages into a DM1 so they always appear as an FECAh message with 8 or more data bytes.
Also, some of the log files I'm looking at are 20GB in size; converting to ASCII would be problematic, I think. I'll give it a try, though.
Thanks again.
Hi Dan,
You are correct, I forgot about the BAM and CTS/RTS packaging that j1939 provides. In my company we rarely see more than a single fault in a DM1 and I flat out forgot about it.
There is a logger example app that you may be able to fool with but I don't in python-j1939 have any built in capability to read CAN data from any source other than a python-can library below me.
If I were doing it I would be to look at the logger example app application and figure how to write a moc for the python-can interface that feeds the protocol layer the raw can packets. There are only a few moc methods that you would need to write.
Hope that helps..
Miller
From: tractorDan @.> Sent: Wednesday, October 6, 2021 11:14 PM To: milhead2/python-j1939 @.> Cc: Miller Lowe @.>; Comment @.> Subject: Re: [milhead2/python-j1939] Not so much an issue.... (#16)
External Email Think Before You Click.
Thanks for the response - I'll look at that.
The main problem is that, if a DM1/FECAh is 8 bytes or less, it shows up as a FECAh with 8 bytes of data following (in a Vector log). However, if the DM1 is longer than 8 bytes, it no longer shows up as an FECAh with n bytes of data; you have to, instead, decode the "multi-packet" transport protocol messaging used, instead.
I wondered whether there was a J1939 library for Python that can automatically 'reconstruct' these TP messages into a DM1 so they always appear as an FECAh message with 8 or more data bytes.
Also, some of the log files I'm looking at are 20GB in size; converting to ASCII would be problematic, I think. I'll give it a try, though.
Thanks again.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmilhead2%2Fpython-j1939%2Fissues%2F16%23issuecomment-937482683&data=04%7C01%7Cmiller.lowe%40polaris.com%7C89d8a6206e26451b75b708d98959ca22%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691841017379237%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qaG%2FEAOFNormlCVdHFLyUTTTVDEj9EE8RVzf5Wc5DwU%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEWRWU2M2GYCSVAQ7KZEM4LUFU3GDANCNFSM5FOE3O5A&data=04%7C01%7Cmiller.lowe%40polaris.com%7C89d8a6206e26451b75b708d98959ca22%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691841017379237%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kYZKFYmTQZM8HzlBhEsgRdOF6ZV9trFRrRC8HLPDHPc%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cmiller.lowe%40polaris.com%7C89d8a6206e26451b75b708d98959ca22%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691841017389232%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AFJcoXJMx%2FbGXM8VLwVUWf%2FVH9qcaEtNL5JR5JVbaps%3D&reserved=0 or Androidhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cmiller.lowe%40polaris.com%7C89d8a6206e26451b75b708d98959ca22%7C85f78c4cad11473596240b2c11611dff%7C0%7C0%7C637691841017399227%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sanV%2BpOYs0XcMEoj3ktwUCZMymJqonl4RcOYG%2B406FA%3D&reserved=0.
CONFIDENTIAL: The information contained in this email communication is confidential information intended only for the use of the addressee. Unauthorized use, disclosure or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by return email and destroy all copies of this communication, including all attachments.