You can buy the Delphi XE2 Starter edition online from Embarcadero.com for $149, btw. The current codebase works with Delphi 7 but with a little work I think I can get it to compile with XE2.
So, you are saying that if you use SendRemoteString that you get data on the PC but not if you use BluetoothWrite?
Here's the code for SendRemoteString and BluetoothWrite:
Code: Select all
#define __sendRemoteString(_conn, _queue, _str, _result) \
acquire __RemoteMutex \
mov __SRSTmpBuf, __DCMessageWritePacket \
replace __SRSTmpBuf, __SRSTmpBuf, 2, _queue \
arrsize __SRSTmpLongVal, _str \
replace __SRSTmpBuf, __SRSTmpBuf, 3, __SRSTmpLongVal \
arrbuild __SRSSendBuf, __SRSTmpBuf, _str \
__connectionSCDCWrite(_conn, __SRSSendBuf, _result) \
release __RemoteMutex
#define __connectionSCDCWrite(_conn, _buffer, _result) \
brcmp LT, __ConnWrite_Else##__I__, _conn, 4 \
__RS485WriteSCDC(_conn, _buffer, _result) \
jmp __ConnWrite_EndIf##__I__ \
__ConnWrite_Else##__I__: \
__bluetoothWrite(_conn, _buffer, _result) \
__ConnWrite_EndIf##__I__: \
__IncI__
#define __bluetoothWrite(_conn, _buffer, _result) \
acquire __CBTWMutex \
mov __CBTWArgs.Connection, _conn \
mov __CBTWArgs.Buffer, _buffer \
syscall CommBTWrite, __CBTWArgs \
mov _result, __CBTWArgs.Result \
release __CBTWMutex
John Hansen