If I understand you good, you can use hbcomm for serial communication. There is a piece of my code for opening COM port, sendig and receiveing data : cPortName := "COM1" nBaud := 9600 oWinPort := win_com():Init(cPortName, nBaud, NOPARITY, 8, ONESTOPBIT) if !oWinPort:Open msgstop("Error opening COM port!" ) return .F. else // COM port opened successfully oWinPort:QueueSize( 1000, 1000 ) oWinPort:Purge() //TimeOuts( nReadInterval, nReadMultiplier, nReadConstant, nWriteMultiplier, nWriteConstant ) oWinPort:Timeouts(1500,1000,20000,1000,20000) // set control of communication flow oWinPort:RTSFlow(.t.) oWinPort:DTRFlow(.t.) oWinPort:XonXoffFlow(.t.) // set modem lines states oWinPort:SetDTR(.t.) oWinPort:SetDTR(.t.) oWinPort:SetRTS(.t.) endif now you can use this function to send data: oWinPort:Write("any string to send via COM Port") and this function for read data from serial port cAnswer := "" oWinPort:Read(@cAnswer, nNumberOfBytesToRead) I've placed two useful functions below: function ECR_ComClose local nCount := 0, cAnswer := "" if oWinPort <> NIL oWinPort:QueueStatus( , , , , , @nCount, ) oWinPort:Read(@cAnswer, nCount) oWinPort:Purge() oWinPort:RTSFlow(.f.) oWinPort:DTRFlow(.f.) oWinPort:XonXoffFlow(.f.) oWinPort:SetDTR(.f.) oWinPort:SetDTR(.f.) oWinPort:SetRTS(.f.) oWinPort:Close() endif oWinPort := NIL return .t. function ECR_CalcCRC param buff local i, crc, Result, cChar crc := 0 for i := 1 to Len(buff) cChar := asc(substr(buff,i,1)) cChar := NumRol(cChar,(i - 1)%9) crc := NumXor(crc,cChar) Result := NtoC (crc, 16,4,"0") next i return Result