I can't send more than 255 bytes of data #3877
Replies: 6 comments
-
Are you setting a string? If you're setting a string, the default bound for the string length is 255. create_string_builder (uint32_t bound=MAX_STRING_LENGTH) const int32_t MAX_STRING_LENGTH = 255 So just set a different bound. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much @methylDragon. I just have another question. I was able to run the secure and the insecure HelloworldExample. I ran Wireshark in order to capture the data, but unfortunately, I was not able to see the message that I was sending to the subscriber. Even though, the subscriber was receiving the message. |
Beta Was this translation helpful? Give feedback.
-
Hi @yacoubhanna, That is because Fast DDS uses a SHM transport by default when it can. You could enforce the use of a UDP transport as explained here. You also have the possibility of making the SHM transport to create a capture file by setting dump file that you can then inspect with wireshark. |
Beta Was this translation helpful? Give feedback.
-
Thank you @EduPonz, I was able to capture the data by having dump file and inspect it. However, I was wondering since I'm running the SecureHelloWorldExample, and using the "Crypto:AES-GCM-GMAC" Plugin. How can I access the keys that are used in that plugin. Also, how can I see the cipher message when I run the publisher and the subscriber terminals? When I run the publisher I can see the message that I sent, but I need to see how the message looks encrypted. Thanks for your help @methylDragon @EduPonz |
Beta Was this translation helpful? Give feedback.
-
I used shm transport and send string more than 255bytes, using the way below (picture is C++ and python version): |
Beta Was this translation helpful? Give feedback.
-
Hi @yacoubhanna, sorry for the late response.
Unfortunately, there is no way to access the keys.
As done in Wireshark, you can use tshark to analyze network traffic in terminal instead of graphical interface. Hope it suits your needs. I am moving the issue to the Unofficial support discussion forum for the moment as per Fast DDS Contributing |
Beta Was this translation helpful? Give feedback.
-
Is there an already existing issue for this?
Expected behavior
I looked online about the maximum size of the message and it should be up to 46k bytes. However, I was not able to send that much data using the HelloWorld Example and running them on the same machine. You can see that the publisher sending all 10 messages but not on the subscriber side, they are not received, or at least they are not showing up on the terminal. Also, I ran Wireshark to capture the data that I was sending and I was not able to see it. I can only see the packet when someone subscribes to a topic.
Current behavior
Using a HelloWorld Example I was only able to send 255 bytes as a message. I'm running the Publisher and the Subscriber on the same machine (Loopback) on Ubuntu 22.04.
Steps to reproduce
.....
Fast DDS version/commit
I'm using the current version 2.7.1
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
Default configuration, UDPv4 & SHM
Additional context
Ubuntu Jammy 22.04 amd64
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
Beta Was this translation helpful? Give feedback.
All reactions