Can't find parallel port

595 views
Skip to first unread message

sliptonic

unread,
Aug 25, 2014, 3:28:15 PM8/25/14
to machi...@googlegroups.com
I've started migrating my laser configuration over to machinekit.  I've got a fresh install of Debian wheezy and installed machinekit from packages for RT-PREEMPT.  All that seemed to go fine.  Linuxcnc will launch sim configurations fine.  The laser is connected to a dual parallel port card from LSI.  It shows up on the PCI bus like this:

04:05.0 Communication controller: NetMos Technology PCI 9815 Multi-I/O Controller (rev 01)
Subsystem: LSI Logic / Symbios Logic 2P0S (2 port parallel adaptor)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 11
Region 0: I/O ports at d050 [size=8]
Region 1: I/O ports at d040 [size=8]
Region 2: I/O ports at d030 [size=8]
Region 3: I/O ports at d020 [size=8]
Region 4: I/O ports at d010 [size=8]
Region 5: I/O ports at d000 [size=16]

I've tried every combination of addresses I can think of but regardless of what I use for port number in the cfg line, it doesn't find the parallel port:

halcmd: loadrt hal_parport cfg="0x378 out 0xd050 in"
<stdin>:1: /usr/libexec/linuxcnc/rtapi_app_rt-preempt exited without becoming ready
<stdin>:1: insmod failed, returned -1

I know this should be an easy one but I'm stumped.  What the heck am I missing?

Michael Haberler

unread,
Aug 25, 2014, 3:47:47 PM8/25/14
to Collette Brad, machi...@googlegroups.com
any lp or ppdev modules loaded? see http://wiki.linuxcnc.org/cgi-bin/wiki.pl?NetMos

see 26. here: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?EMC_Ubuntu91

-m

>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.

Brad Collette

unread,
Aug 25, 2014, 7:01:05 PM8/25/14
to Michael Haberler, machi...@googlegroups.com

any lp or ppdev modules loaded? see http://wiki.linuxcnc.org/cgi-bin/wiki.pl?NetMos


Nope.   parport_pc and parport load automatically but I've blacklisted them.



--
Brad Collette
573-427-7132


chrisin...@gmail.com

unread,
Aug 26, 2014, 12:19:45 AM8/26/14
to machi...@googlegroups.com, mai...@mah.priv.at

try entering 0 or 1 etc as an address.
Linux enumerates the ports and if all goes well linuxcnc will use those port numbers.
0 is the first port found etc.
I haven't tried it on a PCI card adaptor but it should work.

Chris M

Schooner

unread,
Aug 26, 2014, 3:49:16 AM8/26/14
to machi...@googlegroups.com
Hi

I had a similar unexpected problem using Wheezy recently when I switched
between a 5i25 based config to a parport based one

The load failed with the attempt to load hal_parport.
I was only using the built in 0x378 port

After some investigation I found that parport was not loaded.
I did a modprobe lp, modprobe ppdev and modprobe parport_pc, and that
pulled in parport
rmmod parport_pc, ppdev and lp, left parport loaded and the config worked

So very similar to the link that Michael posted, but slightly different
reasons

It is only really parport_pc and ppdev you need blacklist, you don't
want to blacklist parport.
As far as I am aware, the parport driver provides the low level
interface which all other drivers including
hal_parport use to claim the port

I suspect that udev does not even create a port in /dev unless parport
is loaded

Regards the port numbers, MosChip usually lists them in register, port,
register, port order, so the ports are usually the lower address of each
pair ( 0xd040 and 0xd020 )
However there is normally 0x400 between port and register.
I have seen a print of a card that only had 0x010 between them before,
but cannot remember if we got it working.

regards
> 573-427-7132 <tel:573-427-7132>
>
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io
> github: https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google
> Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to machinekit+...@googlegroups.com
> <mailto:machinekit+...@googlegroups.com>.

sliptonic

unread,
Aug 27, 2014, 9:38:13 AM8/27/14
to machi...@googlegroups.com

Just to update for reference.  I'm beginning to suspect a kernel problem.  Similar symptoms reported by others in Wheezy:

Running the xenomai kernel things are slightly different but still no joy.
brad@clyde:~$ uname -r
3.8-1-xenomai.x86-686-pae

brad@clyde:~$ dmesg |grep par
[    5.251044] PCI parallel port detected: 9710:9815, I/O at 0xd050(0xd040), IRQ 20
[    5.251044] parport0: PC-style at 0xd050 (0xd040), irq 20 [PCSPP,TRISTATE]
[    5.344023] PCI parallel port detected: 9710:9815, I/O at 0xd030(0xd020), IRQ 20
[    5.344060] parport1: PC-style at 0xd030 (0xd020), irq 20 [PCSPP,TRISTATE]

but /dev/parport0 doesn't exist and the linuxcnc log shows:

Aug 27 08:26:20 clyde msgd:0: hal_lib:4145:rt Did not find parallel port with base address 0xD050
Aug 27 08:26:20 clyde msgd:0: rtapi_app:4145:user rtapi_app_main(hal_parport): -19 No such device
Aug 27 08:26:28 clyde msgd:0: hal_lib:4145:rt config string '0xd040'
Aug 27 08:26:28 clyde msgd:0: hal_lib:4145:rt Did not find parallel port with base address 0xD040
Aug 27 08:26:28 clyde msgd:0: rtapi_app:4145:user rtapi_app_main(hal_parport): -19 No such device
Aug 27 08:26:32 clyde msgd:0: msgd:0: rtapi_app exit detected - shutting down
Aug 27 08:26:33 clyde msgd:0: normal shutdown - global segment detached

Michael Haberler

unread,
Aug 27, 2014, 10:13:15 AM8/27/14
to Collette Brad, machi...@googlegroups.com

Am 27.08.2014 um 15:38 schrieb sliptonic <shopint...@gmail.com>:

>
> Just to update for reference. I'm beginning to suspect a kernel problem.

I think it could be a hardware problem. Try to get a non-NetMos parport - NetMos has a history of broken parports. I have a few unusable Netmos cards here myself.

-m
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.

sliptonic

unread,
Aug 27, 2014, 5:21:23 PM8/27/14
to machi...@googlegroups.com, shopint...@gmail.com
Nope. not hardware.  I can boot into my old Mint Maya (Ubuntu Precise) version and the hardware is detected normally.  That's running kernel 3.5.7.xenomai-2.6.2.1 from deb.machinekit.net

3.8-1.*.x86-686-pae from the new repository do not work.

On a probably unrelated note, none of the machinekit kernels will work with my wireless usb dongles (RTL8192CU)  The drivers install and wireless can see the access point but it will never connect.  I've duplicated this on two different computers with two different dongles.  The debian rt-preempt kernel (3.2.0-4-rt-686-pae
) works fine though.

Michael Haberler

unread,
Aug 27, 2014, 6:20:44 PM8/27/14
to Collette Brad, machi...@googlegroups.com

Am 27.08.2014 um 23:21 schrieb sliptonic <shopint...@gmail.com>:

> Nope. not hardware. I can boot into my old Mint Maya (Ubuntu Precise) version and the hardware is detected normally. That's running kernel 3.5.7.xenomai-2.6.2.1 from deb.machinekit.net
>
> 3.8-1.*.x86-686-pae from the new repository do not work.

hm, I can try the 3.8 xenomai kernel on an D525 atom with the built-in parport, but might be next week

I understand the 3.8 x86 rtai and xenomai kernels still have rough edges; the 3.5.7 xenomai kernel is well tested.

> On a probably unrelated note, none of the machinekit kernels will work with my wireless usb dongles (RTL8192CU) The drivers install and wireless can see the access point but it will never connect. I've duplicated this on two different computers with two different dongles. The debian rt-preempt kernel (3.2.0-4-rt-686-pae
> ) works fine though.

if you're not pushing limits with the base thread and soft-stepping rates, rt-preempt is fine.

overall the most rational solution to a stepper config on x86/amd64 IMO is a Mesanet 5i2x card with fpga stepgens and using stock rt-preempt. 100 bucks, no parport/kernel vodoo required, lots of time saved.

wireless on linux is still a PITA. Realtek adds another dimension of pain. See for example the whole ugliness for BB's here: https://github.com/mhaberler/asciidoc-sandbox/wiki/Beaglebone-Wifi-notes.

where I want to eventually arrive is a dumb, headless HAL/RT appliance driven over IP and everything else on more suitable platforms - whatever their OS/architecture. We're getting there.. piecemeal. Sorry for the inconveniences along the caravan path.

- Michael



> On Wednesday, August 27, 2014 9:13:15 AM UTC-5, Michael Haberler wrote:
>
>
>
> I think it could be a hardware problem. Try to get a non-NetMos parport - NetMos has a history of broken parports. I have a few unusable Netmos cards here myself.
>
>
>

Michael Haberler

unread,
Aug 28, 2014, 12:11:49 PM8/28/14
to Collette Brad, Machinekit Mailing List

Am 28.08.2014 um 00:20 schrieb Michael Haberler <mai...@mah.priv.at>:

>
> Am 27.08.2014 um 23:21 schrieb sliptonic <shopint...@gmail.com>:
>
>> Nope. not hardware. I can boot into my old Mint Maya (Ubuntu Precise) version and the hardware is detected normally. That's running kernel 3.5.7.xenomai-2.6.2.1 from deb.machinekit.net
>>
>> 3.8-1.*.x86-686-pae from the new repository do not work.
>
> hm, I can try the 3.8 xenomai kernel on an D525 atom with the built-in parport, but might be next week

I did, works fine with the hal_parport driver.

Had to modprobe ppdev so /dev/parport0 appears.

$ uname -a
Linux atom 3.8-1mk-xenomai-686-pae #1 SMP Debian 3.8.13-3 i686 GNU/Linux

- Michael

sliptonic

unread,
Aug 28, 2014, 2:45:11 PM8/28/14
to machi...@googlegroups.com, shopint...@gmail.com
Thanks Michael.
I'll play with it a bit more tonight but I think you're right about moving to a 5i25.  I have that config on my milling machine and it works great.  I've been driving my laser cutter from the parallel port and although it has worked, it's less than ideal.  5i25 ordered and on the way.

No need to apologize for the inconveniences.  The future is bright even if the road is bumpy.  :-)
Reply all
Reply to author
Forward
0 new messages