* problem to using CAN on beaglebone black A5A
@ 2013-05-24 22:56 Mohamed HAMZAOUI
2013-05-25 11:37 ` Oliver Hartkopp
0 siblings, 1 reply; 9+ messages in thread
From: Mohamed HAMZAOUI @ 2013-05-24 22:56 UTC (permalink / raw)
To: linux-can Mailing List
Hi,
I started with beaglebone black A5A, i installed on it the latest
Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20
17:07:58 CEST 2013 armv7l GNU/Linux
I have a problem when I try to add a can device, i load with modprobe
all necessary kernel module (can, ti_hecc, c_can, c_can_platform,
can-raw, can-bcm) but when i execute
> ip link add can0 type can
I have : RTNETLINK answers: Operation not supported
I used a recent version of iproute2.
Can anyone help me please ?
Regards,
Mohamed
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: problem to using CAN on beaglebone black A5A 2013-05-24 22:56 problem to using CAN on beaglebone black A5A Mohamed HAMZAOUI @ 2013-05-25 11:37 ` Oliver Hartkopp 2013-05-25 11:55 ` Mohamed HAMZAOUI 0 siblings, 1 reply; 9+ messages in thread From: Oliver Hartkopp @ 2013-05-25 11:37 UTC (permalink / raw) To: Mohamed HAMZAOUI; +Cc: linux-can Mailing List On 25.05.2013 00:56, Mohamed HAMZAOUI wrote: > I started with beaglebone black A5A, i installed on it the latest > Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20 > 17:07:58 CEST 2013 armv7l GNU/Linux > > I have a problem when I try to add a can device, i load with modprobe > all necessary kernel module (can, ti_hecc, c_can, c_can_platform, > can-raw, can-bcm) but when i execute >> ip link add can0 type can > I have : RTNETLINK answers: Operation not supported > I used a recent version of iproute2. You can NOT add real hardware devices with "ip link add ...". This only works to create virtual CAN devices (vcan). If you have a working CAN hardware in your system a 'can0' should already be created by the CAN driver. Please send the output of cat /proc/net/dev to see if there's a CAN device. Or you might check the content of 'dmesg' output for CAN devices. Regards, Oliver ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem to using CAN on beaglebone black A5A 2013-05-25 11:37 ` Oliver Hartkopp @ 2013-05-25 11:55 ` Mohamed HAMZAOUI 2013-05-26 10:35 ` Oliver Hartkopp 0 siblings, 1 reply; 9+ messages in thread From: Mohamed HAMZAOUI @ 2013-05-25 11:55 UTC (permalink / raw) To: Oliver Hartkopp; +Cc: linux-can Mailing List I run this command because i can't found any can device : root@beaglebone:~# cat /proc/net/dev Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 280 4 0 0 0 0 0 0 280 4 0 0 0 0 0 0 eth0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 usb0: 11042 79 0 0 0 0 0 0 13479 59 0 0 0 0 0 0 Any Idea ? Regards, Mohamed On Sat, May 25, 2013 at 1:37 PM, Oliver Hartkopp <socketcan@hartkopp.net> wrote: > On 25.05.2013 00:56, Mohamed HAMZAOUI wrote: > >> I started with beaglebone black A5A, i installed on it the latest >> Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20 >> 17:07:58 CEST 2013 armv7l GNU/Linux >> >> I have a problem when I try to add a can device, i load with modprobe >> all necessary kernel module (can, ti_hecc, c_can, c_can_platform, >> can-raw, can-bcm) but when i execute >>> ip link add can0 type can >> I have : RTNETLINK answers: Operation not supported >> I used a recent version of iproute2. > > You can NOT add real hardware devices with "ip link add ...". > This only works to create virtual CAN devices (vcan). > > If you have a working CAN hardware in your system a 'can0' should already be > created by the CAN driver. > > Please send the output of > > cat /proc/net/dev > > to see if there's a CAN device. > > Or you might check the content of 'dmesg' output for CAN devices. > > Regards, > Oliver > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem to using CAN on beaglebone black A5A 2013-05-25 11:55 ` Mohamed HAMZAOUI @ 2013-05-26 10:35 ` Oliver Hartkopp [not found] ` <CABMxt4h-0zYYBvjUqBdf=eChKXxJv77OPhQmh_y7rkwj18mdcQ@mail.gmail.com> 0 siblings, 1 reply; 9+ messages in thread From: Oliver Hartkopp @ 2013-05-26 10:35 UTC (permalink / raw) To: Mohamed HAMZAOUI; +Cc: linux-can Mailing List Hi Mohamed, obviously your kernel does not detect the hardware. AFAIK the beaglebone black has two D_CAN controllers onboard. So the c_can driver (which supports the d_can hardware too) should work. But i don't know how the platform data has to be configured to make your kernel detect the CAN controllers and attach them to the correct pins. What kind of CAN hardware (add-on board) do you use with your beaglebone black? Regards, Oliver On 25.05.2013 13:55, Mohamed HAMZAOUI wrote: > I run this command because i can't found any can device : > root@beaglebone:~# cat /proc/net/dev > Inter-| Receive | Transmit > face |bytes packets errs drop fifo frame compressed > multicast|bytes packets errs drop fifo colls carrier compressed > lo: 280 4 0 0 0 0 0 0 > 280 4 0 0 0 0 0 0 > eth0: 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0 0 0 > usb0: 11042 79 0 0 0 0 0 0 > 13479 59 0 0 0 0 0 0 > > Any Idea ? > > Regards, > Mohamed > > On Sat, May 25, 2013 at 1:37 PM, Oliver Hartkopp <socketcan@hartkopp.net> wrote: >> On 25.05.2013 00:56, Mohamed HAMZAOUI wrote: >> >>> I started with beaglebone black A5A, i installed on it the latest >>> Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20 >>> 17:07:58 CEST 2013 armv7l GNU/Linux >>> >>> I have a problem when I try to add a can device, i load with modprobe >>> all necessary kernel module (can, ti_hecc, c_can, c_can_platform, >>> can-raw, can-bcm) but when i execute >>>> ip link add can0 type can >>> I have : RTNETLINK answers: Operation not supported >>> I used a recent version of iproute2. >> >> You can NOT add real hardware devices with "ip link add ...". >> This only works to create virtual CAN devices (vcan). >> >> If you have a working CAN hardware in your system a 'can0' should already be >> created by the CAN driver. >> >> Please send the output of >> >> cat /proc/net/dev >> >> to see if there's a CAN device. >> >> Or you might check the content of 'dmesg' output for CAN devices. >> >> Regards, >> Oliver >> ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <CABMxt4h-0zYYBvjUqBdf=eChKXxJv77OPhQmh_y7rkwj18mdcQ@mail.gmail.com>]
[parent not found: <CABMxt4jMmBeMqFeyRMQ=5PtQtt6SHDGNGXUGm-WzPsW6Er9+SQ@mail.gmail.com>]
* Re: problem to using CAN on beaglebone black A5A [not found] ` <CABMxt4jMmBeMqFeyRMQ=5PtQtt6SHDGNGXUGm-WzPsW6Er9+SQ@mail.gmail.com> @ 2013-05-28 17:02 ` Oliver Hartkopp 2013-05-28 18:00 ` Wolfgang Grandegger 0 siblings, 1 reply; 9+ messages in thread From: Oliver Hartkopp @ 2013-05-28 17:02 UTC (permalink / raw) To: Mohamed HAMZAOUI; +Cc: linux-can Mailing List On 28.05.2013 01:04, Mohamed HAMZAOUI wrote: > I created a simple card with two CAN transeiver and connected to bbb card > in accordance with bbb datasheet. > I'm not really familiar with the BBB, but i heard something about an EEPROM which is part of the "Standard BBB capes", which contains the hardware description and pin assignment of the capes, see: http://circuitco.com/support/index.php?title=BeagleBone_Capes e.g. http://circuitco.com/support/index.php?title=TT3201_CAN_Cape http://circuitco.com/support/index.php?title=TT3201_CAN_Cape#EEPROM AFAIK the EEPROM is read by the kernel and the devices and the pin assignments are configured according to the EEPROM data ... But i'm not really sure about all this. A Problem of this board http://circuitco.com/support/index.php?title=TT3201_CAN_Cape#EEPROM is, that the pins for the second D_CAN are assigned to the I2C to read the EEPROM. I have no idea how to solve this right now. Regards, Oliver > Regards, > Mohamed > > Le 26 mai 2013 12:35, "Oliver Hartkopp" <socketcan@hartkopp.net > <mailto:socketcan@hartkopp.net>> a écrit : >> >> Hi Mohamed, >> >> obviously your kernel does not detect the hardware. >> >> AFAIK the beaglebone black has two D_CAN controllers onboard. >> >> So the c_can driver (which supports the d_can hardware too) should work. >> But i don't know how the platform data has to be configured to make your >> kernel detect the CAN controllers and attach them to the correct pins. >> >> What kind of CAN hardware (add-on board) do you use with your beaglebone black? >> >> Regards, >> Oliver >> >> On 25.05.2013 13:55, Mohamed HAMZAOUI wrote: >> > I run this command because i can't found any can device : >> > root@beaglebone:~# cat /proc/net/dev >> > Inter-| Receive | Transmit >> > face |bytes packets errs drop fifo frame compressed >> > multicast|bytes packets errs drop fifo colls carrier compressed >> > lo: 280 4 0 0 0 0 0 0 >> > 280 4 0 0 0 0 0 0 >> > eth0: 0 0 0 0 0 0 0 0 >> > 0 0 0 0 0 0 0 0 >> > usb0: 11042 79 0 0 0 0 0 0 >> > 13479 59 0 0 0 0 0 0 >> > >> > Any Idea ? >> > >> > Regards, >> > Mohamed >> > >> > On Sat, May 25, 2013 at 1:37 PM, Oliver Hartkopp <socketcan@hartkopp.net > <mailto:socketcan@hartkopp.net>> wrote: >> >> On 25.05.2013 00:56, Mohamed HAMZAOUI wrote: >> >> >> >>> I started with beaglebone black A5A, i installed on it the latest >> >>> Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20 >> >>> 17:07:58 CEST 2013 armv7l GNU/Linux >> >>> >> >>> I have a problem when I try to add a can device, i load with modprobe >> >>> all necessary kernel module (can, ti_hecc, c_can, c_can_platform, >> >>> can-raw, can-bcm) but when i execute >> >>>> ip link add can0 type can >> >>> I have : RTNETLINK answers: Operation not supported >> >>> I used a recent version of iproute2. >> >> >> >> You can NOT add real hardware devices with "ip link add ...". >> >> This only works to create virtual CAN devices (vcan). >> >> >> >> If you have a working CAN hardware in your system a 'can0' should already be >> >> created by the CAN driver. >> >> >> >> Please send the output of >> >> >> >> cat /proc/net/dev >> >> >> >> to see if there's a CAN device. >> >> >> >> Or you might check the content of 'dmesg' output for CAN devices. >> >> >> >> Regards, >> >> Oliver >> >> >> > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem to using CAN on beaglebone black A5A 2013-05-28 17:02 ` Oliver Hartkopp @ 2013-05-28 18:00 ` Wolfgang Grandegger [not found] ` <CABMxt4gO+mQR3JshUDUztKC7oPt3zXcyZ-1Hp4dn7Wy7=CEhAQ@mail.gmail.com> 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Grandegger @ 2013-05-28 18:00 UTC (permalink / raw) To: Mohamed HAMZAOUI; +Cc: Oliver Hartkopp, linux-can Mailing List Hi Mohamed, On 05/28/2013 07:02 PM, Oliver Hartkopp wrote: > On 28.05.2013 01:04, Mohamed HAMZAOUI wrote: >> I created a simple card with two CAN transeiver and connected to bbb card >> in accordance with bbb datasheet. It's difficult for us to guess what you are doing and using. Please provide more information about your hardware and software: - what hardware/board are you using? - what Linux distribution are you using? - what Linux kernel version are you using - where did you get the Linux kernel from? Also showing us your boot log (output of "# dmesg") and the kernel's ".config" would be help. Wolfgang. ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <CABMxt4gO+mQR3JshUDUztKC7oPt3zXcyZ-1Hp4dn7Wy7=CEhAQ@mail.gmail.com>]
[parent not found: <CABMxt4gBjFZnWCx-dY=PpnbQ7P96ZhXAeJQ71c34J3jtTKV_1A@mail.gmail.com>]
* Re: Fwd: problem to using CAN on beaglebone black A5A [not found] ` <CABMxt4gBjFZnWCx-dY=PpnbQ7P96ZhXAeJQ71c34J3jtTKV_1A@mail.gmail.com> @ 2013-06-03 11:21 ` Wolfgang Grandegger 2013-06-03 18:03 ` Mohamed HAMZAOUI 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Grandegger @ 2013-06-03 11:21 UTC (permalink / raw) To: Mohamed HAMZAOUI; +Cc: linux-can Mailing List, Oliver Hartkopp On 06/03/2013 01:09 PM, Mohamed HAMZAOUI wrote: > Hi, > > Hardware : BeagleBone Black version A5A > (http://beagleboard.org/Products/BeagleBone%20Black ) > Linux distribution : Angstrom > Linux kernel : 3.8.13 > the driver for the can is C_CAN > > I can solve this issue by loading the correct cape firmware for my > BeagleBone Black with : > echo BB-BONE-SERL-01 > /sys/devices/bone_capemgr.9/slots > we need to have the related firmware in /lib/firmware and > bone_capemgr.9 have not always the same name (example bone_capemgr.7, > ...) > > The problem actually is that is not possible to load the second CAN > channel like mentionned by Olivier : > "A Problem of this board > > http://circuitco.com/support/index.php?title=TT3201_CAN_Cape#EEPROM > > is, that the pins for the second D_CAN are assigned to the I2C to read the > EEPROM. I have no idea how to solve this right now." OK, I see. > Any idea ? Maybe it could be done by just modifying the DTS file. Could you show that DTS file? Wolfgang. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: problem to using CAN on beaglebone black A5A 2013-06-03 11:21 ` Fwd: " Wolfgang Grandegger @ 2013-06-03 18:03 ` Mohamed HAMZAOUI 2013-06-03 18:41 ` Wolfgang Grandegger 0 siblings, 1 reply; 9+ messages in thread From: Mohamed HAMZAOUI @ 2013-06-03 18:03 UTC (permalink / raw) To: Wolfgang Grandegger; +Cc: linux-can Mailing List I can't find DTS file, so can you give me more information about this file ? there is the kernel output when I change the device tree to get can channels : [ 113.083038] bone-capemgr bone_capemgr.9: part_number 'BB-BONE-SERL-01', version 'N/A' [ 113.093905] bone-capemgr bone_capemgr.9: slot #7: generic override [ 113.101776] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 7 [ 113.110931] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,BB-BONE-SERL-01' [ 113.122488] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BB-BONE-SERL-01-00A0.dtbo [ 113.134366] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BB-BONE-SERL-01-00A0.dtbo' for board-name 'Override Board Name', version '00A0' [ 113.150154] bone-capemgr bone_capemgr.9: slot #7: dtbo 'BB-BONE-SERL-01-00A0.dtbo' loaded; converting to live tree [ 113.162739] bone-capemgr bone_capemgr.9: slot #7: #2 overlays [ 113.171190] platform 481d0000.d_can: alias fck already exists [ 113.184668] c_can_platform 481d0000.d_can: invalid resource [ 113.201248] c_can_platform 481d0000.d_can: control memory is not used for raminit [ 113.218966] c_can_platform 481d0000.d_can: c_can_platform device registered (regs=fa1d0000, irq=71) [ 113.243172] bone-capemgr bone_capemgr.9: slot #7: Applied #2 overlays. I can't get the second CAN channel ! Regards, Mohamed On Mon, Jun 3, 2013 at 1:21 PM, Wolfgang Grandegger <wg@grandegger.com> wrote: > On 06/03/2013 01:09 PM, Mohamed HAMZAOUI wrote: >> Hi, >> >> Hardware : BeagleBone Black version A5A >> (http://beagleboard.org/Products/BeagleBone%20Black ) >> Linux distribution : Angstrom >> Linux kernel : 3.8.13 >> the driver for the can is C_CAN >> >> I can solve this issue by loading the correct cape firmware for my >> BeagleBone Black with : >> echo BB-BONE-SERL-01 > /sys/devices/bone_capemgr.9/slots >> we need to have the related firmware in /lib/firmware and >> bone_capemgr.9 have not always the same name (example bone_capemgr.7, >> ...) >> >> The problem actually is that is not possible to load the second CAN >> channel like mentionned by Olivier : >> "A Problem of this board >> >> http://circuitco.com/support/index.php?title=TT3201_CAN_Cape#EEPROM >> >> is, that the pins for the second D_CAN are assigned to the I2C to read the >> EEPROM. I have no idea how to solve this right now." > > OK, I see. > >> Any idea ? > > Maybe it could be done by just modifying the DTS file. Could you show > that DTS file? > > Wolfgang. > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: problem to using CAN on beaglebone black A5A 2013-06-03 18:03 ` Mohamed HAMZAOUI @ 2013-06-03 18:41 ` Wolfgang Grandegger 0 siblings, 0 replies; 9+ messages in thread From: Wolfgang Grandegger @ 2013-06-03 18:41 UTC (permalink / raw) To: Mohamed HAMZAOUI; +Cc: linux-can Mailing List On 06/03/2013 08:03 PM, Mohamed HAMZAOUI wrote: > I can't find DTS file, so can you give me more information about this file ? DTS stands for "Device Tree Source"... > there is the kernel output when I change the device tree to get can channels : ... so how do you change the device tree? > [ 113.083038] bone-capemgr bone_capemgr.9: part_number > 'BB-BONE-SERL-01', version 'N/A' > [ 113.093905] bone-capemgr bone_capemgr.9: slot #7: generic override > [ 113.101776] bone-capemgr bone_capemgr.9: bone: Using override > eeprom data at slot 7 > [ 113.110931] bone-capemgr bone_capemgr.9: slot #7: 'Override Board > Name,00A0,Override Manuf,BB-BONE-SERL-01' > [ 113.122488] bone-capemgr bone_capemgr.9: slot #7: Requesting part > number/version based 'BB-BONE-SERL-01-00A0.dtbo > [ 113.134366] bone-capemgr bone_capemgr.9: slot #7: Requesting > firmware 'BB-BONE-SERL-01-00A0.dtbo' for board-name 'Override Board > Name', version '00A0' > [ 113.150154] bone-capemgr bone_capemgr.9: slot #7: dtbo > 'BB-BONE-SERL-01-00A0.dtbo' loaded; converting to live tree > [ 113.162739] bone-capemgr bone_capemgr.9: slot #7: #2 overlays > [ 113.171190] platform 481d0000.d_can: alias fck already exists You seem to use the alias twice. > [ 113.184668] c_can_platform 481d0000.d_can: invalid resource > [ 113.201248] c_can_platform 481d0000.d_can: control memory is not > used for raminit > [ 113.218966] c_can_platform 481d0000.d_can: c_can_platform device > registered (regs=fa1d0000, irq=71) > [ 113.243172] bone-capemgr bone_capemgr.9: slot #7: Applied #2 overlays. > > I can't get the second CAN channel ! Some doc of the CAN device tree bindings can be found here: - http://lxr.linux.no/#linux+v3.8.6/Documentation/devicetree/bindings/net/can/c_can.txt In a recent kernel tree, there seem to be support for two D_CAN devices on the AM33xx SOCs: - https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am33xx.dtsi I can not tell you more details because I'm not familiar with that CPU. Hope it helps anyway. Wolfgang. Wolfgang. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-06-03 18:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24 22:56 problem to using CAN on beaglebone black A5A Mohamed HAMZAOUI
2013-05-25 11:37 ` Oliver Hartkopp
2013-05-25 11:55 ` Mohamed HAMZAOUI
2013-05-26 10:35 ` Oliver Hartkopp
[not found] ` <CABMxt4h-0zYYBvjUqBdf=eChKXxJv77OPhQmh_y7rkwj18mdcQ@mail.gmail.com>
[not found] ` <CABMxt4jMmBeMqFeyRMQ=5PtQtt6SHDGNGXUGm-WzPsW6Er9+SQ@mail.gmail.com>
2013-05-28 17:02 ` Oliver Hartkopp
2013-05-28 18:00 ` Wolfgang Grandegger
[not found] ` <CABMxt4gO+mQR3JshUDUztKC7oPt3zXcyZ-1Hp4dn7Wy7=CEhAQ@mail.gmail.com>
[not found] ` <CABMxt4gBjFZnWCx-dY=PpnbQ7P96ZhXAeJQ71c34J3jtTKV_1A@mail.gmail.com>
2013-06-03 11:21 ` Fwd: " Wolfgang Grandegger
2013-06-03 18:03 ` Mohamed HAMZAOUI
2013-06-03 18:41 ` Wolfgang Grandegger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).