Fix incorrect MIB generation. Fixes issue #232

master
Ismael Gomez 7 years ago
parent a8f6081837
commit 1a1471955e

@ -69,13 +69,11 @@ int srslte_enb_dl_init(srslte_enb_dl_t *q, cf_t *out_buffer[SRSLTE_MAX_PORTS], u
goto clean_exit;
}
}
if (srslte_ofdm_tx_init_mbsfn(&q->ifft_mbsfn, SRSLTE_CP_EXT, q->sf_symbols[0], out_buffer[0], max_prb)) {
fprintf(stderr, "Error initiating FFT \n");
goto clean_exit;
}
if (srslte_pbch_init(&q->pbch)) {
fprintf(stderr, "Error creating PBCH object\n");
@ -174,6 +172,9 @@ int srslte_enb_dl_set_cell(srslte_enb_dl_t *q, srslte_cell_t cell)
return SRSLTE_ERROR;
}
for (int i = 0; i < q->cell.nof_ports; i++) {
q->slot1_symbols[i] = &q->sf_symbols[i][SRSLTE_SLOT_LEN_RE(q->cell.nof_prb, SRSLTE_CP_NORM)];
if (srslte_ofdm_tx_set_prb(&q->ifft[i], q->cell.cp, q->cell.nof_prb)) {
fprintf(stderr, "Error re-planning iFFT (%d)\n", i);
return SRSLTE_ERROR;
@ -375,7 +376,7 @@ void srslte_enb_dl_put_base(srslte_enb_dl_t *q, uint32_t tti)
srslte_enb_dl_put_refs(q, sf_idx);
srslte_enb_dl_put_mib(q, tti);
srslte_enb_dl_put_pcfich(q, sf_idx);
}
void srslte_enb_dl_put_mbsfn_base(srslte_enb_dl_t *q, uint32_t tti)

@ -579,17 +579,15 @@ int srslte_pbch_encode(srslte_pbch_t *q, uint8_t bch_payload[SRSLTE_BCH_PAYLOAD_
frame_idx=frame_idx%4;
if (frame_idx == 0) {
memcpy(q->data, bch_payload, sizeof(uint8_t) * SRSLTE_BCH_PAYLOAD_LEN);
memcpy(q->data, bch_payload, sizeof(uint8_t) * SRSLTE_BCH_PAYLOAD_LEN);
/* encode & modulate */
srslte_crc_attach(&q->crc, q->data, SRSLTE_BCH_PAYLOAD_LEN);
srslte_crc_set_mask(q->data, q->cell.nof_ports);
srslte_convcoder_encode(&q->encoder, q->data, q->data_enc, SRSLTE_BCH_PAYLOADCRC_LEN);
/* encode & modulate */
srslte_crc_attach(&q->crc, q->data, SRSLTE_BCH_PAYLOAD_LEN);
srslte_crc_set_mask(q->data, q->cell.nof_ports);
srslte_rm_conv_tx(q->data_enc, SRSLTE_BCH_ENCODED_LEN, q->rm_b, 4 * nof_bits);
}
srslte_convcoder_encode(&q->encoder, q->data, q->data_enc, SRSLTE_BCH_PAYLOADCRC_LEN);
srslte_rm_conv_tx(q->data_enc, SRSLTE_BCH_ENCODED_LEN, q->rm_b, 4 * nof_bits);
srslte_scrambling_b_offset(&q->seq, &q->rm_b[frame_idx * nof_bits],
frame_idx * nof_bits, nof_bits);

Loading…
Cancel
Save