CH382L, M.2 to PCIe adapter on SBC not recognised by Linuxcnc

More
02 Mar 2024 23:35 - 02 Mar 2024 23:45 #294959 by Mecanix
The skipping BTF gen ain't an error. Just info. Can be ignored. 

On that raspi-on-latte weirdness and all that driver make random this & that, I recommend to rid all and get an official distro (www.debian.org/distrib/). Set-up yourself with a clean start (etc/sudoers, git build-essential, fav wallpaper...), then proceed to installing Linuxcnc:

$ wget http://buildbot2.highlab.com/buildbot-archive-key.gpg
$ sudo cp buildbot-archive-key.gpg /etc/apt/trusted.gpg.d
$ sudo rm buildbot-archive-key.gpg
$ sudo nano /etc/apt/sources.list

################
deb http://deb.debian.org/debian bookworm main non-free-firmware
deb-src http://deb.debian.org/debian bookworm main non-free-firmware

deb http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware

# Linuxcnc
#deb http://buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace scratch-uspace
deb http://buildbot2.highlab.com/debian/ bookworm 2.9-uspace
​​​​​​​########​​​​​​​########

$ sudo apt update
$ sudo apt install linuxcnc-uspace linuxcnc-uspace-dev linuxcnc-doc-en 
$ sudo reboot

Stick to that and stuff might start to work... fingers crossed. 
Last edit: 02 Mar 2024 23:45 by Mecanix.

Please Log in or Create an account to join the conversation.

More
02 Mar 2024 23:42 #294960 by tommylight


I was getting "Raspi-firmware: missing /boot/firmware, did you forget to mount it? error" then as suggested by someone "sudo dpkg --purge raspi-firmware" apparently fixed it.

Looks like he is already using the official ISO, or version 12.0/12.1 of Debian BookWorm as that issue was/is preset on them.

Please Log in or Create an account to join the conversation.

More
02 Mar 2024 23:52 #294962 by Mecanix
OP obvi picked it up from raspi.debian.net then... there's no raspi stuff in their 64b netinst, trust.

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 00:04 #294963 by cornholio

$ lsmod
How does your kernel drive it?



 


Those values relate to the PCI ids not port addresses.

In turn those values relate to the jumpering of pins 62 & 63 of the CH382L. To get PCI id, 3050 which is suported by a Linux driver, pins 62 & 63 need to be shorted to ground. (Bari has mentioned this in a couple of posts on the forum, a google search brings this info up as well)
So in short in very well could be a manufacturer hardware implementation. This type of board does seem to be an issue, some boards do work some don't.
One thing I would do is to insert a known working PCIe card of any type, LAN card might be best as Linux recogonises almost all, if this works you can rule out the first link in getting this to work.

Another idea is to get the PCI ids from the working windows installation, this will give an idea.
There's so many variables to this issue.

Another option and probably less hassle, is to install a second ethernet card and use a 7i92, a little more in $$, but you get more io, and latency is not such an issue.

Or if size and Parallel Port is a must a HP610 Plus thin client, has an inbuilt Parallel Port and an extra PCIe socket, might be work looking at. But maybe not something you'd want to do.

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 00:14 #294964 by Mecanix
Really should pick it up from the array of installed port(s). The great addy "0" in this case. If it doesn't it obviously ain't parport'io'ing today...

Great day to rid the raspi weirdness methink!

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 11:51 #295014 by arda
At first, I also thought "skipping btf" may not be relevant like you said and I moved on with the installation. Then I checked with commands and tests and there were still no sign of success. "skipping btf" was also mentioning "wch.ko couldn't be created" though.

I downloaded and installed LinuxCNC 2.9.2 Debian 12 Bookworm PREEMPT-RT ISO from linuxcnc.org. I have no idea where raspi stuff came from. So I'm wondering if the issue is related to the driver as I wasn't able to successfully pass that stage.

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 12:02 #295017 by cornholio
raspi stuff comes from a broken debian installer. Has nothing to do with drivers of any sort.

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 12:06 #295019 by tommylight

I downloaded and installed LinuxCNC 2.9.2 Debian 12 Bookworm PREEMPT-RT ISO from linuxcnc.org. I have no idea where raspi stuff came from.

It is included, still, despite hundreds of reports this has not been fixed.
So not anything you did.
If you want to exclude this as a cause, try this
forum.linuxcnc.org/9-installing-linuxcnc...int-debian-edition-6

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 12:06 #295020 by arda
Thanks for your suggestions. I'm not looking to invest in rather expensive stuff currently as I already have a working setup that is not using linuxcnc.

I may try the pin shorting method, but if driver installation is needed anyway and if I can't pass this step, pin shorting method won't be effective.

"One thing I would do is to insert a known working PCIe card of any type, LAN card might be best as Linux recogonises almost all, if this works you can rule out the first link in getting this to work."
That's right. I thought of that and will end up doing this if I will be able to install the driver first and see that it still isn't working.

If M.2 to PCIe adapter is an issue somehow, I can move to a board with PCIe slot but again, driver issue should be sorted out first.

Please Log in or Create an account to join the conversation.

More
03 Mar 2024 12:16 #295023 by cornholio
The funny thing is the pc_parport driver & others are loading. If you look at the github page for the driver it seems only related to the serial port portion, they even admit the standard serial port driver is ok.

What do the following show ?
sudo dmesg | grep parport

sudo ls /dev/par*

sudo cat /proc/ioports | grep parport

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum