All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: linsocketcan
       [not found] <003501cdc71f$aca1c950$05e55bf0$@wp.eu>
@ 2012-11-20 13:29 ` Marc Kleine-Budde
       [not found]   ` <004401cdc72c$4bd2ff60$e378fe20$@wp.eu>
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-11-20 13:29 UTC (permalink / raw)
  To: Robert; +Cc: linux-can@vger.kernel.org

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linsocketcan
       [not found]   ` <004401cdc72c$4bd2ff60$e378fe20$@wp.eu>
@ 2012-11-20 14:38     ` Marc Kleine-Budde
       [not found]       ` <001d01cdc7be$17730520$46590f60$@wp.eu>
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-11-20 14:38 UTC (permalink / raw)
  To: Robert; +Cc: linux-can@vger.kernel.org

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

Hello Robert,

please keep the mailinglist on Cc.

On 11/20/2012 03:35 PM, Robert wrote:
> OS  Android on my device is rooted. 
> I know the error codes and so I asked what may have caused the error No. 1.

A rooted devices doesn't mean that every process runs as root. Have you
started your program as root?

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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linsocketcan
       [not found]       ` <001d01cdc7be$17730520$46590f60$@wp.eu>
@ 2012-11-21  8:18         ` Marc Kleine-Budde
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-11-21  8:18 UTC (permalink / raw)
  To: linux-can@vger.kernel.org

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

Hello,

for the protocol, problem solved:

On 11/21/2012 08:59 AM, Robert wrote:
>> A rooted devices doesn't mean that every process runs as root. Have you
>> started your program as root?

> All ok, CANbus is Up. Thanks for suggestions.

\o/

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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-21  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <003501cdc71f$aca1c950$05e55bf0$@wp.eu>
2012-11-20 13:29 ` linsocketcan Marc Kleine-Budde
     [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

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.