Click here to Skip to main content
15,064,665 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to use VBA to communicate over rs232 to a module which is expecting 8 bits frames. I use filewrite from API32
. I thought it would be enough to send as single byte but I see every byte gets out on the rs232 as two bytes. Precisely one sees that I get out the original byte converted to utf-16. For instance aiming to broadcast 0x35 I will actually send 0x33 as first byte and 0x35 as second one. The receiver will then not understand what was meant.

What I have tried:

No idea yet- I am considering using methods from systemio instead
Updated 26-Oct-19 21:19pm
Richard MacCutchan 26-Oct-19 10:16am
That suggests that your code is trying to send the string "35", rather than the single hex character '\x35'. Unfortunately you forgot to show us the code so that is something of a wild guess.
Patrice T 27-Oct-19 3:02am
There is a secret error in your secret code.
Solution depend on your code.

1 solution


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900