Can't transmit 0x00 across serial bus
MyBuffer1.s = Chr(2) + "L" + Chr(0) + Chr(0) + Chr(1)
If ComWrite(Hcom, @MyBuffer1, Len(MyBuffer1)+1)
Debug "Write Ok"
EndIf
No matter what I do, I can't Chr(0) to eb transmitted out of the serial port.
MVCOM problems
- DoubleDutch
- Addict

- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Try. Im in cafe.
Code: Select all
buffer = AllocateMemory(5)
PokeB(buffer, 2)
PokeB(buffer+1, asc("L"))
PokeB(buffer+2, 0)
PokeB(buffer+3, 0)
PokeB(buffer+4, 1)
If ComWrite(Hcom, buffer, 5)
Debug "Write Ok"
EndIf [Registered PB User since 2006]
[PureBasic 6.20][SpiderBasic 2.2]
[RP4 x64][Win 11 x64][Ubuntu x64]
Re: MVCOM problems
PB terminates strings with Chr(0) - I think this could be your problem, try JCV's codeac667788 wrote:MyBuffer1.s = Chr(2) + "L" + Chr(0) + Chr(0) + Chr(1)
there is no sig, only zuul (and the following disclaimer)
WARNING: may be talking out of his hat
WARNING: may be talking out of his hat

