123
Senior Member
You can try adding a "len(sPkt)" to display the length of the received data to get a better idea of what's going on. Or, better yet, use "asc(sPkt)" to display the ANSI integer value for the first character in sPkt. So if sPkt contains a single null character ("00"), the asc function will convert it to "0".... I tried just adding debugout sPkt to the global parser, but nothing would display under debugview? ...
If it indicates a zero-length string (i.e. empty string) then there might be a problem with "RxTextLineTerminators". Maybe it thinks the received data has two consecutive line terminators. If Carriage Return and Line Feed serves as the delimiter then the following:
DATA<CR><LF><CR><LF>
might be misinterpreted as "DATA" and an empty string "".
Here's what the module's "ClassConstructor" method does:
this.RxTextLineTerminators = "0D OA"
That's wrong! The letter "A" is preceded by the letter "O" when it ought to be the number "0". I thought I had found the source of the problem and then discovered that Premise recognizes this is an invalid assignment, ignores it, and uses its default set of terminators: "0D 0A 00". Oh well.
You can try experimenting with RxTextLineTerminators to see if there's a combination that eliminates the empty string issue. Go to Devices > CustomDevices > ViziaRF, locate the RxTextLineTerminators property, and remove the null character "00".