Unsolved Can TCP/IP data source send and receive HEX data, and how?
-
This TCP/IP data source is really handy.
Yet it seems to send and receive data as strings as always, despite of escape characters like '\' .
Is there a way to send and receive HEX data using this data source? @administrators -
We are currently working on a fix for this and it should be available in the next release. You can track our progress here:
https://github.com/infiniteautomation/ma-core-public/issues/490
-
Thanks to your reply, Terry.
I'm tracking your issue at github and have seen your fix about write command. I can't wait to see all codes fixed and try out the new version of TCP/IP module. -
Hi Marc. These changes have been implemented and available for the module in Core 2.7.0
You should be able to get that through upgrading your Mango from the modules page. We decided it should work that way, so now write commands and read commands are both processed for escape characters. -
Hi, guys. I've tested this new version in Mango 2.7, but not sure I was using it by the right way.
The module seems to process only one character after the escape one. So I can get HEX value 00 by typing \0 as read command, and HEX value 01 by typing \1 .
When it comes to complicated HEX value like FD, \253 cannot work because it is treated as three characters, as in HEX value 02 35 33 .
The job is to send and receive strings in HEX format, and the commands may be like 01 00 00 FD AE CA 5C. Using escape characters is one way to input these strings on Mango pages, maybe there are other ways, please let me know.Quick question: how to input HEX value like FD or CA?
I was writing this in a hurry, any mistakes, please correct me.
Thank you guys. -
Marc,
The changes we made only allow escaping the UTF-8 Charset. This means you won't be able to send a byte with a value larger than 127 as UTF-8 will break that into multiple characters/bytes.
To be able to send raw hex values easily we would need to do something similar to the Serial Data Source that allows choosing that all the values are converted to/from hex strings using UTF-8 characters. I'll put that into our queue.
-
I've created an issue for you to track this: https://github.com/infiniteautomation/ma-core-public/issues/528
-
Thanks Terry, I'm tracking the issue and hoping it can be done sooner.