I’m trying to identify which routers use TR-181 and which use TR-098. Since both of these data models fall under the TR-069 standard, I’m looking for a reliable way to distinguish between them based on the protocols or characteristics used by the routers.
Does anyone have suggestions or best practices for identifying or differentiating between routers that use TR-181 versus TR-098 within GenieACS?
TR-069 routers will use InternetGatewayDevice. and TR-181 will use Device. for parameter names. TR-098 is built on TR-069, so its going to be using InternetGatewayDevice. for the root of the parameter names.
Yeah, I’m aware that TR-098 uses InternetGatewayDevice. as the root and TR-181 uses Device..
Here’s the scenario: suppose a router initially used TR-098, but later its data model switched to TR-181. Now the device shows both the new parameters under the Device. model and the old parameters under InternetGatewayDevice..
So my question is: How can I create a virtual parameter or a flag that clearly indicates whether a device is currently using TR-098 or TR-181?
In other words, I want a reliable, programmatic way to identify the active data model the device is using, regardless of any legacy parameters it might still expose.
// Retorna o DataModel do dispositivo
// Returns the device's DataModel
// RSCM stands for RAISECOM, and yes, they broke everything by
// mistyping an uppercase "W" in their DataModel definition :person_facepalming:
let m = 'NA';
let tr098 = declare("InternetGatewayDevice", {value: Date.now()});
let tr181 = declare("Device", {value: Date.now()});
let rscm = declare("InternetGateWayDevice", {value: Date.now()});
//
if (tr098.size) {
for (let p of tr098) {
if (p) {
m="tr098"
break;
}
}
}
else if (rscm.size) {
for (let p of rscm) {
if (p) {
m="rscm"
break;
}
}
}
else if (tr181.size) {
for (let p of tr181) {
if (p) {
m="tr181"
break;
}
}
}
return {writable: false, value: [m , "xsd:string"]};