Hello,
I'm using the IBR-DTN service in android to share a string file that is rather big. I noticed that it sends lots of bundles in sequence and not one big bundle with all the file. Can anyone help me on how to get all theses bundles that arrive and then merge the information? Furthermore, what are the size limitations of a IBR-DTN bundle? Is there anyway to make it bigger?
Thanks in advance, Guilherme Rolim
Hi Guilherme,
the block size of bundles sent and received by the android version of IBR-DTN is limited to 250 MB. Further, the daemon rejects foreign bundles larger than 50 MB. However, this limitation is artificial and configured in the configuration parameters.
Basically, bundles can be of almost arbitrary size. The specification limits the payload length to 2^64 byte. Due to implementation and platform restrictions the maximum usable payload size should be 2^32 byte (2 GB).
How big are the bundles in your case?
Kind regards, Johannes Morgenroth
Am 31.08.2013 18:47, schrieb Guilherme Rolim:
Hello,
I'm using the IBR-DTN service in android to share a string file that is rather big. I noticed that it sends lots of bundles in sequence and not one big bundle with all the file. Can anyone help me on how to get all theses bundles that arrive and then merge the information? Furthermore, what are the size limitations of a IBR-DTN bundle? Is there anyway to make it bigger?
Thanks in advance, Guilherme Rolim
Hmm, that's strange. I'm sending a big String file containing a webpage. But I believe it's size is far inferior than 50MB. It's curious, because when I receive it, it seems like the String was to big for only one bundle, so I received other bundles with the rest of the same String. I'll try another method to send the bundle since the size shouldn't be a problem.
Thanks for the help, Guilherme Rolim
On Mon, Sep 2, 2013 at 4:24 AM, Johannes Morgenroth < morgenroth@ibr.cs.tu-bs.de> wrote:
Hi Guilherme,
the block size of bundles sent and received by the android version of IBR-DTN is limited to 250 MB. Further, the daemon rejects foreign bundles larger than 50 MB. However, this limitation is artificial and configured in the configuration parameters.
Basically, bundles can be of almost arbitrary size. The specification limits the payload length to 2^64 byte. Due to implementation and platform restrictions the maximum usable payload size should be 2^32 byte (2 GB).
How big are the bundles in your case?
Kind regards, Johannes Morgenroth
Am 31.08.2013 18:47, schrieb Guilherme Rolim:
Hello,
I'm using the IBR-DTN service in android to share a string file that is rather big. I noticed that it sends lots of bundles in sequence and not one big bundle with all the file. Can anyone help me on how to get all theses bundles that arrive and then merge the information? Furthermore, what are the size limitations of a IBR-DTN bundle? Is there anyway to make it bigger?
Thanks in advance, Guilherme Rolim
-- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.** de ibr-dtn-request@ibr.cs.tu-bs.de> !! or look at https://www.ibr.cs.tu-bs.de/**mailman/listinfo/ibr-dtnhttps://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn .
Are you really sure you get multiple bundles? Maybe you just misunderstood the API. Not every call of "public void payload(byte[] data);" represents one bundle. Rather, each bundle is received between a pair of beginBundle() and endBundle(). Between these calls the payload() method is called one or more times handover the payload of the bundle to your application. The amount of data here is limited by the internal data buffer.
Kind regards, Johannes Morgenroth
Am 02.09.2013 18:49, schrieb Guilherme Rolim:
Hmm, that's strange. I'm sending a big String file containing a webpage. But I believe it's size is far inferior than 50MB. It's curious, because when I receive it, it seems like the String was to big for only one bundle, so I received other bundles with the rest of the same String. I'll try another method to send the bundle since the size shouldn't be a problem.
Thanks for the help, Guilherme Rolim
Oh, you're right! I thought I could get all the payload in that method. I just checked the Whisper code to know how to do it right. It seems I have to create a stream, and for every payload(byte[] data) write in it, so I can have the final result in the endBundle right? Just one more question, what the startBlock and endBlock methods for?
Really thanks, Guilherme Rolim
On Tue, Sep 3, 2013 at 3:43 AM, Johannes Morgenroth < morgenroth@ibr.cs.tu-bs.de> wrote:
Are you really sure you get multiple bundles? Maybe you just misunderstood the API. Not every call of "public void payload(byte[] data);" represents one bundle. Rather, each bundle is received between a pair of beginBundle() and endBundle(). Between these calls the payload() method is called one or more times handover the payload of the bundle to your application. The amount of data here is limited by the internal data buffer.
Kind regards, Johannes Morgenroth
Am 02.09.2013 18:49, schrieb Guilherme Rolim:
Hmm, that's strange. I'm sending a big String file containing a webpage.
But I believe it's size is far inferior than 50MB. It's curious, because when I receive it, it seems like the String was to big for only one bundle, so I received other bundles with the rest of the same String. I'll try another method to send the bundle since the size shouldn't be a problem.
Thanks for the help, Guilherme Rolim
-- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.** de ibr-dtn-request@ibr.cs.tu-bs.de> !! or look at https://www.ibr.cs.tu-bs.de/**mailman/listinfo/ibr-dtnhttps://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn .
A bundle consists of one payload block and an unlimited number of extension block. Extension blocks are optional and might exist or not. To receive the bundle payload only, you have to check the block type in startBlock() first and tell the API if you are interested in the payload of this block or not. The bundle payload block has a type of 1. To understand the details, you study the Whisper application.
Kind regards, Johannes Morgenroth
Am 03.09.2013 14:55, schrieb Guilherme Rolim:
Oh, you're right! I thought I could get all the payload in that method. I just checked the Whisper code to know how to do it right. It seems I have to create a stream, and for every payload(byte[] data) write in it, so I can have the final result in the endBundle right? Just one more question, what the startBlock and endBlock methods for?
Really thanks, Guilherme Rolim
participants (2)
-
Guilherme Rolim
-
Johannes Morgenroth