Kirk, I do have the addf parport commands in there, but I'm adding
them all to the base-thread.  Is this correct?

I'm using a slightly modified .hal as generated by the wizard.  The
only mods I did were to some signal directions.

so:
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread

addf parport.1.read base-thread
addf parport.1.write base-thread

Andy, I followed your instructions and after a few false starts I did
get everything accepted (no commas in the loadrt hal_parport string,
weird):

halcmd: loadrt hal_parport cfg="0x378 0xa400 0xa9800"

I got the following output:

[  123.048865] config string '0,1,2'
[  123.051023] PARPORT: ERROR: request_region(0xffff) failed
[  141.272757] config string '0'
[  141.274912] PARPORT: ERROR: linux parport 0 not found
[  251.300431] config string '0x378, 0xa400, 0x9800'
[  251.302588] PARPORT: ERROR: request_region(0xffff) failed
[  280.524631] config string '0x378'
[  369.520401] config string '0xa400'
[  502.900583] config string '0x9800'
[  520.164495] config string '0x378,0xa400'
[  520.166666] PARPORT: ERROR: request_region(0xffff) failed
[  541.600434] config string '0x378,0x9800'
[  541.602619] PARPORT: ERROR: request_region(0xffff) failed
[  759.040708] config string '0x378, 0x9800'
[  759.042869] PARPORT: ERROR: request_region(0xffff) failed
[  767.392528] config string '0x378, 0xa400'
[  767.394679] PARPORT: ERROR: request_region(0xffff) failed
[ 1118.600630] config string '0'
[ 1118.602793] PARPORT: ERROR: linux parport 0 not found
[ 1190.564454] config string '0xa000'
[ 1210.965000] config string '0x378, 0xa000'
[ 1210.967136] PARPORT: ERROR: request_region(0xffff) failed
[ 1215.168714] config string '0x378 0xa000'
[ 1402.156566] config string '0x378 0xa400 0xa9800'

If I did put the commas in the string I got a Device or Resource Busy error

halcmd: loadrt hal_parport cfg="0x378,0xa400"
insmod: error inserting
'/usr/realtime-2.6.32-122-rtai/modules/emc2/hal_parport.ko': -1 Device
or resource busy
<stdin>:17: exit value: 1
<stdin>:17: insmod failed, returned -1

Thank you!  You guys are running significant beer credits :-)

DougM


On Thu, Aug 18, 2011 at 4:09 AM, andy pugh <[email protected]> wrote:
> On 18 August 2011 03:48, doug metzler <[email protected]> wrote:
>
>> When I first started this adventure I was following the instructions here:
>>
>> http://ubuntuforums.org/showthread.php?t=1233589
>>
>> and I issued these commands
>> $ sudo modprobe parport_pc io=0xa400
>> $ sudo modprobe lp
>>
>> $ sudo /etc/init.d/cups restart
>
>
> That all sounds a bit counterproductive, I am afraid
>
> I have found that it can be helpful to load the bare minimum when
> investigating what works.
>
> I would open two terminal windows (which are indicated below by T1 and T2)
>
> T1> sudo dmesg -c
> T1> {password}
> That clears the dmesg buffer so that you can see through the cruft.
> T2> halrun
>
> T2> loadrt hal_parport cfg="0,1,2"
> T2> show funct
> Hopefully you should see 6 functions parport.0.read, parport.1.read,
> parport.2.read, parport.0.write...
> If not: T1> dmesg and read what it says.
>
> Assuming it has all worked so far:
> T2> loadrt threads
> T2> addf parport.0.read thread1
> T2> addf parport.1.read thread1
> T2> addf parport.2.read thread1
> T2> addf parport.0.write thread1
> T2> addf parport.1.write thread1
> T2> addf parport.2.write thread1
> T2> start
> (that last bit is rather important)
> T1> dmesg
>
> Now, in theory, you have your three auto-located parports linked to
> HAL and running in a realtime thread. So, to see if the pins are
> changing as hoped with the pendant attached:
>
> T1> loadusr halmeter
>
> This is the long-winded, manual way to set up HAL, but you do get to
> see at what point it is failing.
>
> The example above attempts to use parport_pc to locate the parports,
> if that isn't loaded or isn't working, you can try the explicit
> addresses in the loadrt hal_parport line instead of the indexes.
>
> --
> atp
> "Torque wrenches are for the obedience of fools and the guidance of wise men"
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to