Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

how to write raw tcp packet send and read driver

Solved1.12K views12th July 2023serial protocol SmartSerial TCP
1
peng fei158 7th November 2022 0 Comments

Hi :

I would like to write a raw tcp send and receive driver.

e.g.

  1. The element opens a tcp connection to a remote device via port 3333.
  2. Then the element sends text string "READ1" to the remote device.
  3. Then the element reads response (e.g. "RESULT1" or ERROR msg) from remote device.

I think it can be done via <pair>, <command> and <response>.

Are following xml tags the right way doing it?

Thanks

<Pair id="1" ping="true">
<Name>getDeviceState</Name>
<Description>Get Device State</Description>
<Content>
<Command>1</Command>
<Response>1</Response>
</Content>
</Pair>

<Command id="1">
<Name>getDeviceStateCMD</Name>
<Description>Get Device State CMD</Description>
<Content>
<Param>1</Param>
</Content>
</Command>

<Responses>
<Response id="1">
<Name>getDeviceStateRSP</Name>
<Description>Get Device State RsP</Description>
<Content>
<Param>2</Param>
</Content>
</Response>

<Param id="1">
<Name>dynamicCMDData</Name>
<Description>Command Data</Description>
<Information>
<Subtext></Subtext>
<Includes>
<Include>time</Include>
<Include>range</Include>
<Include>steps</Include>
<Include>units</Include>
</Includes>
</Information>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
<DefaultValue>READ1</DefaultValue>
</Interprete>
</Param>

<Param id="2">
<Name>dynamicRSPData</Name>
<Description>Dynamic Response Data</Description>
<Information>
<Subtext></Subtext>
<Includes>
<Include>time</Include>
<Include>range</Include>
<Include>steps</Include>
<Include>units</Include>
</Includes>
</Information>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
</Param>

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 12th July 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Tom Waterbley [SLC] [DevOps Catalyst]8.86K Posted 8th November 2022 0 Comments

Hi Peng Fei. Your code is in the right direction, but would change the following things:

Param 1 can be a fixed parameter:

<Param id="1">
<Name>dynamicCMDData</Name>
<Description>Command Data</Description>
<Type>fixed</Type>
<Interprete>
<RawType>other</RawType>
<LengthType>fixed</LengthType>
<Length>5</Length>
<Type>string</Type>
<Value>READ1</Value>
</Interprete>
</Param>

Next to that it would be better if a 'trailer' parameter could be added to the response (if possible, depending on the data format).
When the trailer is received, DataMiner knows it has received the whole message. If no trailer is defined DataMiner will wait until the configured timeout time in the element before starting to process the data, which slows down the communication a lot.

More detailed information and help can be found here:
https://docs.dataminer.services/develop/devguide/Connector/ConnectionsSerialCreatingCommandsAndResponses.html

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 12th July 2023
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Alarm Dashboard PDF/CSV Export 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (139) driver (65) DVE (55) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (151) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin