Skip to contentSkip to conversation

bcmserver.c usage and preconditions

DISCUSSION Patrick Menschel 3 participants 5 messages Mar 30, 2016 CAN network drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I'd like to ask what preconditions are necessary for the bcmserver.c example to work.

1. I setup can0

~$ sudo ip link set can0 up type can bitrate 500000

2. then start bcmserver

~$ bcmserver

3. and input the line

~$ can0 A 1 0 123 8 11 22 33 44 55 66 77 88

but unfortunately I don't get any output at all.

I believe it's my fault since this is the result on both BananaPi and BeagleBoneBlack. The Bpi has the bcm compiled into the kernel and the BBB has the can-bcm.ko properly loaded.

~$ modinfo can-bcm

filename:       /lib/modules/4.1.15-ti-rt-r43/kernel/net/can/can-bcm.ko
alias:          can-proto-2
author:         Oliver Hartkopp <[email protected]>
license:        Dual BSD/GPL
description:    PF_CAN broadcast manager protocol
depends:        can
intree:         Y
vermagic:       4.1.15-ti-rt-r43 SMP preempt mod_unload modversions

ARMv7 thumb2 p2v8

Thanks and Best Regards,
Patrick

#1 lore raw

Hi Patrick,

Have you tested CAN line without bcmserver. I mean is the CAN bus functional, are you able to transmit receive frames.

You can test it with canutils.
<http://elinux.org/Can-utils>

Best regards

Pankaj Kumar Misra
RBEI/EEA2

Tel. +49(711)8113659089 | Mobile +4915145771414

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Patrick Menschel
Sent: Wednesday, March 30, 2016 8:01 AM
To: linux-can <[email protected]>
Subject: bcmserver.c usage and preconditions

Hi,

I'd like to ask what preconditions are necessary for the bcmserver.c example to work.

1. I setup can0

~$ sudo ip link set can0 up type can bitrate 500000

2. then start bcmserver

~$ bcmserver

3. and input the line

~$ can0 A 1 0 123 8 11 22 33 44 55 66 77 88

but unfortunately I don't get any output at all.

I believe it's my fault since this is the result on both BananaPi and BeagleBoneBlack. The Bpi has the bcm compiled into the kernel and the BBB has the can-bcm.ko properly loaded.

~$ modinfo can-bcm

filename:       /lib/modules/4.1.15-ti-rt-r43/kernel/net/can/can-bcm.ko
alias:          can-proto-2
author:         Oliver Hartkopp <[email protected]>
license:        Dual BSD/GPL
description:    PF_CAN broadcast manager protocol
depends:        can
intree:         Y
vermagic:       4.1.15-ti-rt-r43 SMP preempt mod_unload modversions

ARMv7 thumb2 p2v8

Thanks and Best Regards,
Patrick

#2 lore raw

Hi Pankaj,

CAN Bus is functional in both directions, rx and tx .

1. cansend works properly
2. candump also works properly

I'm just trying to verify if it's just me or the bcm.
I expect a usage error because I run a non-modified debian 8 image on the BeagleBoneBlack, which shows exactly the same behaviour.

Thanks and Best Regards,
Patrick

Am 30.03.2016 um 09:57 schrieb Misra Pankaj Kumar (RBEI/EEA2):

Quoted 61 lines

Hi Patrick,

Have you tested CAN line without bcmserver. I mean is the CAN bus functional, are you able to transmit receive frames.

You can test it with canutils.
<http://elinux.org/Can-utils>

Best regards

Pankaj Kumar Misra
RBEI/EEA2

Tel. +49(711)8113659089 | Mobile +4915145771414

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Patrick Menschel
Sent: Wednesday, March 30, 2016 8:01 AM
To: linux-can <[email protected]>
Subject: bcmserver.c usage and preconditions

Hi,

I'd like to ask what preconditions are necessary for the bcmserver.c example to work.

1. I setup can0

~$ sudo ip link set can0 up type can bitrate 500000

2. then start bcmserver

~$ bcmserver

3. and input the line

~$ can0 A 1 0 123 8 11 22 33 44 55 66 77 88

but unfortunately I don't get any output at all.

I believe it's my fault since this is the result on both BananaPi and BeagleBoneBlack. The Bpi has the bcm compiled into the kernel and the BBB has the can-bcm.ko properly loaded.

~$ modinfo can-bcm

filename:       /lib/modules/4.1.15-ti-rt-r43/kernel/net/can/can-bcm.ko
alias:          can-proto-2
author:         Oliver Hartkopp <[email protected]>
license:        Dual BSD/GPL
description:    PF_CAN broadcast manager protocol
depends:        can
intree:         Y
vermagic:       4.1.15-ti-rt-r43 SMP preempt mod_unload modversions

ARMv7 thumb2 p2v8

Thanks and Best Regards,
Patrick

N�����r��y���b�X��ǧv�^�)޺{.n�+����{�q���^n�r���z���h����&���G���h�(�階�ݢj"���m�����z�ޖ���f���h���~�mml==

#3 lore raw

Hi Patrick,

Quoted 8 lines · Patrick Menschel

Hi Pankaj,

CAN Bus is functional in both directions, rx and tx .

1. cansend works properly
2. candump also works properly

I'm just trying to verify if it's just me or the bcm.

It's you :-)

Quoted 10 lines
Quoted 10 lines

2. then start bcmserver

~$ bcmserver

3. and input the line

~$ can0 A 1 0 123 8 11 22 33 44 55 66 77 88

but unfortunately I don't get any output at all.

The bcmserver creates an IP server listening on port 28600 on localhost.

So you would need to connect this server e.g. with netcat first and then type the according command (with '<' and '>' tags!!) into the netcat shell.

Regards,
Oliver

#4 lore raw

Thanks Oliver,

based on the usage examples in the file header I thought it reads from stdin ;-P

I have it working now on both BananaPi and BeagleBoneBlack.

Regards,
Patrick

Am 30.03.2016 um 13:59 schrieb Oliver Hartkopp:

Quoted 32 lines

Hi Patrick,

Quoted 8 lines · Patrick Menschel

Hi Pankaj,

CAN Bus is functional in both directions, rx and tx .

1. cansend works properly
2. candump also works properly

I'm just trying to verify if it's just me or the bcm.

It's you :-)

Quoted 10 lines
Quoted 10 lines

2. then start bcmserver

~$ bcmserver

3. and input the line

~$ can0 A 1 0 123 8 11 22 33 44 55 66 77 88

but unfortunately I don't get any output at all.

The bcmserver creates an IP server listening on port 28600 on localhost.

So you would need to connect this server e.g. with netcat first and then type the according command (with '<' and '>' tags!!) into the netcat shell.

Regards,
Oliver