open-afc-project / openafc

Other
8 stars 3 forks source link

Format for RASdatabase.dat file #115

Closed diptivete closed 1 month ago

diptivete commented 1 month ago

Hello,

I'm from Nokia. Could you please share the format for RASdatabase.dat file and the procedure to generate it? I looked up the documentation in database_readme file, but only see that it is to be retrieved from FCC 47 CFR Part 15.407

uls-downloader service is erroring out for me with 'FileNotFoundError' which my guess is the result of previous error from running uls-script executable (Coalition ULS Processing Tool Version 1.3.0) -

terminate called after throwing an instance of 'std::runtime_error' what(): ERROR: Unable to process inputFile line 8641817, unrecognized: "US:xxx"

Interactive = False Include UNII-5 US = True Include UNII-6 US = False Include UNII-7 US = True Include UNII-8 US = False Combine Antenna Region = False Region = US:CA WFA = False Process US = True Process CA = True Traceback (most recent call last): File "/mnt/nfs/rat_transfer/daily_uls_parse/daily_uls_parse.py", line 1167, in daily_uls_parse("/mnt/nfs/rat_transfer", interactive) File "/mnt/nfs/rat_transfer/daily_uls_parse/daily_uls_parse.py", line 926, in daily_uls_parse fixBPS(fullPathCoalitionScriptOutput, modcodFile, bpsScriptOutput) File "/mnt/nfs/rat_transfer/daily_uls_parse/fix_bps.py", line 72, in fixBPS with open(inputPath, 'r') as f: ^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nfs/rat_transfer/daily_uls_parse/temp/FS_2024-07-31T15_28_53.725826_UniiUS57.csv'

Thanks for your help.

farinazedalat commented 1 month ago

Hello, The RASdatabase.dat is no longer used. Instead, the RAS data is integrated in the sqlite3 FS database. It's not in the .csv file that the error is pointing to. Why did you think this has to do with the RAS database?

In any case, attached below is the format of the RAS database that will be in the sqlite3 file. This corresponds to the ULS/ISED-RAS snapshot for the FCC lab testing. RAS_2023-04-21T19_51_03.414800.csv

Does this answer your question?

diptivete commented 1 month ago

Hello @farinazedalat,

Thank you for taking time to look at the question.

Where should we put this RAS_*.csv file? I had added a dummy RASdatabase.dat file with single line entry "xxx" under "/var/databases/RAS_Database" folder on host filesystem.

I see below error in the logs during the execution of uls-script (Coalition ULS Processing Tool Version 1.3.0) with same "xxx" pattern that I have in the dummy RAS database.dat file which made me think the issue is related to invalid format that I have in RASdatabase.dat file - terminate called after throwing an instance of 'std::runtime_error' what(): ERROR: Unable to process inputFile line 8644668, unrecognized: "US:xxx"

farinazedalat commented 1 month ago

Hi @diptivete , My colleague will respond to your question this Thursday. He will instruct on how to properly create the RAS database in the FS database. Hope that's OK.

diptivete commented 1 month ago

Ok, thank you Farinaz. That would be really helpful.

mmandellrkf commented 1 month ago

RASdatabase.zip

The issue here is the "xxx" pattern in the dummy RASdatabase.dat file. The RASdatabase.dat file has a specific format. It is like a CSV file, except the field delimeter is not a comma "," but rather the pipe symbol "|". This was done because other files provided by the FCC use "|" as the field delimiter and using a similar format for the RAS data simplifies processing. The first field of the RASdatabase.dat file must be "RA". Placing "xxx" in the file makes the program see the first field as "xxx", the uls processor then exits with error and does not generate a file for subsequent processing, and subsequent processing exits with a file not found error.

Attached is the file RASdatabase.zip, which when unzipped, contains the single file RASdatabase.dat. Replacing the dummy file with this RASdatabase.dat file should resolve the issue.

diptivete commented 1 month ago

Thank you @mmandellrkf for detailed explanation about the expected format of RAS database file. The dat file you provided with correct format helped resolve the issue. Thanks again to both Farinaz & you for your time and support.