All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Robert <robercik@wp.eu>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: linsocketcan
Date: Tue, 20 Nov 2012 14:29:26 +0100	[thread overview]
Message-ID: <50AB85B6.3090702@pengutronix.de> (raw)
In-Reply-To: <003501cdc71f$aca1c950$05e55bf0$@wp.eu>

[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]

Hey Robert,

please use the linux-can mailinglist (Cc'ed). Don't post HTML mails there.

On 11/20/2012 02:05 PM, Robert wrote:
> Hi,
> 
> I try use libsocketcan  in my android application to work with CANbus
>  (ti_HECC ) in HMI device TH-1535  based on ARM3517 Sitara .
> 
> OS Android IceCream  Linux kernel 2.6.37
> 
>  
> 
> Add libsocketcan.c  to my  jni  folder and build library
>   libsocketcan.so  use  ndk-build (all ok no errors)
> 
>  
> 
> If  use *can_set_bitrate**(“can0”, 125000),*function*send_mod_request
> return -1 (errno = 1,  err->error = 2).*

If the libsocketcan isn't buggy here, and errno equals 1, you should
have a look at the errno definition[1]. An errno of 1 means "Operation
not permitted". In non Android Linux systems you need to be the root
user to set the bitrate.

[1] http://lxr.free-electrons.com/source/include/asm-generic/errno-base.h#L4

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

       reply	other threads:[~2012-11-20 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <003501cdc71f$aca1c950$05e55bf0$@wp.eu>
2012-11-20 13:29 ` Marc Kleine-Budde [this message]
     [not found]   ` <004401cdc72c$4bd2ff60$e378fe20$@wp.eu>
2012-11-20 14:38     ` linsocketcan Marc Kleine-Budde
     [not found]       ` <001d01cdc7be$17730520$46590f60$@wp.eu>
2012-11-21  8:18         ` linsocketcan Marc Kleine-Budde

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=50AB85B6.3090702@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=robercik@wp.eu \
    /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.