www.8devices.com
View unanswered posts | View active topics It is currently 28 Mar 2024, 20:31



Reply to topic  [ 3 posts ] 
 usb2can on Raspberry 
Author Message

Joined: 08 Oct 2014, 05:41
Posts: 2
Hello

I could not find any information on getting the usb2can to work on linux. My linux knowledge is very limited...
The kernel is compiled with CAN support
---
pi@raspberrypi ~ $ grep "CONFIG_CAN" /home/pi/workdir/linux/.config
CONFIG_CAN=y
CONFIG_CAN_RAW=y
CONFIG_CAN_BCM=y
CONFIG_CAN_GW=y
# CONFIG_CAN_VCAN is not set
CONFIG_CAN_SLCAN=y
CONFIG_CAN_DEV=y
CONFIG_CAN_CALC_BITTIMING=y
# CONFIG_CAN_LEDS is not set
# CONFIG_CAN_AT91 is not set
# CONFIG_CAN_MCP251X is not set
# CONFIG_CAN_FLEXCAN is not set
# CONFIG_CAN_SJA1000 is not set
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_EMS_USB is not set
# CONFIG_CAN_ESD_USB2 is not set
# CONFIG_CAN_KVASER_USB is not set
CONFIG_CAN_PEAK_USB=y
CONFIG_CAN_8DEV_USB=y
# CONFIG_CAN_SOFTING is not set
# CONFIG_CAN_DEBUG_DEVICES is not set
---

(The peak driver is activated because Im testing this one too.)
When I plug in the usb2can adapter it is recognized correctly
---
[ 2.680102] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[ 2.688271] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.701367] hub 1-1:1.0: USB hub found
[ 2.706675] hub 1-1:1.0: 5 ports detected
[ 2.989777] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 3.120181] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 3.128535] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.157279] smsc95xx v1.0.4
[ 3.225856] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:1a:1c:45
[ 3.329978] usb 1-1.3: new full-speed USB device number 4 using dwc_otg
[ 3.453475] usb 1-1.3: New USB device found, idVendor=0483, idProduct=1234
[ 3.469758] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.478624] usb 1-1.3: Product: USB2CAN converter
[ 3.499704] usb 1-1.3: Manufacturer: edevices
[ 3.505527] usb 1-1.3: SerialNumber: ED000216
[ 4.013058] udevd[156]: starting version 175
---

But how do I get further?
ifconfig does not show a CAN device. So the SocketCAN that I want to use is not working.

many thanks in advance.

Greetings Klaus


08 Oct 2014, 06:00
Profile

Joined: 07 Dec 2011, 16:01
Posts: 525
Location: Lithuania
http://www.vscp.org/wiki/doku.php/howto ... _sokcetcan


08 Oct 2014, 06:28
Profile

Joined: 08 Oct 2014, 05:41
Posts: 2
Many thanks, it works :-)

Where is the best place to put a automatic bitrate setting after startup?
I get messages in dmesg every second unless I enter 'sudo ip link set can1 type can bitrate 125000'
Placing it in /etc/rc.local leads to a very slow system.

Greetings Klaus


12 Oct 2014, 06:44
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.