Author Topic: ES/2 development  (Read 1430 times)

Rick C. Hodgin

  • Full Member
  • ***
  • Thank You
  • -Given: 13
  • -Receive: 2
  • Posts: 181
    • View Profile
    • Liberty Software Foundation
Re: ES/2 development
« Reply #15 on: November 07, 2017, 05:07:47 pm »
Use pscom.sys on ArcaOS

No matter what I've tried, I can't get it to work above 9600,8N1.  In cases where I use 115200, it returns 87 invalid parameter.  Not sure what to do there.
« Last Edit: November 07, 2017, 06:43:08 pm by Rick C. Hodgin »

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 88
  • Posts: 1146
    • View Profile
Re: ES/2 development
« Reply #16 on: November 08, 2017, 01:29:36 am »
According to the docs, you can use DosDeviIOCtrl() to set the serial port to 19200 for a standard serial port or up to 57600 bps for an enhanced serial port using ASYNC_BAUDRATE (41h) and then there is ASYNC_EXTBAUDRATE(43h) which says it is for higher then 19200.
See DosDevIOCTL() in control programing 1 (cp1.inf) and Generic IOCTL Commands in control programming 2 (cp2.inf)

Rick C. Hodgin

  • Full Member
  • ***
  • Thank You
  • -Given: 13
  • -Receive: 2
  • Posts: 181
    • View Profile
    • Liberty Software Foundation
Re: ES/2 development
« Reply #17 on: November 08, 2017, 03:33:26 am »
According to the docs, you can use DosDeviIOCtrl() to set the serial port to 19200 for a standard serial port or up to 57600 bps for an enhanced serial port using ASYNC_BAUDRATE (41h) and then there is ASYNC_EXTBAUDRATE(43h) which says it is for higher then 19200.
See DosDevIOCTL() in control programing 1 (cp1.inf) and Generic IOCTL Commands in control programming 2 (cp2.inf)

Maybe it's the parameter size.  115200 requires more than 16 bits, but 57600 and lower values fit in 16 bits.
« Last Edit: November 08, 2017, 03:43:03 am by Rick C. Hodgin »

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 88
  • Posts: 1146
    • View Profile
Re: ES/2 development
« Reply #18 on: November 08, 2017, 04:13:55 am »
For ASYNCEXTSETBAUDRATE, to quote the documentation.
Quote
This function sets the bit rate in doublewords to cover bit rates higher than 19200 bps.
and uses a DWORD

Rick C. Hodgin

  • Full Member
  • ***
  • Thank You
  • -Given: 13
  • -Receive: 2
  • Posts: 181
    • View Profile
    • Liberty Software Foundation
Re: ES/2 development
« Reply #19 on: November 08, 2017, 11:53:53 am »
For ASYNCEXTSETBAUDRATE, to quote the documentation.
Quote
This function sets the bit rate in doublewords to cover bit rates higher than 19200 bps.
and uses a DWORD

That's it.  I was using ASYNC_SETBAUDRATE.  It probably only uses a WORD.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 12
  • Posts: 318
    • View Profile
Re: ES/2 development
« Reply #20 on: November 08, 2017, 01:22:46 pm »
Quote
That's it.  I was using ASYNC_SETBAUDRATE.  It probably only uses a WORD.
Have you never wondered why I've posted two examples above?

Rick C. Hodgin

  • Full Member
  • ***
  • Thank You
  • -Given: 13
  • -Receive: 2
  • Posts: 181
    • View Profile
    • Liberty Software Foundation
Re: ES/2 development
« Reply #21 on: November 08, 2017, 04:35:01 pm »
Quote
That's it.  I was using ASYNC_SETBAUDRATE.  It probably only uses a WORD.
Have you never wondered why I've posted two examples above?

Yes.  Since both require a sizeof() parameter indicating how big the input parameter block is, I figured they would adapt to the input size based on that parameter.  My mistake.  ASYNC_SETBAUDRATE appears to only support 16-bit inputs regardless of the sizeof() parameter.