* Re: esd CAN USB/2 and SocketCAN
[not found] <8CE1D0B9BFD2404DA079DDE1814A6F2E02BA841ABD00@esd-s3.esd.local>
@ 2014-03-21 19:06 ` Francesco Giovannini
0 siblings, 0 replies; only message in thread
From: Francesco Giovannini @ 2014-03-21 19:06 UTC (permalink / raw)
To: Thomas Körper; +Cc: Matthias Fuchs, linux-can@vger.kernel.org
On 18/03/14 12:04, Thomas Körper wrote:
> Hello,
>
> I tried to reproduce your problems with our USB/2 CAN module, see following output.
> But there seems to be no issue specific to that software combination.
>
> The disconnection while setting the baudrate therefore seems to be caused by USB power issues. (When setting the baudrate the module needs more power: exactly the moment the disconnect occurs)
>
> So how does that CAN USB/2 behave at another PC, or without/with powered USB-Hub etc.?
>
>
> Kind Regards,
> Thomas Körper
>
> linux-su5w:/usr/src/linux # uname -a
> Linux linux-su5w 3.4.63-2.44-desktop #1 SMP PREEMPT Wed Oct 2 11:18:32 UTC 2013 (d91a619) i686 i686 i386 GNU/Linux
> linux-su5w:/usr/src/linux # modinfo esd_usb2
> filename: /lib/modules/3.4.63-2.44-desktop/extra/esd_usb2.ko
> license: GPL v2
> description: CAN driver for esd CAN-USB/2 interfaces
> author: Matthias Fuchs <matthias.fuchs@esd.eu>
> srcversion: BB525C832956175CE3B9316
> alias: usb:v0AB4p0010d*dc*dsc*dp*ic*isc*ip*
> depends:
> vermagic: 3.4.63-2.44-desktop SMP preempt mod_unload modversions 686
> linux-su5w:/usr/src/linux # canconfig can0 stop
> can0 state: STOPPED
> linux-su5w:/usr/src/linux # canconfig can0 bittiming prop-seg 2 phase-seg1 12 phase-seg2 5 sjw 1 brp 3 tq 50
> can0 bittiming:
> tq: 50, prop-seq: 2 phase-seq1: 12 phase-seq2: 5 sjw: 1, brp: 3
> can0 bitrate: 1000000, sample-point: 0.750
> linux-su5w:/usr/src/linux # ip -d link show can0
> 2: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT qlen 10
> link/can
> can state STOPPED (berr-counter tx 0 rx 160) restart-ms 0
> bitrate 1000000 sample-point 0.750
> tq 50 prop-seg 2 phase-seg1 12 phase-seg2 5 sjw 1
> esd_usb2: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
> clock 60000000
> linux-su5w:/usr/src/linux # dmesg -c
> [ 886.429642] esd_usb2 1-1:1.0: can0: setting BTR=0x804d0002
> linux-su5w:/usr/src/linux # canconfig can0 start
> can0 state: ERROR-ACTIVE
> linux-su5w:/usr/src/linux # cansend can0 000#112233
> interface = can0, family = 29, type = 3, proto = 1
> linux-su5w:/usr/src/linux # cat /sys/class/net/can0/device/firmware
> 1.1.0
>
Hello,
I tried the same device on a Debian 7.4, kernel 3.2.0-4-amd64 #1 SMP
Debian 3.2.54-2 x86_64 GNU/Linux, can kernel module coming from the
kernel source tree. Everything works fine.
I asked my colleagues and it seems that this "peak current" problem is
well known. Some of us even resorted to opening the CAN-USB and adding a
capacitor to fix the problem. :)
I must say that I was plugging it in the USB ports which are at the
front of the case. It is therefore plausible that those ports could not
draw enough power when needed. I have since then resorted to using
Windows 7 and the necessary driver on the same machine. Everything works
fine there, albeit the device is a CAN mini.
Thanks for investigating this, guys!
Francesco
--
*Francesco Giovannini*
Research Fellow
iCub Facility
*Istituto Italiano di Tecnologia*
Via Morego, 30 16163 Genova
/email:/ francesco.giovannini@iit.it <mailto://francesco.giovannini@iit.it>
www.iit.it <http://www.iit.it>
iit-logo-icub
^ permalink raw reply [flat|nested] only message in thread