Jacques Bouchard was having trouble posting to this thread.
Here is his post.
Jon
Hello
Long ago I wrote a REXX program to read a counter connected to my PC via a
port com. Recently this program was no longer working.
I used the forum entry
https://sourceforge.net/p/oorexx/discussion/408478/thread/34d1c298/ to
develop my code.
In fact when reading the counter on COM20 I was receiving the previous
writeS to the counter. The list of writeS was extended after each run of
the failing program. This list was not reset by a boot of my PC. I deduced
that this was a file and I found the file.
In fact, the STREAM(name, 'C', 'OPEN BOTH') was opening a* file* instead of
a comport.
I dug a little further and found the reason :
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#namespaces
Here they say :
*For example, if you want to open the
system's serial communications port 1, you can use "COM1" in the call to
the CreateFile function. This works because COM1–COM9 are part of the
reserved names in the NT namespace, although using the "\\.\" prefix will
also work with these device names. By comparison, if you have a
100 port serial expansion board installed and want to open COM56, you
cannot open it using "COM56" because there is no predefined NT namespace
for COM56. You will need to open it using "\\.\COM56" because "\\.\" goes
directly to the device namespace without attempting to locate a predefined
alias.*
This is what I did and now my code work nice. I changed COM20 to \\.\COM20
I have not been able to add this comment to the forum entry. Can you please
do so for completeness on this topic.
Thanks and regards,
Jacques Bouchard
La difficulté du business n'exclut pas la bonne humeur
This email has been sent from a virus-free computer protected by Avast.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On 13 February 2016 at 04:32, J. Leslie Turriff <[email protected]> wrote:
> On Friday 12 February 2016 16:39:16 Erico Mendonca wrote:
> > That sounds odd. Device allocation on most distros is dynamic, and has
> been
> > for quite some time, including openSUSE. The device names are regulated
> by
> > LANANA, and follow the Unix major/minor notation. A full listing can be
> > found here: http://www.lanana.org/docs/device-list/devices-2.6+.txt
> >
> > In this case, /dev/ttyUSBx is a char device, major 188:
> >
> > # ls -ld /dev/ttyUSB0
> > crw-rw---- 1 root dialout 188, 0 Feb 12 20:29 /dev/ttyUSB0
> >
> >
> > The device ttyUSB0 starts with minor 0, ttyUSB1 is minor 1, and so on.
> > Whenever the kernel detects a new device being plugged in, the UDEV
> > subsystem allocates the next available major/minor pair for the device
> type
> > and creates the proper /dev file entry. So, it’s not really hardcoded.
> Plug
> > three different serial USB devices, and they may get either ttyUSB0,
> > ttyUSB1 or ttyUSB3 for each one depending on the order they’re connected.
> >
> > If what you want is a fixed device name, there are ways around it. You
> > could create an UDEV rule to make a symbolic link to a device, for
> example
> > /dev/modem pointing to /dev/ttyUSBx, no matter the order you plugged it.
> > Any of the device’s properties can be used to filter it, from the
> > vendor/product down to the serial number of the device. I can help you
> > write one if you wish.
>
> That was several years ago, when I was trying to connect my old
> RS-232 serial
> Wacom tablet to my laptop, which has no RS-232 port. I have since given
> away
> the tablet, so I no longer care to pursue the issue.
>
> --
> A Caution to Everybody
>
> Consider the Auk;
> Becoming extinct because he forgot how to fly, and could only walk.
> Consider man, who may well become extinct
> Because he forgot how to walk and learned how to fly before he
> thinked.
>
> -- Ogden Nash
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel