W walmo Active Member Licensed User Longtime User Dec 5, 2018 #1 Hi Using A AsyncStream to send bytes to com port. It is sending the line to port but hex not ending with the '0d' like the real software. checking with usb device monitor the hex output . Every line from modem software ends with the '0d' hex (Carriage Return). Please how do i add this '0d' to my line that is send to com port? Thanks
Hi Using A AsyncStream to send bytes to com port. It is sending the line to port but hex not ending with the '0d' like the real software. checking with usb device monitor the hex output . Every line from modem software ends with the '0d' hex (Carriage Return). Please how do i add this '0d' to my line that is send to com port? Thanks
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2018 #2 AsyncStreams in non-prefix mode will not add anything by itself. You can call AStream.Write(Array As Byte(13)) after you send each message. Upvote 0
AsyncStreams in non-prefix mode will not add anything by itself. You can call AStream.Write(Array As Byte(13)) after you send each message.
W walmo Active Member Licensed User Longtime User Dec 6, 2018 #3 It is working, thanks a lot..... Upvote 0
W walmo Active Member Licensed User Longtime User Dec 6, 2018 #4 My return code from com port is like 002A003100310031002A003000380032003400310032003.......... How do convert it to Text string? Thanks Upvote 0
My return code from com port is like 002A003100310031002A003000380032003400310032003.......... How do convert it to Text string? Thanks
Erel B4X founder Staff member Licensed User Longtime User Dec 7, 2018 #5 Please post your AStream_NewData code. Upvote 0
W walmo Active Member Licensed User Longtime User Dec 7, 2018 #6 Dim s As String = BytesToString(Buffer, 0, Buffer.Length, "UTF8") Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 9, 2018 #7 You are converting the bytes to string. Maybe the encoding is incorrect. Are you sure that the modem is sending text? Also make sure not to use prefix mode. Upvote 0
You are converting the bytes to string. Maybe the encoding is incorrect. Are you sure that the modem is sending text? Also make sure not to use prefix mode.