Generic FSK without the Length Field in the Header

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Generic FSK without the Length Field in the Header

1,002 次查看
semiory
Contributor I

Hello,

 I have the following issue:

I'm trying to implement a proprietary protocol, which uses packages of 46 bytes (Payload + CRC). The Length of the Package is fixed, and shall not be sent within the package itself, because the whole payload is already defined.

Is it possible to implement such a protocol with KW41Z?

Thanks in advance!

标签 (1)
标记 (2)
0 项奖励
4 回复数

683 次查看
gerardo_rodriguez
NXP Employee
NXP Employee

Hi semiory,

Yes, this is possible. You would have to modify the source code to ignore the length field when saving the packet data in the gTxBuffer before it is being sent.

You can see how this is implemented for the connectivity test in the CT_ContinuousTests() function inside the case for gContStateRunPRBS_c (around line 1372).

Regards,

Gerardo

683 次查看
semiory
Contributor I

Hi Gerardo,

 I have a quastion, can I receive a long (46... bytes) packet without any information in the header? In the same way as you provided for packet transmission?

For Example, if I set the value

GENFSK->PACKET_CFG |= GENFSK_PACKET_CFG_LENGTH_ADJ( 46 + 4 );

In the genfskStatus_t GENFSK_StartRx(...) function from genfsk_ll.c.

Will I receive a Packet with 46 + 4 Bytes CRC = 50 Bytes (which is grater than 31 byte, what seems to be maximal value for LENGTH_ADJ field regarding the datasheet) without using the header?

Thanks in advance

Semiory

0 项奖励

683 次查看
gerardo_rodriguez
NXP Employee
NXP Employee

Hi Semiory,

Sorry for the late response.

I investigated about this, and the correct way of sending a packet without the length field in the header is to use the gGenfskRawPacket packet type in the GFSK configuration structure pktConfig. The disadvantage is that with this packet type we are limited to a maximum of 35 bytes of payload (31 bytes from LENGTH_ADJ and 4 bytes from H0 and H1), so this might be a limitation to your propietary protocol with a packet size of 46 bytes.

With the raw packet type the maxBufLengthBytes parameter in the GENFSK_StartRx() function sets the received packet size. All packets with different length will be rejected.

For more information on the GFSK packet types, you can refer to the chapter 6.1.5 Generic FSK Link Layer Send and Receive APIs from the "Generic FSK Link Layer Quick Start Guide.pdf" document located in <SDK path>\docs\wireless\GENFSK\.

Regards,

Gerardo

0 项奖励

683 次查看
semiory
Contributor I

Hi Gerardo,

Grate, Thanks!

It is a real good news.

Best Regards

Semiory

0 项奖励