I have been trying to run the xddp-label.c example as given in the xenomai documentation on my raspberry pi model 3b+ with xenomai patched kernel. I can compile the program just fine, but when I try to run it I get the error: socket: Address family not supported by protocol. I noticed I get the same error when trying to compile other xddp examples from the documentation. I suspect it has something to do with the AF_RTIPC macro and the sockets, but I do not know anything about socket programming, so I am not sure. I hope someone can help me with this.

I am using a prebuilt xenomai kernel on my raspberry pi from this tutorial. I have tried running the program with a custom patched xenomai kernel as well, but without success.

For reference, the output of uname -a:

Linux raspberrypi 4.9.80-v7-xeno3+ #2 SMP PREEMPT Fri Aug 10 15:04:48 KST 2018 armv7l GNU/Linux

The makefile I am using to compile the program:



CFLAGS := -g $(shell xeno-config --posix --skin=$(SKIN) --cflags)
LDFLAGS := -g $(LM) $(shell xeno-config --posix --skin=$(SKIN) --ldflags)
#CC := $(shell xeno-config --cc)

    $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)

I run the program with sudo ./xddp_label.c. The OS is raspbian buster.

  • Hi Yousousen, great question! Could you please provide some additional information: what Raspberry Pi model are you using?
    – David
    Apr 26 '20 at 21:38
  • Sure, I edited my question and added the model.
    – Yousousen
    Apr 27 '20 at 11:44

I have found the solution myself.

While building the kernel, in the kernel configuration the CONFIG_XENO_DRIVERS_RTIPC_XDDP option needs to be enabled.

  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    May 1 '20 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.