This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Send message via UART without CLI overhead??

Hello,

I have been building an application using the CLI and I am thankful for the CLI example and how well it works.  I am wondering is it possible to use the CLI but then also just send messages via UART that don't contain all of the usual CLI overhead.  I ask because I have a C# test application that communicates with the our board and expects a specific response from the device.  My C# app was looking for a known beginning character (":G") to determine that a get response is being received. 

My test application captures in the incoming serial communication and stores it in receiveBuffer.  It then looks for the characters :G. 

I was using code that was if(receiveBuffer.StartsWith(":G") to determine that a get response message is being received.

I have figured out instead of using .StartsWith that if I change it to receiveBuffer.Contains(":G") seems to work to parse the messages. 

I am just wondering if it is possible to use the CLI as normal but then also send messages out the UART without the extra CLI starting text. 

Please see the attached images

Here is a serial interface tab in my C# app which shows the extra characters that are used by the CLI.

Here is a snippet from my C# app where it is possible to see the beginning characters as received by the app from the CLI message.

Here is an image of my code and how I am trying to send the messages to my C# app.

Thanks.

Related