Hi all,

I finally discovered that the driver that the FOXCOM uses for the 
sja1000 canbus interface is canbus4linux.
It seems that this driver is included in the fimage only if you choose 
kernel 2.4. If you choose kernel 2.6 you don't get the driver.

 From the foxcom schematics the sja1000 seems to be connected to 
parallel port 0 of the foxboard.
The first question is: DO I have to enable parallel port support or not? 
I think yes is the right answer.
If I only enable the parallel port is ok. If I try to enable parallel 
port 0 I get an error during the make command.

If I check the DMESG command it seems that the driver is loading correctly:

CANBUS4LINUX: Version 0.2.1 / Dec 15 2007 / 16:49:42
CANBUS4LINUX: [446]:  init_module()
CANBUS4LINUX: [403]:  Register device no.: 0
CANBUS4LINUX: [985]:  registering can device: can200 parallelport card0
CANBUS4LINUX: [295]:  registering isr()
CANBUS4LINUX: [1394]:  registering can device: can200 parallelport 
card0|SJA 100
0 Chipset driver
CANBUS4LINUX: [959]:  registering isr()
CANBUS4LINUX: [1428]:  Initializing can device -0-: 0 0 c00b94e8
CANBUS4LINUX: [1457]:  canbus4linux_register_device() - finished
CANBUS4LINUX: [1036]:  sja1000_register_device() - finished
CANBUS4LINUX: [459]:  Init module finished
CANBUS4LINUX: [1062]:  init_module()

In the proc directory, under canbus/0 I can see all the files the driver 
is supposed to create.

Now I try to access the canbus in all the possible ways from the 
canbus4linux documentation:
echo 500000 > /proc/canbus/0/baudrate

After this command my SSH session is immediately terminated. Every time 
I try to access the proc/canbus/0 files the SSH gets closed immediately.
I then wrote a small C program to try use the canbus this way (it was 
I'll want to do in the future)
After the "file = open("/dev/can0",O_RDWR);" I get a segmentation fault 
error!!!

I then look at dmesg and I see:
CANBUS4LINUX: [1542]:  SetCanbusFileEntry -1-
CANBUS4LINUX: [1639]:  canbus4linux_open 0
CANBUS4LINUX: [191]:  canbus4linux_open_device -1- 0
CANBUS4LINUX: [194]:  canbus4linux_open_device -2-

for what I can understand here the driver does not seem able to open the 
device 1 and goes on with 2...

Someome can please help me??





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/foxboard/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/foxboard/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to