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

More
03 Mar 2024 12:19 - 03 Mar 2024 12:32 #295024 by arda
Thanks for your suggestion tommylight. I will try this. I will keep looking into trying to make linuxcnc work from time to time but I need to get my actual works done too. I will be on this topic.
Last edit: 03 Mar 2024 12:32 by arda.

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

More
03 Mar 2024 12:31 #295027 by arda
sudo dmesg | grep parport and sudo cat /proc/ioports | grep parport outputs nothing.
sudo ls /dev/par* outputs "no such file or directory"

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

More
03 Mar 2024 12:58 #295030 by cornholio
A little more info
The kernel should load parport_serial for the following PCI ids
1C00:3250
1C00:3050
which should be the PCI ids for your card in either 2S1P or 1P mode.

Even if you can build the driver, there's another here github.com/WCHSoftGroup/ch35_38x_linux I'm doubtful if the drivers would load in your current setup. This driver seems to be able to use some of the more advanced features on the serial port side.

If you have a pc you can insert the card into you could boot linuxcnc live and see if the card is recognised.
The following user(s) said Thank You: tommylight

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

More
03 Mar 2024 13:09 #295034 by tommylight

If you have a pc you can insert the card into you could boot linuxcnc live and see if the card is recognised.

+1

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

More
05 Mar 2024 21:38 #295262 by arda

If you have a pc you can insert the card into you could boot linuxcnc live and see if the card is recognised.

Thank you for your suggestion. I was going to do that, but then the PC started having an issue as it wasn't booting. After numerous tries it somehow opened and I booted with live linuxcnc. I executed test commands for parallel port and thankfully I saw the card was registered as parport0, unsurprisingly with the same adress as in Windows. I was going to run parallel port tester program and check pin voltages but then PC started malfunctioning again and now it is not opening again.

I will have to investigate further about the issue with the PC indeed or just move to a newer one as that one was old and a bit problematic anyway, but with a working PC system should run fine from now on I suppose. Please correct me if I am wrong but I don't think a driver installation is needed in this case as it is recognised as parport.

So the issue with my original problematic setup was probably that M.2 to PCIe adapter isn't supported in my use case. It was an adventurous try but I'd like to move to linuxcnc anyway so I will stick to a working way. Thank you all for your help.
The following user(s) said Thank You: tommylight

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

More
15 Apr 2024 15:31 #298293 by reBrick
I have found a way to get my CH382L cards to work

I discovered this thread:
www.linux.org/threads/solved-unable-to-f...nc-as-parport.24355/

The solution for me was (paraphrasing from linked thread)

sudo <editor of choice> /etc/modprobe.d/alsa-base.conf

add these lines to the file with your serial address where it says io=0xb100 In my case and the responder to the thread it was the second address:

# LPC parport to PCI-E card
alias parport_low level parport_pc
options parport_pc io=0xb100 irq=18,auto

Then reboot

Now the parport is recognized by parport_pc
You will not see any difference in lspci -v output
The following user(s) said Thank You: tommylight, Mecanix

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

More
15 Apr 2024 15:48 #298297 by tommylight
Damn, that is .... strange, but it works ! :)
Alsa is used for sound/audio subsystem on Linux, so nice workaround, for sure.

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

More
16 Apr 2024 13:35 #298370 by cornholio
You can put basically any modprobe options in there for anything and it load the module with the parameters.
The file could be called "dumb_effing_card.conf" with the entries for the adapter and it'd work. It just makes life easier having the parameters in a file with descriptive name. If you have a few different modules that need custom params it just makes it easier 6 months down the road.

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

Time to create page: 0.514 seconds
Powered by Kunena Forum