简体   繁体   English

如何为Californium服务器设置消息大小(PDU)?

[英]How I can set a size of message (PDU) for the Californium server?

How I can set a size of PDU dynamically for Californium server? 如何为Californium服务器动态设置PDU的大小?

Context: 语境:

1) I have a device with implemented coap-client functionality. 1)我有一台已实现coap-client功能的设备。 This device is constrained by RAM , about 200 free bytes for rx/tx buffers. 该设备受RAM约束,用于rx/tx缓冲区的空闲字节大约为200。

In the request the device can sent a prefer PDU size. 在请求中,设备可以发送首选的PDU大小。 But I don't understand how to configure server responses with this PDU size. 但是我不明白如何用这种PDU大小配置服务器响应。 Is it possible? 可能吗?

2) Will be work a blockwise-functionality for this case? 2)在这种情况下是否可以按块进行工作?

Ok, I found how to do it. 好的,我找到了怎么做。

It is not a Californium responsibility. 这不是Californium责任。 The management of the PDU-size works via block-wise option Block2 . PDU大小的管理通过block-wise选项Block2

See the CoAP block-wise RFC Section 3.1 : 请参阅CoAP逐块RFC Section 3.1

In the second example (Figure 3), the client anticipates the block- wise transfer (eg, because of a size indication in the link-format description [RFC6690]) and sends a block size proposal. 在第二个示例(图3)中,客户端将进行逐块传输(例如,由于链接格式描述[RFC6690]中的大小指示),并发送块大小建议。 All ACK messages except for the last carry 64 bytes of payload; 除最后一个消息外,所有ACK消息均携带64字节有效载荷; the last one carries between 1 and 64 bytes. 最后一个携带1到64个字节。

Client                                                   Server
|                                                          |
| CON [MID=1234], GET, /status, 2:0/0/64           ------> |
|                                                          |
| <------   ACK [MID=1234], 2.05 Content, 2:0/1/64         |
|                                                          |
| CON [MID=1235], GET, /status, 2:1/0/64           ------> |
|                                                          |
| <------   ACK [MID=1235], 2.05 Content, 2:1/1/64         |
:                                                          :
:                          ...                             :
:                                                          :
| CON [MID=1238], GET, /status, 2:4/0/64           ------> |
|                                                          |
| <------   ACK [MID=1238], 2.05 Content, 2:4/1/64         |
|                                                          |
| CON [MID=1239], GET, /status, 2:5/0/64           ------> |
|                                                          |
| <------   ACK [MID=1239], 2.05 Content, 2:5/0/64         |

    Figure 3: Block-Wise GET with Early Negotiation

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Cal Calap路径参数 - Californium CoAP path parameters 作为 ActiveMQ 订阅者,我如何获取消息发布者用户名或任何其他标识符以供以后使用? - As an ActiveMQ subscriber how can I get the message publisher username or any other identifier to be used later? 如何从一组元组创建多个集 - How can i create multiple sets from a set of tuples 我如何在我的 nginx 服务器上读取数据包,我正在发送数据包发送方 - How can I read a packet with on my nginx server, I am sending the packages with packet sender 我可以将Google云消息用于这种类型的家庭自动化吗 - can I use google cloud message for this type of home automation purposes 如何在IoT设备上设置静态IP,并自动在任何网络上运行 - How can I set a static IP on my IoT device and have if work on any network automatically 使用 AMQP 协议时如何在 azure 中识别从设备到 IoT 中心的消息大小? - How to identify a message size from device to IoT hub in azure when using AMQP protocol? Azure邮件大小限制和IOT - Azure Message size limit and IOT 使用IBM的“物联网基金会”时,如何确保服务器和连接的设备之间的连接安全? - How can I secure the connection the server and connected devices when using IBM's “Internet of Things Foundation”? 如何测试与服务器的Milo客户端连接是否实际使用加密? - How can I test if a Milo client connection to a server is actually using encryption?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM