JCube001 / socketcan-demo

Contains a set of example programs which highlight how to make use of SocketCAN on Linux
MIT License
58 stars 28 forks source link

Raw interface demo doesn't write on canbus! #1

Open JeyP4 opened 4 years ago

JeyP4 commented 4 years ago

Hi Thanks for this very useful repository.

But I find that Raw interface repository doesn't write on Can bus.

I asked for this issue because you mentioned in Readme that it read in any CAN message from the bus, add one to the value of each byte in the received message, and then write that message back out on to the bus.

Thank you consideration.

Best regards :)

JCube001 commented 4 years ago

Hmm, I think I know what happened here. Years ago I began transitioning these examples to C++ in an attempt to write more fleshed out CAN signal processing examples. It looks like by changing the examples, I brought them out of alignment with the expected behavior mentioned in the README.

Since the code is not behaving as defined in the documentation, I will fix it. In the meantime, you may want to checkout commit f7f0e0975618023bed9e3aba666fc682b7d45815. I believe it correctly aligns to the behavior mentioned in the README.

JeyP4 commented 4 years ago

Wow, thanks for this very quick response.

I see in above commit you just removed the 'src' folder.

That's okay. My personal opinion, 'src' folder was grouping main files together. So, it was convenient to figure out which are the main files.