               
              EMUC-B201 SocketCAN Driver and Uspace Tool 


===========================================================================
Build Driver and Util
===========================================================================

Please install kernel development packages on your machine and simply
type 'make' command in root folder of this packge.

There should be two output files:
- src/emuccan.ko : kernel driver of emuc socket can
- src/emucd      : user-space tool for enable emuc socket can


===========================================================================
Usage and Example
===========================================================================

Here is a example to use emuccan socket CAN.

root@host# insmod emuccan.ko
root@host# emucd -s6 ttyACM0 can0 can1
root@host# ip link set can0 up
root@host# ip link set can1 up
root@host# cansend can0 5A1#11.22.33.44.55.66.77.88
root@host# candump can1 

The detail usage of 'cansend' and 'candump', please refer the open source
project 'can-utils' (https://github.com/linux-can/can-utils).

You can specified the CAN speed for two channels when execute 'emucd' 
daemon, type 'emucd -h' for help. 

root@host# emucd -s6 /dev/ttyACM0  (500 KBPS on both channel)
root@host# emucd -s34 /dev/ttyACM0 (50 KBPS on ch1, 125 KBPS on ch2)


===========================================================================
Trubleshooting
===========================================================================

If the can device did not show up after 'emucd' is executed. Please check
your system log to see if there is any error message reported by emuccan
or emucd.

root@host# tail -n 100 /var/log/syslog (Ubuntu)
root@host# tail -n 100 /var/log/message (CentOS)

Or, you can try to run 'emucd' in foreground to see if there is any error
reported.

root@host# emucd -F -s6 /dev/ttyACM0

There cannot be two EMUCD daemon running with same TTY device. You must 
kill the previous one before running a new one on same device

