python-2.7coap

What are all the options that are set in the copper to coap server using block1 transfer?


I am using the coap, copper, txthings as described in this turtoriall https://www.win.tue.nl/~lrahman/iot_2016/tutorial/txThings_2016.pdf.

Everything is setup and working well but I can't understand what one of the options refer to, my packet is as follows,

  x03\x02H\xb5other\x05block\x10\xb1\x06A\xe6\xff

My query is regarding 'x10' and x06A. I know 'A' ascii-code is 0x41 and /xb1 is the block1 option and /xe6 is the NUM|M|SZX bits.

Update part answer:-

x03\x02H\xb5other\x05block\x10\xb1\x06A\xe6\xff

My dump corresponds to the following hex values:-

0x03,0x02,0x48,0xb5 other 0x05, block, 0x10,0xb1,0x06,0x41,0xe6,payload_marker

I.e. an array of bytes where 'other' and 'block' are shown as strings for convenience.

Edited


Solution

  • Some hints for the parts I understand:

    0xb5 other 0x05, block

    1. Option 11, len=5, Uri-Path, value "other" (RFC 7252)
    2. Option 11, len=5, Uri-Path, value "block" (RFC 7252)

    0x10

    Option 12, len=0, Content-Format, value 0 (RFC 7252)

    0xb1,0x06

    Option 23, len=1, Block1, value 0x06 (num=0,m=false,szx=6/1024 bytes) (RFC 7959)

    0x41,0xe6

    Option 27, len=1, Block2, value 0xe6 (num=14,m=false,szx=6/1024 bytes) (RFC 7959)