0

How implement radio transmitter e receiver example with packet array

zimmer gravatar image

asked 2017-03-20 20:35:43 +0200

Hi,

SDK: nRF5_SDK_12.2.0_f012efa No softdevice Example: nRF5_SDK_12.2.0_f012efa\examples\peripheral\radio\transmitter\pca10040\blank and receiver.

I have running examples perfect, but I need send uint8_t packet[6].

I add in transmitter the timer to send packet:

void send_datetime_timeout_event(void * p_context){
    packet[0] = 10; 
    packet[1] = 20;
    packet[2] = 30;
    packet[3] = 40;
    packet[4] = 50;
    packet[5] = 60;
send_packet();
}

But in received packet have data only in first position.

 if (NRF_RADIO->CRCSTATUS == 1U) {
    uint8_t result = packet[0]; // its ok, value 0x0A (10)
    uint8_t result1 = packet[1]; // value 0x00
   uint8_t result2 = packet[2]; // value 0x00

}

Do you have any idea the problem?

English is not my first language, so I apologize in advance for any linguistic mistake.

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
0
Kristin gravatar image

answered 2017-03-22 09:19:37 +0200

To increase the packet length, PACKET_STATIC_LENGTH in radio_config.h needs to be set to the appropriate packet length.

edit flag offensive delete publish link more

Comments

Perfect. Thank you.

Leandro Zimmer ( 2017-03-22 13:33:24 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-03-20 20:35:43 +0200

Seen: 26 times

Last updated: Mar 22