[time-nuts] Linux code for Prologix GPIB/USB

Hal Murray hmurray at megapathdsl.net
Sun Feb 25 16:17:16 EST 2007


A followup to my request from a month ago...

> Does anybody have some simple starter code I can try?  My straw man
> would be  to read the version string or address switches.

> I'm usually good at this sort of code.  I'm probably overlooking
> something  simple.  (Or it will be simple after I know what it is.) 

It's working fine now, at least for the simple things I'm doing.

A couple of notes in case somebody finds this thread.

The Prologix documentation says it goes into blinking-LED mode if you get the 
baud rate wrong.  Baud rate doesn't make much sense on a USB connection, but 
mine blinks if I set it wrong.  When it's in that mode, it won't talk to 
anything.  You have to power cycle it.

I found it also went into blinking-LED mode if I sent it another command too 
quickly and didn't have flow control working.  It works fine without flow 
control as long as you pause before sending it another command.  At least for 
what I'm doing.

I'm using a 2.6.19 kernel.  The flow control code for various USB serial 
modules has been split out to a shared module - SERIAL_GENERIC.  That wasn't 
getting loaded on my setup (FC-6).  I don't know if that's a quirk in FC or 
something I broke or ...  I fixed it by making a new kernel with that module 
included as part of the kernel rather than as a module.  There is probably 
some way with modules magic to get it loaded first.

If you want to debug blink mode, I suggest a printf before each write to the 
device, and a long pause after each write so you can see if that's where it 
starts blinking.

I put a copy of the sort of code I was looking for as probe.c on
  http://www.megapathdsl.net/~hmurray/hacks/


-- 
These are my opinions, not necessarily my employer's.  I hate spam.






More information about the time-nuts mailing list