Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad file: config.yaml #17

Closed
hdtuanss opened this issue Dec 1, 2024 · 4 comments
Closed

bad file: config.yaml #17

hdtuanss opened this issue Dec 1, 2024 · 4 comments

Comments

@hdtuanss
Copy link

hdtuanss commented Dec 1, 2024

Hi,

Thank you for your nice work.

I'm running NR-Scope in Ubuntu 22.04 together with USRP B210 and having this issue:

~/NR-Scope/build$ sudo ./nrscope/src/nrscan
Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_zmq.so
Inactive RF plugins:
terminate called after throwing an instance of 'YAML::BadFile'
  what():  bad file: config.yaml
Aborted

This is the config file in nrscope/src

nof_usrp_dev: 1
usrp_setting_0:
  ssb_freq: 622850000 # Set to the ssb frequency of the cell, could be obtained with the cell scan function
  rf_args: "clock=internal,type=b200" # For B210
  # rf_args: "clock=external,type=x300,serial=32B0F2F,master_clock_rate=200000000,sampling_rate=25000000" ## For TwinRX daughterboard
  # rf_args: "clock=external,type=x300,sampling_rate=23040000" ## For CBX daughterboard
  rx_gain: 75 # for x310 CBX, max rx gain is 31.5, for b210, it's around 80, for x310 TwinRX, max rx gain is 90
  min_rx_gain: 0
  max_rx_gain: 80
  srate_hz: 15360000 # the sampling rate of USRP, integer division of 200MHz for TwinRX, and 5G sampling rate for CBX: 11520000 or 23040000
  srsran_srate_hz: 15360000 # the sampling for real signal processing, should be in 5G sampling rate, multiple of 1.92 MHz.
  nof_carriers: 1 # srsRAN rf setting, always set to be 1 for now.
  nof_antennas: 1 # srsRAN rf setting, always set to be 1 for now.
  scs_index: 0 #(0: 15kHz, 1: 30kHz, ..., the u in standard)
  rf_log_level: "debug"
  nof_rnti_worker_groups: 4 # number of of threads for DCI decoding, each will divide the UEs into small groups
  nof_bwps: 1 # number of BWP of the cell
  nof_workers: 4 # using worker pool to asynchronously process the slot data
  cpu_affinity: false # pin the worker's thread into CPU or not.

  log_name: "a.csv"
  google_dataset_id: "ngscope5g_dci_log_wanhr"

# usrp_setting_1:
#   ssb_freq: 622850000 # Set to the ssb frequency of the cell, could be obtained with the cell scan function
#   rf_args: "clock=external,type=b200" # For B210
#   # rf_args: "clock=external,type=x300,serial=32B0F2F,master_clock_rate=200000000,sampling_rate=25000000" ## For TwinRX daughterboard
#   # rf_args: "clock=external,type=x300,sampling_rate=23040000" ## For CBX daughterboard
#   rx_gain: 75 # for x310 CBX, max rx gain is 31.5, for b210, it's around 80, for x310 TwinRX, max rx gain is 90
#   min_rx_gain: 0
#   max_rx_gain: 80
#   srate_hz: 15360000 # the sampling rate of USRP, integer division of 200MHz for TwinRX, and 5G sampling rate for CBX: 11520000 or 23040000
#   srsran_srate_hz: 15360000 # the sampling for real signal processing, should be in 5G sampling rate, multiple of 1.92 MHz.
#   nof_carriers: 1 # srsRAN rf setting, always set to be 1 for now.
#   nof_antennas: 1 # srsRAN rf setting, always set to be 1 for now.
#   scs_index: 0 #(0: 15kHz, 1: 30kHz, ..., the u in standard)
#   rf_log_level: "debug"
#   nof_rnti_worker_groups: 4 # number of of threads for DCI decoding, each will divide the UEs into small groups
#   nof_bwps: 1 # number of BWP of the cell
#   nof_workers: 4 # using worker pool to asynchronously process the slot data
#   cpu_affinity: false # pin the worker's thread into CPU or not.

#   log_name: "b.csv"
#   google_dataset_id: "ngscope5g_dci_log_wanhr"

log_config:
  local_log: true
  push_to_google: false
  google_service_account_credential: "/home/wanhr/Downloads/nsf-2223556-222187-02b924918c95.json"

Could you please take a look?

Thank you.

@XuyangCaoPrinceton
Copy link
Collaborator

Hi, could you run at build/nrscope/src, and if you are not using an external clock, could you just set rf_args: "type=b200" in config.yaml (i.e., remove clock=internal)?

@hdtuanss
Copy link
Author

hdtuanss commented Dec 1, 2024

Hi,
I ran at build/nrscope/src and it worked.

Thank you!

@hdtuanss hdtuanss closed this as completed Dec 1, 2024
@WanHaoRan
Copy link
Collaborator

Thanks for trying our tool! As a complement to Xuyang's response, I have the following comments.
In the CMakeLists.txt in the root directory, there are two lines of code that will copy the config.yaml file from /nrscope/config/ to the build directory, when you run the make command:

configure_file(${PROJECT_SOURCE_DIR}/nrscope/config/config.yaml
${CMAKE_CURRENT_BINARY_DIR}/nrscope/src/config.yaml)

So you can edit your config file at /nrscope/config/ and run make again to apply the new changes to the build directory. The code will try to search config.yaml in the directory that you run the nrscope command, so either copy the config file to where you want to run the command or just run the command at build/nrscope/src.

@hdtuanss
Copy link
Author

hdtuanss commented Dec 9, 2024

Thanks for trying our tool! As a complement to Xuyang's response, I have the following comments. In the CMakeLists.txt in the root directory, there are two lines of code that will copy the config.yaml file from /nrscope/config/ to the build directory, when you run the make command:

configure_file(${PROJECT_SOURCE_DIR}/nrscope/config/config.yaml
${CMAKE_CURRENT_BINARY_DIR}/nrscope/src/config.yaml)

So you can edit your config file at /nrscope/config/ and run make again to apply the new changes to the build directory. The code will try to search config.yaml in the directory that you run the nrscope command, so either copy the config file to where you want to run the command or just run the command at build/nrscope/src.

Thank you for your answer, it can run well now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants