Hi my friends,
Is somebody who still are using INIT_PORT for SMS sending trough usb modem?
I used in my application 5 years without problems til now, and now cannot open port.
The modem is okay, is located on Com9, with his own application send and recieve normally the sms.
Can be a firewall problem or something specific win 10?
Zoli B.
INIT_PORT problem in Win 10
Moderator: Rathinagiri
- zolysoftsolutions
- Posts: 139
- Joined: Wed Feb 29, 2012 3:33 am
- Location: Gyulakuta, Erdélyország
- Contact:
INIT_PORT problem in Win 10
_______________________________
Open eyes for you!
Open eyes for you!
Re: INIT_PORT problem in Win 10
For years I have successfully done communication with fiscal devices connected via USB and COM - no problems with Win 10. Instead of Clipper Tools commands I use the serial commincation API: https://github.com/Petewg/harbour-core/ ... cation-API
Sample: https://github.com/harbour/core/blob/ma ... ts/com.prg
Sample: https://github.com/harbour/core/blob/ma ... ts/com.prg
- zolysoftsolutions
- Posts: 139
- Joined: Wed Feb 29, 2012 3:33 am
- Location: Gyulakuta, Erdélyország
- Contact:
Re: INIT_PORT problem in Win 10
Hi EDK,
Thank you for trying help me.
hb_comInit( 'COM6', 9600, 8, 0, 1, 64 ) return .F.
.

Zoli B.
Thank you for trying help me.
hb_comInit( 'COM6', 9600, 8, 0, 1, 64 ) return .F.
.
Zoli B.
_______________________________
Open eyes for you!
Open eyes for you!
Re: INIT_PORT problem in Win 10
zolysoftsolutions wrote: ↑Tue Apr 14, 2020 2:44 pm Hi EDK,
Thank you for trying help me.
hb_comInit( 'COM6', 9600, 8, 0, 1, 64 ) return .F.
.
modem.png
Zoli B.
hb_comInit(nPort, nBaud, cParity, nSize, nStop)
nPort := 'COM6' => nPort:=6
cParity := 8 => cParity:="N" for None (N) ; Odd (O) ; Even (E); Mark (M); Space (S)
nSize:=0 => nSize:=8 (bits)
64
try:
Code: Select all
#include <hmg.ch>
#include "hbcom.ch"
Function Main
Local nPort:=6
msgdebug (hb_comOpen( nPort ))
msgdebug (hb_comGetDevice ( nPort ))
msgdebug (HB_ComInit( nPort, 9600, "N", 8, 1 ))
msgdebug (HB_ComClose( nPort ))
Return
***************************************************************************
Please check what the hb_comGetDevice( 6 ) function returns for you on Win10 and on another (working properly) version of Win.
- zolysoftsolutions
- Posts: 139
- Joined: Wed Feb 29, 2012 3:33 am
- Location: Gyulakuta, Erdélyország
- Contact:
Re: INIT_PORT problem in Win 10
msgdebug (hb_comOpen( nPort )) => return .T.
msgdebug (hb_comGetDevice ( nPort )) => return \\.\COM6
msgdebug (HB_ComInit( nPort, 9600, "N", 8, 1 )) => return .T.
msgdebug (HB_ComClose( nPort )) => return .T.
msgdebug (hb_comGetDevice ( nPort )) => return \\.\COM6
msgdebug (HB_ComInit( nPort, 9600, "N", 8, 1 )) => return .T.
msgdebug (HB_ComClose( nPort )) => return .T.
_______________________________
Open eyes for you!
Open eyes for you!
Re: INIT_PORT problem in Win 10
There seems to be a reason: hb_comGetDevice ( 6 ) => \\.\COM6
Maybe try INIT_PORT ("\\.\COM6", 9600, 8, 0, 1, 64 )
Maybe try INIT_PORT ("\\.\COM6", 9600, 8, 0, 1, 64 )
- zolysoftsolutions
- Posts: 139
- Joined: Wed Feb 29, 2012 3:33 am
- Location: Gyulakuta, Erdélyország
- Contact:
Re: INIT_PORT problem in Win 10
Thank You very very much..
It's working now.
Zoli B.
It's working now.
Zoli B.
_______________________________
Open eyes for you!
Open eyes for you!