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
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • 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
    • 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
    • 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
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Buffering a Serial gzip Response

Solved711 views4th June 2024HTTP serial
2
Chian Hao Aw [SLC] [DevOps Advocate]650 24th January 2024 2 Comments

I have a HTTP/Serial driver that parses a gzip-encoded response. The issue that I’m currently facing is that the decompressed gzip byte array returns a byte-length of 0. Upon further inspection, I realised that the parameter storing the compressed gzip byte array had a length of 1104, as compared to wireshark, which had a length of about 30k bytes.

I am capturing the response in a serial command/response pair where the payload is stored in a string of length type “next param”. With this information I am lead to believe that the parameter is insufficient in fully capturing the response data, but I am unsure how to store the leftover payload, decompress it and concatenate the responses together for parsing.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 4th June 2024
Shawn Michaud [SLC] [DevOps Member] commented 24th January 2024

What protocol/API and method are you using to make the request? Did you try to query outside of Dataminer like via Postman, how did it go and was the file completely received? Seems like your getting a partial zip file like maybe the connection was interrupted during transfer maybe?

Chian Hao Aw [SLC] [DevOps Advocate] commented 25th January 2024

Hi Shawn, the driver makes a HTTP post request through an xml string that is passed serially to the device. The device is parsing the response serially and it stores the gzip-compressed bytes in a parameter which is then processed by a QAction.

We did some preliminary tests on Wireshark to see if the device was sending data. The file was completely received on Wireshark and the full xml string could be retrieved.

I am unable to verify this on Dataminer as I am stuck at decompressing the gzip-compressed bytes array. It always returns a length of 0 hence there is no way for me to determine how much of the xml string is parsed.

Hope this gives you more context.

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Tom Waterbley [SLC] [DevOps Catalyst]8.89K Posted 27th February 2024 0 Comments

Hi Chian,

It could be that the (string) data is being truncated because of 0x00 bytes in the received data. To solve this you could try to read the raw binary data from the parameter using the GetData() method. An example of how to do that can be found here: https://docs.dataminer.services/develop/devguide/Connector/LogicQActionsExamples.html#processing-gzip-compressed-data.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 4th June 2024
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
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