What address is my serial port?

I ran

$ /sbin/devc-ser8250 -b 9600 -u 4 port 1c0 &

and it mounted 2 devices: /dev/ser4 and /dev/ser5.

There really are two serial ports in the system, one at 1C0 and one at 1D0, I know that much because my hardware engineers told me so.

What command can I use to identify the addresses of the two ports? I’d just like to get a warm fuzzy feeling that QNX found the ports where I think they’re supposed to be.

Also, why did QNX mount two ports, which supposedly were not contiguous, when I invoked the command only one time?

Thanks!

Serial port at 1C0 and 1D0, odd.

Command stty </dev/ser? should report info and IRQ. Note you should also specify IRQ.

I do not know why it detected 2 devices. Maybe it detected the default serial port as well (com1 and com2) and failed to initialised the one at 1c0,.

/me tries … dang, no port addresses.

I think I’ve found it … pidin syspage=hwinfo

If you carefully look for: (serial), (8250), (irq), (pad), (location) under which you should find a line of data that includes C0 01. You should also find a similar list for 1D0.

My guess is this data is maintained by the call to mmap_device_io() so will not always be filled out due to slack coders who don’t bother to use mmap_device_io().

Don’t know about 6.3, but with 6.2.1 mmap_device_io() was doing nothing else then returning the value it was passed ;-)

I typed
$pidin syspage=hwinfo

and I got

pidin: syspage=hwinfo invalid shorthand

I looked up pidin in the help file and there’s no mention of syspage or hwinfo that I can find. I’m using v6.2. Did I miss something?

Thanks!

Bill

pidin syspage is 6.3.0 only I’m afraid…

It is interesting to note that the comment about it not doing anything useful on x86 platforms in the earlier 6.2 docs is no longer present in the 6.3 docs.

I’m working with directly with nicomp on this project, so we can sorta be considered the same entity. I’ve done a little google searhing, and there’s three things I seem to find, the online QNX manual on their site, people selling hardware with instructions to configure it, and this post. So, we’ve got an additional question:

Does anyone know if there is a way to programatically check the serial port address?

Check for what, it’s presence or that it’s working?

We need to know what port address that QNX has assigned to the device in /dev: /dv/ser4, /dev/ser5, etc., (See original message, way up above). If I’m able to open() the device, then I assume it’s present and if I’m able to read( ) / write( ) it then I assume it’s working, but I don’t know how to determine where it’s mapped into the I/O space.

The syspage is present in 6.2, just not from pidin. There is a function named print_syspage() in the BSP stuff I believe. I have no idea if it’s accessible from user program or even 6.2.

The other way is via the SYSPAGE_ENTRY(hwinfo) macro. It looks like you’ll have to gleen it’s details from <sys/syspage.h> which in turn points to <hw/sysinfo.h>. I’m not making sense of it myself.

I found some info:
“The hwinfo section doesn’t have to describe all the hardware. For instance, the startup program doesn’t have to do PCI queries to discover what’s been plugged into any slots if it doesn’t want to. It’s up to you as the startup implementor to decide how full to make the hwinfo description. As a rule, if a component is hardwired on your board, consider putting it into hwinfo.”

And looking through my syspage I notice that none of the PCI devices are present, so I guess you serial ports aren’t going to be showing up in this list anyway. :frowning: