DWM1000 cannot receive messages

Hello, I added ex_05a_ds_twr_init and ex_05b_ds_twr_resp to my project. After calculating the distance, I want to send the distance to the development board running ex_05a_ds_twr_init, but if (status_reg & SYS_STATUS_RXFCG) it fails all the time. How to solve this problem?

This is the code for the sending part:

					uint8 an_distance_msg[] = {0x41, 0x88, 0, 0x0, 0xDE, 'W', 'A', 'V', 'E', 0xAA, 0, 0,0, 0, 0};

					an_distance_msg[ALL_MSG_SN_IDX] = frame_seq_nb;
					an_distance_msg[ALL_MSG_TAG_IDX] = tagID;
					an_distance_msg[ANGLE_ID_PLACE] = ANCHOR_IND;
					sprintf(dist_str, "%f", distance);							

					int ret1 = dwt_writetxdata(sizeof(an_distance_msg), an_distance_msg, 0); 
					int ret2 = dwt_writetxfctrl(sizeof(an_distance_msg), 0); 
					ret = dwt_starttx(DWT_START_TX_IMMEDIATE);
					while (!(dwt_read32bitreg(SYS_STATUS_ID) & SYS_STATUS_TXFRS)){};
					dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_TXFRS);

This is the code of the receiving part:

			int ret1 = dwt_rxenable(0);
			while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_RXFCG| SYS_STATUS_ALL_RX_ERR)))


			if (status_reg & SYS_STATUS_RXFCG)
				uint32 frame_len;
				/* Clear good RX frame event and TX frame sent in the DW1000 status register. */