Hi, I have a P4 and and Pican 3 interface , there a libs and examples for python, but I want to do the same with Xojo and a nice gui around it.
In Python its done with :
ip link set can0 up type can…
and then
…
bus = can.interface.Bus(channel=‘can0’, bustype=‘socketcan_native’)
…
Hope somebody can help and I can show what is also possible with XOJO and a Pi 4.
BR Rainer
MarkusR
(MarkusR)
September 6, 2024, 2:38pm
2
there are many library that not part of xojo but you can speak from Python to Xojo via TCP (Network).
https://wiki.python.org/moin/TcpCommunication
Hallo Markus, thx for the fast response. The Python samples work, its a socket Interface for CAN See Socket Can on Internet. .
If i can open a socket in Xojo it should work also,with with a CAN socket, using the CAN protocoll inständig of tcp, udp,…
BR Rainer
MarkusR
(MarkusR)
September 6, 2024, 5:01pm
4
Rainer Greim:
Socket Can
seems it is possible to switch to the inet protocoll somehow.
SocketCAN is a set of open source CAN drivers and a networking stack contributed by Volkswagen Research to the Linux kernel. SocketCAN was formerly known as Low Level CAN Framework (LLCF).
Traditional CAN drivers for Linux are based on the model of character devices. Typically they only allow sending to and receiving from the CAN controller. Conventional implementations of this class of device driver only allow a single process to access the device, which means that all other processes are block...
i think xojo only support tcp and udp.
If i can open a socket in Xojo
Der Begriff Socket ist zu allgemein,
das ist wie deutsche Stecker in eine amerikanische/asiatische Steckdose stecken
Danke …
Maybe I should use canutils and call them by a shellsript.
But then it is better to stay with Python and TK.
BR Rainer