I'm away from home this week so can't look now. I use the regular settings 9600/8/1/N. Where do you get stuck?

Connection seems to be opening, but when I try to SEND simple hex commands like 0x0101, not seeing any replies as would in coolterm. Tried several display settings with no luck.

I believe you want 115200 baud.

Got it.
Where Cooltem will send HEX values in formats such as 011001 or 01 10 01
Realterm only seems to send HEX as 0x01 0x10 0x01 and 0x03 0x01 0x01 0x0000 0x0000

Unless I'm missing something... Com Port Baud seems to be flexible. I settled with 115200 8N1 None. Thanks for the <b>#define JSON_OUT</b> tip <u>iseward</u>. Realterm logs nicely using the JSON format. Pick your deliminators and sort in a spreadsheet, for us beginners.

{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"200","timestamp":"642885","payload":["2","4E","5","8E","4","4A","0","0"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"225","timestamp":"642890","payload":["0","FF","2","6F","0","0","0","42"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"201","timestamp":"642894","payload":["2","90","3F","85","0","0","0","80"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"225","timestamp":"642898","payload":["0","FF","2","6F","0","0","0","42"]}}
{"packet": {"status":"3","channel":"Bus 1","length":"8","id":"106","timestamp":"642903","payload":["2","0","2","0","1","91","56","54"]}}

<u>Sorted by id & time </u>
id 201 timestamp 643085 payload 02 91 3F 98 00 00 00 80
id 201 timestamp 643102 payload 02 8E 3F 7A 00 00 00 80
id 201 timestamp 643119 payload 02 8D 3F AC 00 00 00 80
id 201 timestamp 643135 payload 02 8E 40 30 00 00 00 80
id 201 timestamp 643151 payload 02 90 40 90 00 00 00 80
id 201 timestamp 643181 payload 02 91 3F FC 00 00 00 80
id 201 timestamp 643197 payload 02 90 3F C3 00 00 00 80
id 201 timestamp 643214 payload 02 90 3F F8 00 00 00 80
id 201 timestamp 643231 payload 02 91 40 27 00 00 00 80

Now onto understanding frame_id's

Cheers

Glad you solved it and thanks for the info. Will give it a try.

XAG
<blockquote>Look for the line: CANBus1.baudConfig(cbt_settings.busCfg[0].baud);
I replaced it with 500 to get a fixed rate and that got me data from line 1</blockquote>
is this what you changed to?
CANBus1.baudConfig(500);

i get "ÿ" after i send 03030300000000 command

this is what i get from 0101

{"event":"version", "name":"CANBus Triple", "version":"0.4.0", "memory":"805"}

this is what i get from command 0102

01:01:00:7D:00:F4:01:7D:00:00:00:00:00:00:02:00:00:00:07:E0:01:3C:00:00:00:00:04:41:05:3C:00:00:28:10:00:01:00:0A:FF:D8:45:47:54:20:20:20:20:20:02:01:00:00:07:E0:01:34:00:00:00:00:04:41:05:34:00:00:28:10:00:0F:0D:20:00:00:41:46:20:20:20:20:20:20:02:01:00:00:07:E0:22:DA:85:00:00:00:04:62:05:DA:06:85:30:08:00:17:00:14:00:00:41:46:52:4F:42:44:20:20:02:00:00:00:07:E0:22:03:EC:00:00:00:04:62:05:03:06:EC:30:10:00:01:00:05:00:00:4B:4E:4F:43:4B:20:20:20:02:00:00:00:07:E0:22:F4:23:00:00:00:04:62:05:F4:06:23:30:10:00:1D:00:14:00:00:46:50:52:00:4B:20:20:20:02:00:00:00:07:E0:22:03:18:00:00:00:04:62:05:03:06:18:30:10:00:06:00:01:00:00:43:41:4D:44:45:47:20:20:02:00:00:00:07:37:22:59:6A:00:00:00:04:62:05:59:06:6A:30:10:00:0B:00:64:00:00:50:57:45:49:47:48:54:20:02:00:00:00:07:E0:22:03:CA:00:00:00:04:62:05:03:06:CA:30:08:00:09:00:05:FF:D8:42:41:54:54:45:52:59:20:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

I'm not sure what 030303 does off the top of my head. I think the command you want is:
030101 - turn on logging for bus 1 (no filters).
030100 - turn off logging for bus 1

011001 - status of bus 1.

iseward

thank you..... now i am getting data..... i used 030101

And now you have to find out what it al means! ;-)

I have followed suggestions from XAG and have removed comment delimiter "//" on line 47 of SerialCommand.h
i am now getting my data in this format:
"

{"packet": {"status":"2","channel":"Bus 1","length":"8","id":"42D","timestamp":"896519","payload":["DF","3A","4E","42","32","0","0","0"]}}

i will now try to send to the canbus using this format from http://docs.canb.us/firmware/api.html
Command Bus Id Message ID Data Length
0x02 01 290 00 00 00 00 00 00 00 00 8

this is the data i am trying to send 020142DDF3A4E42320000008
it does not do anything though...... do i have the correct format or am i simply trying to send a nonsense payload?

Sorry, but yes it's nonsense ;-)

You have to understand what you're sending. Got any idea what the string you're trying to send means?

i have put some data into a spreadsheet to compare functions such as LOCK-UNLOCK, VOLUMEUP-VOLUMEDOWN.
you can see it here <a href="">bit.ly/canbus1</a>

This is LOCK data:
Message ID Data
581 1 0 FF FF FF FF FF FF i am assuming that to try this , that i would have to change it to
0581 01 00 FF FF FF FF FF FF and then

Command Bus Id Message ID Data Length
02 01 0581 0100FFFFFFFFFFFF 8

You seem to be progressing fast Alan. Curious how you analyzed so fast these are the mentioned command. Mind sharing that?

As for sending commands, you have to include for which module the command is intended so it knows it has to do something.

XAG
the vehicle was idle and producing no data. The data that you see on the excel sheet is from one press of one button. When it has stopped, I save it and then clear it and try the next button press. One button press produces 1941 lines of data for LOCK and 1975 for UNLOCK.
The buttons that i tried are buttons that produce data without the key being turned to the on position, the vehicle is in a timed shutdown mode. I can get a response from a button press and export it as text file from coolterm and then import to excel. I'm trying to compare data that is likely on the same module, such as vol up-down, lock-unlock, mirror adjustments. Windows up and down does not produce any data, interesting as they do operate, maybe they are not controlled by a module. There is too much data right now for me to analyze if the ignition is turned to the on position. Im trying to send a successful command before i move on. I really need to figure out what each modules message ID is.
in this piece of data, "581 1 0 FF FF FF FF FF FF " my message id or module is 0581 i assume.

Vehicle Type: 2013 Ford F150

Thanks Alan! The problem is that my car doesn't use the CANbus for these kind of things so I need to find what is being send over the line.

after reading the approach that amesatfish took, <a href="http://forum.canb.us/discussion/91/identifying-steering-wheel-button-packets-an-example#latest">forum.canb.us/discussion/91/identifying-steering-wheel-button-packets-an-example#latest</a> i think that i am missing the packet length in my data. I need to change how i format my data to include the length of the data stream so that i have the correct format when i want to inject packets, (Command -Bus Id-Message ID - Data - Length). Hopefully will get a chance to explore this tomorrow.

It might help if you ignored the upper few bits so that "A" could be used instead of 0x01, "B" for 0x02, etc.

  • 61
    Posts
  • 68114
    Views

Looks like your connection to CANBus Triple was lost, please wait while we try to reconnect.