Raspberry Pi 4B and XOJO with M1 / cool, but ,,, how do I CAN and XCP

Hi ,

yesterday I installed my RaspBerryPi 4B ( inside a Joy-IT case ) , red the Raspi book, and … it worked out of the Box with GPIO.

But I want to use a can module (SPI, CAN) , which is connected via SPI board to the PI. How I do this with XOJO ?

If it works next step would be to understand the python samples and XCP ( …ASAM MCD-1 XCP …, …GitHub - christoph2/pyxcp: ASAM XCP in Python…) and how to do this all with Xojo on a PI .

Thx for your support
Rainer

Update : red the doc of the can module, and found can-utils page.
Its a socket.
…. https://www.kernel.org/doc/Documentation/networking/can.txthttps://elinux.org/CAN_Bus…
Maybe this makes things easier to understand.

Q: How do I make socket conn with XOJO on a Raspi ?

Thanks for your support.

Rainer

Beyond the Turn of one LED and check for the press of a button… The limitations in xojo make it bad for the GPIO. If you really need the main part to be in xojo, your bes option it is to make the GPIO app in another languaje and make it comunicate with xojo.

Hello Ivan, I spent a lot of time today, to get Into these topics. I also orderered some CAN stuff.

  • Pi Can 3

  • Seeed Studio CANBed – Arduino CAN-BUS Development

  • what helps me : can-utilties, a book ( in German ). : Fahrzeugdiagnose mit OBD II

As I learned today : its either a SPI / a socket or a bluetooth ( RFCOM)

BTW : if it doesnt work direct in XOJO, why not calling a sub process.

So I continue my journey to embedded world with XOJO.

Rainer

I’m running Windows 10 on an Aaeon Up Board (same form factor and GPIO header as RPi) and I can control all GPIO via calls to a dll supplied by Aaeon. Looks like they also support I2C, not sure about SPI. One bad thing is they have no Windows COM port driver for UART1 on the HAT header, but UART0 does work.

1 Like

Sometimes with custom things like this (pylogix, PLC comms) I have found it easier to call a python script to do the work using shell.execute, or using TCP Comms between the apps, since python can both run on the pi and has native libs.

1 Like

they wrote is compatible with tcp.
at tcp one pc open a port and listen for incomming connection, then it allow or block this connection.
at xojo you have a control which can connect to it.

to read non realtime gpio state its possible in many ways. (Remote GPIO)

interact with python should be possible if you start a script via xojo shell class. text output can received in xojo.

or in python you can use tpc too.
in phython it is possible to register for a signal change, it will call a method then.

1 Like

Thanks to all for the valuable Input.

Rainer

Hi I little ping from my side.
I made the 1st tests with raspi and Xojo running on my m1.
Works… also I can talk to gpio,
I have now purchased a canboard based on Arduino and the can pi board pi can 3.
And again I got many links and examples.Hope these links will also help others

http://opengarages.org/index.php/MCD_software

Btw : what doesn’t work is, arduino IDE with M1. Maybe I ll use my raspi for this.

BR Rainer

1 Like