На КПК при соединение через блютус открыты 2 порта(на прием и передачу) Принимать принимает ,а пересылать не пересылает. что нужно сделать?(При этом данные в порт пишутся , но не пересылаются)
КПК
| Код | HANDLE hPortSend int serial_write(HANDLE hPort, void *buf, int nbytes) { bool fWriteStat; DWORD dwBytesSent = 0;
fWriteStat = WriteFile(hPort, buf, nbytes, &dwBytesSent, NULL);
/* Note that normally the code will not execute the following * because the driver caches write operations. Small I/O requests * (up to several thousand bytes) will normally be accepted * immediately and WriteFile will return true even though an * overlapped operation was specified */ if (!fWriteStat) my_printf("Write to COM failed\n"); return dwBytesSent; }
UCHAR * DrvMsg; int DrvMsgSize =8;//любое число int SSendWrite = serial_write( hPortSend,DrvMsg, DrvMsgSize );
|
|