Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Serial-Port "hex-mode"(Interpreting the data send via serial port as octetstring)
Serial-Port "hex-mode" [message #1850402] Tue, 01 March 2022 15:32 Go to next message
Fabian Sow is currently offline Fabian SowFriend
Messages: 9
Registered: January 2022
Junior Member
Hello,

I want to communicate to a device using its serial interface. Manually I can communicate using "hex-mode" for input and output data, for example using CuteCom.
A command might look like: A50004FFFB070004043F34
Using Titan, I am using the serial port from gitlab, which only accepts a CHARSTRING.
Simply converting from the OCTETSTRING above (A50004FFFB070004043F34) to CHARSTRING doesnt work since characters are not in the allowed range (00..7F),
and converting using oct2str does not work either.

How can I send data via the serial port, where the content in the CHARSTRING is directly interpreted as Bytes?

BR
Re: Serial-Port "hex-mode" [message #1850413 is a reply to message #1850402] Wed, 02 March 2022 07:40 Go to previous messageGo to next message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 134
Registered: December 2015
Senior Member
The current version of the test port doesn't support binary data, but it can be updated easily.
Re: Serial-Port "hex-mode" [message #1850419 is a reply to message #1850413] Wed, 02 March 2022 11:58 Go to previous message
Fabian Sow is currently offline Fabian SowFriend
Messages: 9
Registered: January 2022
Junior Member
Thank you for your fast reply.

I extended the testport by adding an additional parameter (binary_mode) to the testport and then do the the conversion if needed in the outgoing and incoming functions of the testport.

[Updated on: Wed, 09 March 2022 14:55]

Report message to a moderator

Previous Topic:How to find memory leaks using MEMORY_DEBUG
Next Topic:Encode/Decode enable for all ttcn modules
Goto Forum:
  


Current Time: Wed Oct 09 16:07:16 GMT 2024

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top