Search found 21 matches

by KristinH
22 Apr 2025, 19:17
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

Ahhh.. that explains it then. Thank you.
You just can't see the side when it's mounted on a heavily populated DIN rail! I was unlucky enough to get two with the printing error.
by KristinH
17 Apr 2025, 18:54
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

Ok I'm having trouble seeing these CAN messages on our CANKing monitor.

When the two RevPi's are talking to each other, they can see the messages but the CANKing can't.
When I put the CANKing on our test rig, it can see CAN messages, but the RevPis can't.
A quick look with an oscilloscope showed ...
by KristinH
17 Apr 2025, 14:39
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

Thank you.

I can see that uses the equivalent of system() calls but from within python. I know that the command line works and am trying to get the standard C libraries to work.

I have finally succeed! https://gist.github.com/Hansen-KK
Cross compiling in Visual Studio logged in to RevPis as root.
by KristinH
17 Apr 2025, 09:50
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

That explains it.. command line I'm using sudo, cross platform debugging using standard Pi login.

With root login for debugging, those commands now run without error. Still doesn't work yet, but getting closer.
by KristinH
16 Apr 2025, 15:27
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

All examples I can find online use libsocketcan to interact with the can0 device from within C.

By using the following commands I can get the can0 connection to be seen as "UP" and then the example C code works:
~$ sudo ip link set can0 type can bitrate 250000
~$ sudo ip link set up can0

However ...
by KristinH
16 Apr 2025, 10:14
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

Of course I have modified it to connect to the "can0" you mentioned above, which is why I asked. (line 29 in receive and line 28 in transmit)

I have now managed to send and receive over CAN by using a combination of command line to set the CAN to UP and the C code above. Having proven the ...
by KristinH
16 Apr 2025, 09:59
Forum: Software
Topic: start-config. fails to start
Replies: 13
Views: 14370

Re: start-config. fails to start

Thank you. I have removed that and it works now. My mistake, I'm flipping between two Industrial Pi platforms for a technology validation project and must have enabled that on the incorrect platform.

We're on a roll now!
by KristinH
15 Apr 2025, 17:52
Forum: Software
Topic: start-config. fails to start
Replies: 13
Views: 14370

Re: start-config. fails to start

Four files are attached.
The initial files are what I get immediately after a power cycle. the DIO is showing a red LED, the RevPi a green one.
Then I ran piTest -x, the files suffixed with _good are with both RevPis and DIOs showing green LEDs
by KristinH
15 Apr 2025, 17:39
Forum: Software
Topic: Code Example for ConCAN?
Replies: 15
Views: 17588

Re: Code Example for ConCAN?

I am using these as example code:

https://github.com/craigpeacock/CAN-Examples

I am running my two RevPi's, one with the transmit code, one with the receive code, but both report network down.
When I add in can_get_state() from libsocketcan I get a state of CAN_STATE_STOPPED

CAN Sockets ...
by KristinH
15 Apr 2025, 11:40
Forum: Software
Topic: start-config. fails to start
Replies: 13
Views: 14370

Re: start-config. fails to start

Sorry missed mentioning that. They're both without any of those lines and always fail to start on reboot or power cycle. At best I can start them with piTest -x, at worse I have to completely reload everything and power cycle.
(yes, I've updated and upgraded them today)