From: Jan Kiszka <jan.kiszka@domain.hid>
To: Wolfgang Grandegger <wg@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>,
socketcan-users@domain.hid, Daniel Schnell <danielsch@domain.hid>
Subject: Re: [Xenomai-help] Re: [Socketcan-users] send error: permission denied
Date: Mon, 21 Aug 2006 21:47:00 +0200 [thread overview]
Message-ID: <44EA0DB4.1080302@domain.hid> (raw)
In-Reply-To: <44EA096D.9080208@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1724 bytes --]
Wolfgang Grandegger wrote:
> Hi Daniel,
>
> Daniel Schnell wrote:
>> Hi,
>>
>>
>>
>> I am new to socket can.
>>
>>
>>
>> I wanted to test the rtcan driver in combination with Linux and
>> Xenomai and made a little program according to the rtcansend program
>> but with some response time measurements.
>>
>>
>>
>> However after setting up the socket I get –EPERM when trying to send a
>> packet to the can device. As the documentation doesn’t state anything
>> about this error when calling rt_dev_send() I wonder why the error if
>> at all doesn’t appear earlier if I try to setup the socket. The test
>> program already ran nicely when I tested the peak can drivers for
>> linux. I just changed the driver specific calls.
>>
>>
>>
>> Attached you find the complete test file, the function task() is the
>> one to blame.
>>
>>
>>
>> I am a bit stuck with this, so maybe someone can give me a slight hint
>> in what i am doing wrong.
>
> I tried your program on my system and got the same error. The problem
> is, that rt_dev_send() is called from non-RT context, which is illegal.
...but should not matter if the caller is a Xenomai thread in "Linux" mode.
> At a first glance, it's not obvious to me why. Therefore I added the
> Xenomai Help ML to the CCs.
How did you all compile the program [1]? Using xeno-config
--posix-cflags / --posix-ldflags?
Jan
PS: Daniel, if you go the POSIX way, you don't have to use rt_dev_, you
can use the normal POSIX API directly. That services will be wrapped on
the Xenomai core just like pthread&friends.
[1]https://lists.berlios.de/pipermail/socketcan-users/attachments/20060821/ff454f48/cantest_rt.obj
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-08-21 19:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DD39B5C3F4963040ADC9768BE7E430CBFFAD9F@is-hdq-exchange.marel.net>
2006-08-21 19:28 ` [Xenomai-help] Re: [Socketcan-users] send error: permission denied Wolfgang Grandegger
2006-08-21 19:47 ` Jan Kiszka [this message]
2006-08-22 5:58 ` [Socketcan-users] [Xenomai-help] " Wolfgang Grandegger
2006-08-22 6:39 ` Jan Kiszka
2006-08-21 19:52 ` [Xenomai-help] Re: [Socketcan-users] " Sebastian Smolorz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44EA0DB4.1080302@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=danielsch@domain.hid \
--cc=socketcan-users@domain.hid \
--cc=wg@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.