Posts made by henk_kuipers
posted in General Discussion read more

Yeah, I thought my Mac had gone berserk but it was a flaky USB cable.

posted in General Discussion read more

OSX problems solved, one of my USB cables appeared to be bad. App & Wireshark work fine now on both Win64 and OSX Yosemite.

posted in Howto read more

@Derek, switched to Windows 8.1 64 bit. Works well!

posted in General Discussion read more

I installed the app & wireshark on Windows 8.1 64 bit laptop (left the OSX platform, too many problems right now). Works well!

posted in Howto read more

I had the same problem and I couldn't upload code anymore. I took out the board from the housing in order to get to the reset button and followed this procedure: https://www.youtube.com/watch?v=plCxXwiUK-w
I uploaded the Blink scetch which is easy to find. After the succesful upload of the Blink scetch I could upload the CBT firmware again.

posted in Howto read more

@Derek I am running it on OSX Yosemite, npm version 2.7.5, node v0.12.2 and I cloned the latest code today. The problem is the node app starts up when I run: node index.js /dev/cu.usbmodem411
and it returns:
Socket bound: /tmp/cbtbus1
Socket bound: /tmp/cbtbus2
Socket bound: /tmp/cbtbus3
Logging enabled on all three busses
But then it exits, without any error message. It should stay running shouldn't it? The cbtbus1-3 files are created in /tmp.
Somehow, there is a problem in my environment :-/ I tried it with a friend on another OSX machine and it ran fine.

posted in Howto read more

Hi Grayda, the path in of the serial device is not the problem. The node.js app runs and creates the pipe /tmp/cbtbus1 correctly. Also, when the path to the serial device is incorrect, the node.js app won't start, which it does. There seems to be some problem with the rights / access but haven't figured out what.

posted in Howto read more

So it has recognized your high speed CAN bus. Did you start the engine when you were logging data?

posted in Howto read more

Yes, I checked the path which is correct and I am not using any other software...

posted in General Discussion read more

Derek, I tried Wireshark on Mac, I need to solve one last thing to get it working I thing, any ideas? My findings are described here:
http://forum.canb.us/discussion/42/where-are-the-apps#latest

posted in Howto read more

OK, first you log everything without a filter. What I did was:

  • I imported the JSON data into excel
  • I copied the column "id" and removed duplicates. Now you can see how many different message ID's you have
  • then I started to use the filter and to filter the message ID 7C in your case above, the code should be:
    if (msg.frame_id==0x007C) ...
  • For each ID I tried if I could detect changes when pressing buttons.
    Is this any help to you?
posted in Howto read more

When I start the node.js app as a normal user I get this error:
Socket bound: /tmp/cbtbus1

events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot open /dev/cu.usbmodem641

When run with sudo it creates the pipe but Wireshark returns 'connection refused'.

posted in Howto read more

Followed the instructions for Wireshark. I can run the node.js app, it creates the /tmp/cbtbus1 pipe (works only when run with sudo). When I start Wireshark and add the interface all seems well. But when I start the capture process I get the message "The capture session coud not be initiated due to error on socket connect: Connection refused". I tried running Wireshark as root (start with sudo from command line) or change the permissions on /tmp/cbtbus1 but none of this gets me passed the error.

posted in Howto read more

Hi TheBoz, have you tried to change the code of SerialCommand.h the way I did? Have you downloaded the source from Github and done a compile & upload? Your logging looks like HEX data saved in ASCII format which is not readable, it's easier to save it in HEX format when you are logging HEX data. When you use JSON output it is better to save it in RAW format.
Mind you, when Derek has finished the app filtering messages will be MUCH easier ;-)

posted in Howto read more

So, what data did you see? Is the wiring OK? Are you using the OBD cable? Have you tried this command:
01090101F4
It will test the bitrate of your Canbus (high speed, low speed, different bitrates). If it finds the correct bitrate the setting will be applied and you should see data...

posted in Howto read more

