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
    • 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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about 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)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Why does DataMiner apply sequential greedy unstuffing?

Solved331 views4 days agoserial protocol smart-serial SmartSerial
8
Harun Ibrahimovic [SLC] [DevOps Advocate]154 7th November 2025 0 Comments

Hi Dojo,

I noticed an interesting behavior in DataMiner's byte unstuffing that caught my attention. Consider the following action:

<Action id="4">
    <Name>Response Unstuffing</Name>
    <On>response</On>
    <Type options="0x10ef-0x10fd-0x10fc;0x10-0x02-0x03" startoffset="1" endoffset="1">replace                  data</Type>
</Action>

Example raw device response:

02 30 0E 00 D1 10 EF FD 03

After unstuffing, the protocol produces:

02 30 0E 00 D1 02 03

Even though the original response contained 10 EF FD, the sequential greedy replacement turns it into just 02.

Step-by-step explanation:

  1. The protocol scans the stream and finds 10 EF. It replaces it with 10.

    • Stream becomes: ... <strong>D1 10 FD 03</strong>

  2. Next, it finds 10 FD in the remaining stream and replaces it with 02.

    • Stream becomes: ... <strong>D1 02 03</strong>

  3. No more matches are found, so unstuffing ends.

    • Final unstuffed stream: ... <strong>D1 02 03</strong>

The protocol processes the buffer sequentially and greedily, which is why 10 EF FD becomes 02.

I am curious why the protocol was designed to apply replacements sequentially over the entire response instead of treating the original response sequence as a single unit. Also, is there a scenario where reordering the replacements to prevent this behavior is not possible, and could that potentially cause issues with some responses?

Harun Ibrahimovic [SLC] [DevOps Advocate] Selected answer as best 4 days ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Laurens Moutton [SLC] [DevOps Enabler]9.47K Posted 4 days ago 0 Comments

Hi,

Indeed, the logic is done sequentially:
-First the response data is iterated to replace 0x10ef with 0x10
-Then that modified result is iterated to replace 0x10fd with 0x02
-Lastly that second modified result is iterated to replace 0x10fc with 0x03

This means if you have 0x10effd that it will be replaced with 0x02 instead of 0x1002.
As the 0x10 is the 'special' indicator byte, the advice would be to change the order in the options to only replace the 0x10fd as last: options="0x10fd-0x10fc-0x10ef;0x02-0x03-0x10"

I do not know the reason why it was implemented sequentially. This logic was introduced in DataMiner version 2.5.0.1 in 2003, which is already more than two decades ago.

Regards,

Harun Ibrahimovic [SLC] [DevOps Advocate] Selected answer as best 4 days ago
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
Privacy Policy • Terms & Conditions • Contact

© 2026 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