[riot-devel] gcoap blockwise transfer

Ken Bannister kb2ma at runbox.com
Thu May 2 16:44:45 CEST 2019

Hi Ashim and welcome to RIOT!

As you say, we have two CoAP tools -- nanocoap and gcoap. Here are your 

In the latest release, 2019.04, nanocoap has server-based block 
capabilities. So, it would work if Californium acted as a client and 
PUT/POSTed the file contents to your nanocoap server. See the 
nanocoap_server example in the source repository and documentation at 
Modules > Networking > Nanocoap.

There also are PRs for full client/server block capabilities. In this 
case it's probably easier to use gcoap because it's fully documented, 
but a nanocoap client would work, too. See #11057 for the final PR in 
the series. If you build the source documentation (make doc), you will 
find detailed instructions and links to examples. See the Modules > 
Networking > Gcoap topic.

I am the author of the PR series, and would appreciate you testing it 
out. We are actively (if slowly) reviewing and merging these PRs.


On 5/2/19 2:05 PM, Ashim Asharaph wrote:
> Dear RIOT developers
> I'm sending a GET request from gcoap running on native to a 
> californium server hosting a file. The file is about 56kB in size. I 
> can receive the file correctly (multiple blocks) when using 
> Californium Copper. I can only receive one 512 byte block of data 
> through gcoap. I have tried changing GCOAP_PDU_BUF_SIZE but this only 
> affects whether I can receive the one block. How do I receive multiple 
> blocks? Has coap blockwise transfer been implemented in gcoap? Is 
> nanocoap a suitable alternative for receiving the file?
> Kind regards
> Ashim Asharaph
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20190502/d1a092e5/attachment.html>

More information about the devel mailing list