PDA

View Full Version : piCoreplayer 3.22 udev rules for LCD



droidbox
2018-02-24, 06:32
Hi.

After some times I have install the new piCoreplayer 3.22 with a Crystalfontz CFA635-USB LCD.

My problem now is that udev set no devices.

dmesg output:

[ 1871.236039] usb 1-1.3.1: new full-speed USB device number 12 using dwc_otg
[ 1871.400449] usb 1-1.3.1: New USB device found, idVendor=0403, idProduct=fc0d
[ 1871.400461] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1871.400469] usb 1-1.3.1: Product: Crystalfontz CFA635-USB LCD
[ 1871.400476] usb 1-1.3.1: Manufacturer: Crystalfontz
[ 1871.400484] usb 1-1.3.1: SerialNumber: CFU3MWQ6

My udev rules test:
tc@piCorePlayer:/etc/udev/rules.d$ cat 97-lcd.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="fc0d", SYMLINK+="lcd"
#SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="fc0d", SYMLINK+="lcd", MODE="0644"
#SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="fc0d", NAME="usb/%k", SYMLINK+="lcd", MODE="0644"
Can anyone help me to setup the udev rules.

thx droidbox

paul-
2018-02-24, 09:25
likely because there is no driver for that included.

droidbox
2018-02-24, 10:00
Hi Paul.

Thx for the info. Is it possible for me to integrate the ftdi driver? Where can I get the kernel sources of PCP?

Regards droidbox

paul-
2018-02-24, 12:37
https://sourceforge.net/projects/picoreplayer/files/repo/8.x/armv7/releases/RPi/src/kernel/

If you are not using the armv7 board, the armv6 files are there too.

You will find all built driver is the package <kernel version>_modules.tar.xz

looks like the ftdi-elan.ko driver is in there.

droidbox
2018-02-24, 15:11
Hi Paul.

Thx for the Info, but the first shot doesn't work:
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb$ sudo mkdir misc
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb$ cd misc/
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/misc$ sudo cp /tmp/ftdi-elan.ko .

tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/misc$ sudo depmod -a

tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/misc$ sudo modprobe ftdi-elan
modprobe: can't load module ftdi-elan (kernel/drivers/usb/misc/ftdi-elan.ko): invalid module format
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/misc$ ls -la
total 44
drwxr-xr-x 2 root root 60 Feb 24 23:06 ./
drwxr-xr-x 5 root root 100 Feb 24 23:05 ../
-rw-r--r-- 1 root root 43932 Feb 24 23:06 ftdi-elan.ko

$ uname -a
Linux PHILETTA 4.9.50-pcpAudioCore_v7 #1 SMP PREEMPT Sat Sep 16 15:47:24 EDT 2017 armv7l GNU/Linux

Have you any idea?

Regards droidbox

paul-
2018-02-24, 15:18
did you download the correct module pack for your kernel?

droidbox
2018-02-24, 15:32
did you download the correct module pack for your kernel?

Argghhrr, you are right. I need the Audiocore kernel.

The modul load:

[ 1013.900776] ftdi_elan: disagrees about version of symbol module_layout
[ 1088.342715] ftdi_elan: disagrees about version of symbol module_layout
[ 2143.404221] ftdi_elan: driver ftdi-elan
[ 2143.404387] usbcore: registered new interface driver ftdi-elan
[ 2356.565420] usb 1-1.3.1: USB disconnect, device number 5
[ 2359.816847] usb 1-1.3.1: new full-speed USB device number 6 using dwc_otg
[ 2359.933243] usb 1-1.3.1: New USB device found, idVendor=0403, idProduct=fc0d
[ 2359.933260] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2359.933270] usb 1-1.3.1: Product: Crystalfontz CFA635-USB LCD
[ 2359.933280] usb 1-1.3.1: Manufacturer: Crystalfontz
[ 2359.933289] usb 1-1.3.1: SerialNumber: CFU3MWQ6
But I get no device.

Regards droidbox

paul-
2018-02-24, 15:45
Still doesn't look like you got the correct file. Make sure your uname matches the filename of the package.

Otherwise, I don't know anything about the device.

droidbox
2018-02-24, 16:12
https://sourceforge.net/projects/picoreplayer/files/repo/8.x/armv7/releases/RPi/src/kernel/

If you are not using the armv7 board, the armv6 files are there too.

You will find all built driver is the package <kernel version>_modules.tar.xz

looks like the ftdi-elan.ko driver is in there.

Hey Paul.

Okay, the right driver is ftdi_sio.ko https://www.crystalfontz.com/blog/running-crystalfontz-usb-lcd-modules-under-linux/ but with the driver
in our packages it didn't run.

tc@PHILETTA:/etc/udev/rules.d$ cd /lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb$ sudo mkdir serial
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb$ cd serial/
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/serial$ sudo cp /tmp/ftdi_sio.ko .

tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/serial$ sudo depmod -a

tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/serial$ sudo modprobe ftdi_sio
modprobe: can't load module ftdi_sio (kernel/drivers/usb/serial/ftdi_sio.ko): unknown symbol in module, or unknown parameter

Pity for me.
Regards droidbox

droidbox
2018-02-24, 16:26
Okay, I find the error:
[ 208.904849] usb 1-1.3.1: new full-speed USB device number 6 using dwc_otg
[ 209.021359] usb 1-1.3.1: New USB device found, idVendor=0403, idProduct=fc0d
[ 209.021375] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 209.021385] usb 1-1.3.1: Product: Crystalfontz CFA635-USB LCD
[ 209.021395] usb 1-1.3.1: Manufacturer: Crystalfontz
[ 209.021404] usb 1-1.3.1: SerialNumber: CFU3MWQ6
[ 209.060965] usbcore: registered new interface driver usbserial
[ 209.061093] usbcore: registered new interface driver usbserial_generic
[ 209.061182] usbserial: USB Serial support registered for generic
[ 209.066632] usbcore: registered new interface driver ftdi_sio
[ 209.066749] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 209.067266] ftdi_sio 1-1.3.1:1.0: FTDI USB Serial Device converter detected
[ 209.067596] usb 1-1.3.1: Detected FT232RL
[ 209.068620] usb 1-1.3.1: FTDI USB Serial Device converter now attached to ttyUSB0

The display need two driver.
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/serial$ lsmod
Module Size Used by Tainted: G
ftdi_sio 32963 0
usbserial 29637 1 ftdi_sio
But now, how can i make the PCP reboot save with the new drivers?
tc@PHILETTA:/lib/modules/4.9.50-pcpAudioCore_v7/kernel/drivers/usb/serial$ ls -la
total 168
drwxr-xr-x 2 root root 80 Feb 25 00:21 ./
drwxr-xr-x 5 root root 100 Feb 25 00:21 ../
-rw-r--r-- 1 root root 112440 Feb 25 00:21 ftdi_sio.ko
-rw-r--r-- 1 root root 53344 Feb 25 00:21 usbserial.ko

Regards Markus

paul-
2018-02-24, 17:37
Make an extension

http://wiki.tinycorelinux.net/wiki:creating_extensions