lin-bus / linux-lin

Linux kernel LIN bus support implemented as TTY line discipline for generic UART conrollers, documentation https://github.com/lin-bus/linux-lin/wiki, based on https://github.com/lin-bus/linux-lin/wiki/sllin-rtlws14-paper.pdf, more CAN related projects http://canbus.pages.fel.cvut.cz/
https://github.com/lin-bus/linux-lin/wiki
38 stars 26 forks source link

Android fail #1

Open fatalfeel opened 6 years ago

fatalfeel commented 6 years ago
  1. sllin built-in module and boot message [ 1.527834] sllin: serial line LIN interface driver [ 1.528527] sllin: 10 dynamic interface channels. [ 1.529148] sllin: Break is generated manually with tiny sleep.

  2. root@matrix_io:/ # sllin_attach -w /dev/ttymxc2 [ 539.350802] sllin: sllin_open() invoked [ 539.351382] sllin: Configured as MASTER [ 539.351887] sllin: Baudrate set to 19200 attached tty /dev/ttymxc2 to netdevice sllin0 Press any key to detach /dev/ttymxc2 ...

  3. root@matrix_io:/ # ip link set sllin0 up Cannot find device "sllin0" --->fail here

fatalfeel commented 6 years ago

success use and need mark some lines and let it compile pass https://github.com/karelzak/util-linux/blob/master/sys-utils/ldattach.c

in Android.mk include $(CLEAR_VARS)

LOCAL_SRC_FILES := ldattach.c LOCAL_MODULE := ldattach LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/ LOCAL_CFLAGS := $(PRIVATE_LOCAL_CFLAGS) -DHAVE_USLEEP

include $(BUILD_EXECUTABLE)

fatalfeel commented 6 years ago

http://www.mediafire.com/file/q8doq6bznvt0zt7/canutils.tar.gz put it in myandroid/external to build