Search found 82 matches: setcommstate

Return to advanced search

Does FiveLinux support RS232 Comm Functions??

Hello, I have been able to compile most of the sample linux prg's OK and have written a few of my own that compile and run OK. I have a need to do some serial communications (RS232). These are the linking errors I get when trying to compile. vend@v1:~/fivelinux/samples$ ./build.sh qibixx compiling.....
by bradmaudlin
Tue Nov 26, 2019 2:27 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Does FiveLinux support RS232 Comm Functions??
Replies: 1
Views: 743

Does FiveLinux support Serial Communications (RS232)

Hello, I have been able to compile most of the sample linux prg's OK and have written a few of my own that compile and run OK. I have a need to do some serial communications (RS232). These are the linking errors I get when trying to compile. vend@v1:~/fivelinux/samples$ ./build.sh qibixx compiling.....
by bradmaudlin
Mon Nov 25, 2019 10:23 pm
 
Forum: FiveLinux / FiveDroid (Android)
Topic: Does FiveLinux support Serial Communications (RS232)
Replies: 1
Views: 827

Read Com port

... 1024, 128 ) if ! BuildCommDcb( "COM1:9600,n,8,1", @cDcb ) MsgStop( "Error BUILD!" ) return .f. endif #ifdef __CLIPPER__ if ! SetCommState( cDcb ) #else if ! SetCommState( nComm, cDcb ) #endif MsgStop( "Error SETCOMM!" ) return .f. endif return nComm function BytesAtPort( ...
by Jack
Wed Sep 26, 2018 9:45 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Read Com port
Replies: 13
Views: 2605

Puerto to 485 with converter a USB ,Solucionado

... , @cDcb ) nError := GetCommError( nComm ) MsgInfo( "Error al Configurar puerto: " + Str( nError ) ) Return 0 EndIf If ! SetCommState( nComm, cDcb ) nError := GetCommError( nComm ) MsgInfo( "Error al setear Puerto: " + Str( nError ) ) Return 0 EndIf Return nComm ...
by Busmatic_wpb
Thu Feb 08, 2018 11:36 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Ports to 485 with converter USB, please help.
Replies: 7
Views: 1415

Lectura de puertos seriales Solucionado.. gracias

... , @cDcb ) nError := GetCommError( nComm ) MsgInfo( "Error al Configurar puerto: " + Str( nError ) ) Return 0 EndIf If ! SetCommState( nComm, cDcb ) nError := GetCommError( nComm ) MsgInfo( "Error al setear Puerto: " + Str( nError ) ) Return 0 EndIf Return nComm ...
by Busmatic_wpb
Tue Feb 06, 2018 11:02 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Lectura de puertos seriales..
Replies: 9
Views: 2240

Ports to 485 with converter USB, please help.

... GetCommError( IdPort) MsgInfo( "Error al Configurar: " + Str( nError ) ) RETURN 0 ELSE MsgRun("Puerto Configurado") ENDIF IF ! SetCommState( IdPort, cDcb ) nError = GetCommError( IdPort) MsgInfo( "Error al setear: " + Str( nError ) ) RETURN 0 ELSE MsgRun("Puerto ...
by Busmatic_wpb
Mon Feb 05, 2018 11:33 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Ports to 485 with converter USB, please help.
Replies: 7
Views: 1415

Lectura de puertos seriales..

... 4024, 1024 ) if ! BuildCommDcb( "COM2:9600,N,8,1", @cDcb ) MsgStop( "Error BUILD!" ) return .f. endif #ifdef __CLIPPER__ if ! SetCommState( cDcb ) #else if ! SetCommState( nComm, cDcb ) #endif MsgStop( "Error SETCOMM!" ) return .f. endif /* "02 30 30 30 31 31 ...
by Busmatic_wpb
Tue Jan 30, 2018 11:36 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Lectura de puertos seriales..
Replies: 9
Views: 2240

Re: Consulta sobre OpenComm()

... support a communications port number, the OpenComm function will fail. The communications device is initialized to a default configuration. The SetCommState function should be used to initialize the device to alternate values. The receiving and transmission queues are used by interrupt-driven ...
by carlos vargas
Thu Jun 15, 2017 10:57 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Consulta sobre OpenComm()
Replies: 5
Views: 1070

Re: WriteComm()

... an empty USB port, correct? No, you are just trying to communicate with a non-existent serial port (COM4). Unfortunately, this doesn't explain why SetCommState() is returning .T. ... :-( EMG
by Enrico Maria Giordano
Mon Feb 24, 2014 9:18 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: WriteComm()
Replies: 36
Views: 7697

Re: WriteComm()

... serial port is listed as COM1. Do I assume that the USB ports are COM2 and COM3? OK, I tried the test program on COM2 and COM3 it gives the "SetCommState Error" on both attempts. Note that I have a wireless mouse adapter on one of the USB ports. The other USB port is empty. So, I am ...
by James Bott
Sun Feb 23, 2014 9:54 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: WriteComm()
Replies: 36
Views: 7697

Re: WriteComm()

Jeff,

Sorry, I meant:

"Your problem starts back to SetCommState(). It fails, so WriteComm() freezes."

EMG
by Enrico Maria Giordano
Sun Feb 23, 2014 9:28 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: WriteComm()
Replies: 36
Views: 7697

Re: WriteComm()

Hi James,

Can you please recompile with COM4.

With your version, I get the SetCommState error since I have no COM1

I have tried my compiled version on other PCs with the same result.
by Jeff Barnes
Sat Feb 22, 2014 12:17 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: WriteComm()
Replies: 36
Views: 7697

Re: WriteComm()

Jeff,

Enrico's code works for me (XP SP3, FWH 13.04/xHarbour). There is no SetCommState error.

I see you are using an older version of FWH. I am emailing you a copy of my test EXE so you can test it on your hardware.

Do you also have another PC you can test on?

James
by James Bott
Fri Feb 21, 2014 11:59 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: WriteComm()
Replies: 36
Views: 7697

Re: WriteComm()

Enrico,

Do you get a SetCommState error when you run the test?

If so, that might explain why yours works.
I do not get a SetCommState error.

I took your last test, compiled it and I get the "Just before writing to com port" message then nothing. It just hangs.
by Jeff Barnes
Fri Feb 21, 2014 11:39 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: WriteComm()
Replies: 36
Views: 7697

bCommNotify Problem

... SEQUENCE nCom := OPENCOMM( "COM1", 16384, 16384 ) IF nCom < 0 BREAK ENDIF BUILDCOMMDCB( "COM1:9600,N,8,1", @cDcb ) IF !SETCOMMSTATE( nCom, cDcb ) BREAK ENDIF EnableCommNotification( nCom, oWnd:hWnd, 1, -1 ) oWnd:bCommNotify = { | nCom | CheckSerial()} RECOVER nCom = ...
by MGA
Tue Jan 28, 2014 12:42 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: bCommNotify Problem
Replies: 5
Views: 946
Next

Return to advanced search