Compare commits

...

3 Commits

Author SHA1 Message Date
Thomas Dreibholz
0a883bb4f9 Error should create a log entry, not use printf(). 2020-03-03 10:54:08 +01:00
Thomas Dreibholz
67dc30398c Made error message more informative. 2020-03-03 10:54:03 +01:00
Thomas Dreibholz
0245d40ece Check result of openair0_device_load() and exit when loading the device fails. 2020-03-03 10:53:58 +01:00

View File

@@ -2342,11 +2342,15 @@ void init_RU_proc(RU_t *ru) {
init_frame_parms(ru->frame_parms,1);
ru->frame_parms->nb_antennas_rx = ru->nb_rx;
phy_init_RU(ru);
openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
if (ret < 0) {
LOG_I(PHY,"Exiting, cannot load device. Make sure that your SDR board is connected!\n");
exit(1);
}
if (setup_RU_buffers(ru)!=0) {
printf("Exiting, cannot initialize RU Buffers\n");
exit(-1);
LOG_I(PHY,"Exiting, cannot initialize RU Buffers\n");
exit(1);
}
}