I am using WinDev Mobile 19 and have a question about using Bluetooth
Sockets. I am able to connect to the device without a problem. I am
writing a string to the socket using SocketWrite which works fine, but,
what I receive on the bluetooth device has extra information.
I found where, by default, the length of the data is sent first along
with a <CRLF>. I didn't want that so I switched it to using the EOT
(0x4) marker at the end (using the SocketChangeTransmissionMode function).
THE ISSUE: I am getting a 0 (0x0) after each characters in the
string. So, the chars receivied after sending "zz" are:
"z" + 0x0 + "z" + 0x0 + 0x4
Can anyone tell me why I am getting the 0 after each character?
Thank you in advance!
Mark
IF HRecNum(BTDevices)=0 THEN RETURN
sMACAddress is string = LIST_BTNames
IF LIST_BTNames <> "" THEN
IF SocketExist(sBTSocketName) = False THEN
IF SocketConnectBluetooth(sBTSocketName ,
"SerialPortServiceClass_UUID" , sMACAddress,2000) = False THEN
Info("Unable to connect to socket: " + sBTSocketName + " "
+ ErrorInfo)
RETURN
END
END
IF NOT
SocketChangeTransmissionMode(sBTSocketName,SocketEndTagBuffer,EOT) THEN
Info("Unable to set socket transmission mode!")
RETURN
END
IF SocketWrite(sBTSocketName,"zz") = False THEN
Info("Unable to connect to socket: " + sBTSocketName + " " +
ErrorInfo)
END
END