Recent

Author Topic: LazSynaSer on OSX 10.13 (High Sierra)  (Read 630 times)

JimKueneman

  • Full Member
  • ***
  • Posts: 220
LazSynaSer on OSX 10.13 (High Sierra)
« on: November 21, 2022, 08:43:39 pm »
Transitioning over from Synapse to Indy and needed a ComPort component so I grabbed LazSynaSer.  I can not get it to connect to anything with the changes that were made in the Purge method.  If I change it back to what SynaSer did it works.  During the Purge call I get "This is not a Typewriter" error code.

I pulled the version of LazSynaSer from the GitHub repository a few days ago and using Lazarus 2.2.4.

Code: Pascal  [Select][+][-]
  1. {$IFDEF DARWIN}   // JDK
  2. function real_tcflush(fd,qsel: cint): cint; cdecl; external name 'tcflush';
  3.  
  4. function TCFlush(fd,qsel:cint):cint;  {$ifdef VER2_0}inline;{$endif}
  5. begin
  6.   TCFlush:=real_tcflush(fd,qsel);
  7. end;
  8. {$ENDIF}
  9.  
  10. {$IFNDEF MSWINDOWS}
  11. procedure TBlockSerial.Purge;
  12. begin
  13.   {$IFNDEF FPC}
  14.   SerialCheck(ioctl(FHandle, TCFLSH, TCIOFLUSH));
  15.   {$ELSE}
  16.     {$IFDEF DARWIN}
  17.     SerialCheck(TCFlush(FHandle, TCIOFLUSH));                               // JDK
  18.   //  SerialCheck(fpioctl(FHandle, TCIOflush, Pointer(PtrInt(TCIOFLUSH))));
  19.     {$ELSE}
  20.     SerialCheck(fpioctl(FHandle, TCFLSH, Pointer(PtrInt(TCIOFLUSH))));
  21.     {$ENDIF}
  22.   {$ENDIF}
  23.   FBuffer := '';
  24.   ExceptCheck;
  25. end;
  26. {$ELSE}
  27.  
  28. Thoughts?
  29.  
  30. Jim
  31.  

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: LazSynaSer on OSX 10.13 (High Sierra)
« Reply #1 on: November 22, 2022, 12:37:19 am »
Hello,
last versions of synaser.pas and lazsynaser.pas use the same code for purge (except for freeBSD that lazserial doen't manage)
I have no problem on MAC OS catalina 10.15 using two USB serial ports.
Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JimKueneman

  • Full Member
  • ***
  • Posts: 220
Re: LazSynaSer on OSX 10.13 (High Sierra)
« Reply #2 on: November 22, 2022, 04:55:31 pm »
Ok thanks.  I would get that error on anything I tried to open including the Bluetooth cu and tty versions.  Do you know the reason it was changed?  Is there something concerning about the old way?

Jim

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: LazSynaSer on OSX 10.13 (High Sierra)
« Reply #3 on: November 22, 2022, 05:08:36 pm »
Have a look  :o   here  ( no comment   :( )
« Last Edit: November 22, 2022, 05:10:35 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

 

TinyPortal © 2005-2018