VERY simple question

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
jspring
Posts: 3
Joined: Tue 11. Nov 2014, 05:48

VERY simple question

Post by jspring » Tue 11. Nov 2014, 06:09

Hi there: I am using code written some years ago for monitoring CAN traffic on a Nissan Altima. We never had to send a telegram to the ECM (as a matter of fact we didn't WANT to send anything- dangerous if you make a mistake). Anyway, now I need to add OBD2 polling. I tried building the poll string, ala "m s 0x7df 2 1 0x10" (an OBD2 broadcast poll, requesting the value of the MAF sensor). But I didn't get any response. I noticed our original code used fgets to get a string. Now, fgets returns a pointer to a string ending in either a newline or EOF. So do I need to add a linefeed at the end of my string? (The documentation doesn't mention a termination character, so I didn't think I needed one.) Thanks!

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: VERY simple question

Post by M.Maidhof » Tue 11. Nov 2014, 13:40

Hi,

can you please post the output of cat /proc/pcan to see the status of the driver and hardware. To send a message by the chardev driver through the PCAN-USB the string is as follows:

echo "m s 0x7DF 2 0x01 0x10">/dev/pcan32

Maybe you have built the driver for netdev, than you can´t receive anything with chardev devices, see dozens of other threads here in the Linux forum with the same issue.

regards

Michael

Post Reply