<b>Two things made it easier for me to identify messages:</b>

  1. Change the code so you get JSON output (remove comment "//" before the #define JSON_OUT in SerialCommand.h as mentioned serveral places on the forum).
  2. I altered the JSON output code a bit so I could filter one single message ID , this way I could see if messages change when pressing buttons. It is not a big deal but it helped me a lot in finding out what is going on, this is what I changed:

Original code:

#ifdef JSON_OUT
Output to serial as json string
activeSerial->print(F("{"packet": {"status":""));
activeSerial->print( msg.busStatus,HEX);
activeSerial->print(F("","channel":""));
activeSerial->print( busses[msg.busId-1].name );
activeSerial->print(F("","length":""));
activeSerial->print(msg.length,HEX);

if (msg.frame_id==0x0078)
{
activeSerial->print(F(""id":""));
activeSerial->print(msg.frame_id,HEX);
activeSerial->print(F("","timestamp":""));
activeSerial->print(millis(),DEC);
activeSerial->print(F("","payload":[""));
for (int i=0; i<8; i++) {
activeSerial->print(msg.frame_data[i],HEX);
if( i<7 ) activeSerial->print(F("",""));
}
activeSerial->print(F(""]"));
activeSerial->println();
}

Changed code that replaces the above:

#ifdef JSON_OUT

if (msg.frame_id==0x0078) // <b>->change this message ID figure out if it changes when you press buttons in the car</b>
{
activeSerial->print(F(""id":""));
activeSerial->print(msg.frame_id,HEX);
activeSerial->print(F("","payload":[""));
for (int i=0; i<8; i++) {
activeSerial->print(msg.frame_data[i],HEX);
if( i<7 ) activeSerial->print(F("",""));
}
activeSerial->print(F(""]"));
activeSerial->println();
}
Disadvantage of this method is that you need to compile and upload the code for each message ID you want to test. It's a drag but it works.

posted in Howto read more

<b>Am I sending correct CAN packets?</b>
I am making some modest progress. Because I couldn't get the serial filter command to work I have changed the JSON output code in SerialCommand.h so it shows Message ID and payload of only one particular message ID. A very basic filter. By trial and error, I found the messages of events that occur when for instance the mirrors are folded, the doors are locked, the windows go up/down and the fan (up/down). Finally some meaning in all that data :-)
On to the next challenge, send some CAN packets to make something happen. No successful attempts so far. Hopefully someone can see what is going wrong. For example, when I fold the mirrors I see these messages:
"id":"50","payload":["0","5B","40","5","D9","3","4","0"] - folding
"id":"50","payload":["0","5B","40","5","89","3","4","0"] - finished
"id":"50","payload":["0","5B","40","5","E9","3","4","0"] - unfolding
"id":"50","payload":["0","5B","40","5","89","3","4","0"] - finished
Logging in HEX looks like this:
00 50 00 5B 40 05 89 03 04 00 08
00 50 00 5B 40 05 D9 03 04 00 08
00 50 00 5B 40 05 E9 03 04 00 08
So, I was hoping I could trigger the 'folding/unfolding mirrors " action by sending the following packets:
02010050005B4005D903040008
02010050005B4005E903040008
I thought:
0201 = send on bus 1, 0050 = message id, 005B4005D9030400=payload, 08 = length
But nothing happens. I tried the windows and door lock commands too but no luck. I think I have to recycle the CBT after each failure to try again, so that's what I do...
<b>Another question:</b> in CoolTerm you can set the Transmit option "Terminate send string data" with 0D 0A, should this setting be active? I tried it with and without but it didn't make a difference.

posted in Howto read more

Wiring trouble is over so I am trying to make sense of the low speed CAN data. I continued to follow the steps above (very useful description, thanks!). I gathered data in different settings that make sense to compare but now I need to set message filters to do some trial and error. However, when issuing the logging with filtering commands I receive 1 message (in my case JSON output) and then logging stops. A need to power cycle the CBT to get logging going again and I don't succeed in setting any message filters at all. I use CoolTerm and send HEX commands like:
03010100D800C8 - log Bus 1 and filter message ID 00D8 and 00C8
03010100400058 - log Bus 1 and filter message ID 0040 and 0058
The ID's are valid ID's from my logfiles. Is my syntax wrong?

posted in Howto read more

Hi KidTurbo, good to read it helped you somewhat. Good luck with the rest of the puzzle!

posted in Howto read more

Pippy, when connected, check the status of Bus 1 with this command 011001
What software do you use? CoolTerm?

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