-
Notifications
You must be signed in to change notification settings - Fork 52
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
Ubiquiti airFiber Parser #329
Ubiquiti airFiber Parser #329
Conversation
gt732
commented
Jul 31, 2023
•
edited
Loading
edited
- Added parser for ubiquiti airFiber/airmax radios
- Compliance Tests
- Parser Tests
I think the only thing to consider is the name of the OS. |
@itdependsnetworks I updated the parser to be the OS of the device "airos". Let me know if you need me to update anything else. Thanks for reviewing!! |
@gt732 is the airfiber not running unifiOS? Just curious if this same parser would work for the whole Ubiquiti family that run unifiOS |
@jeffkala I don't have any other ubiquiti devices with me so I can't confirm. I work for a WISP so mostly long distance wireless radios. The airfiber/airmax radios from ubiquiti use a OS called "airOS". The configs for these devices are pretty basic flat files. |
Does appear that the airfiber os config file is slightly different then the standard unifi OS config properties. I'd say in general I'm good with the os name now. Will review the rest of the PR. |
config_lines = [] | ||
config = self.config.strip() | ||
for line in config.splitlines(): | ||
if line and line != "##" and not self.is_comment(line): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't any number of #
a comment line?
ConfigLine(config_line="#board.sysid=0xaf01", parents=()), | ||
ConfigLine(config_line="#board.cpurevision=0x4e840102", parents=()), | ||
ConfigLine(config_line="#board.name=airFiber 24G", parents=()), | ||
ConfigLine(config_line="#board.shortname=AF24", parents=()), | ||
ConfigLine(config_line="#board.subtype=", parents=()), | ||
ConfigLine(config_line="#board.netmodes=16;", parents=()), | ||
ConfigLine(config_line="#board.hwaddr=802AA8CF8DB6", parents=()), | ||
ConfigLine(config_line="#board.reboot=130", parents=()), | ||
ConfigLine(config_line="#board.upgrade=330", parents=()), | ||
ConfigLine(config_line="#board.phycount=1", parents=()), | ||
ConfigLine(config_line="#board.phy.1.maxmtu=1500", parents=()), | ||
ConfigLine(config_line="#board.gps=1", parents=()), | ||
ConfigLine(config_line="#board.airfiber=1", parents=()), | ||
ConfigLine(config_line="#board.portnumber=1", parents=()), | ||
ConfigLine(config_line="#board.fdd=1", parents=()), | ||
ConfigLine(config_line="#feature.gps=1", parents=()), | ||
ConfigLine(config_line="#feature.rssi.leds=0", parents=()), | ||
ConfigLine(config_line="#feature.gps.leds=0", parents=()), | ||
ConfigLine(config_line="#radio.1.name=", parents=()), | ||
ConfigLine(config_line="#radio.1.shortname=", parents=()), | ||
ConfigLine(config_line="#radio.1.bus=spi", parents=()), | ||
ConfigLine(config_line="#radio.1.rf_revision=0x0000", parents=()), | ||
ConfigLine(config_line="#radio.1.subsystemid=0xaf01", parents=()), | ||
ConfigLine(config_line="#radio.1.subvendorid=0x0777", parents=()), | ||
ConfigLine(config_line="#radio.1.txpower.max=43", parents=()), | ||
ConfigLine(config_line="#radio.1.txpower.offset=0", parents=()), | ||
ConfigLine(config_line="#radio.1.antennas=1", parents=()), | ||
ConfigLine(config_line="#radio.1.def_antenna=4", parents=()), | ||
ConfigLine(config_line="#radio.1.antenna.1.id=4", parents=()), | ||
ConfigLine(config_line="#radio.1.antenna.1.name=Combined", parents=()), | ||
ConfigLine(config_line="#radio.1.antenna.1.gain=0", parents=()), | ||
ConfigLine(config_line="#radio.1.ccode=840", parents=()), | ||
ConfigLine(config_line="#radio.1.ccode.fixed=0", parents=()), | ||
ConfigLine(config_line="#radio.1.ccode.locked=1", parents=()), | ||
ConfigLine(config_line="#radio.1.ptp_only=1", parents=()), | ||
ConfigLine(config_line="#radio.1.ptp_sta=1", parents=()), | ||
ConfigLine(config_line="#radio.1.chanbw=100", parents=()), | ||
ConfigLine(config_line="#deac9d0212791db5ede667c016876ba4", parents=()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In similar concept to my previous comment, I wouldn't want these in ConfigLine
as to me I believe these configs are not applied. I'd expect any line starting with a # is a comment line, whether there is 1,2,or 3 of them. Is this not the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gt732 thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkala Sorry for the late reply! Yes correct, I updated the parser to remove the "#" lines.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@gt732 can you get tests working all the way through? |
@itdependsnetworks hey! the black issue should be fixed now. |