Is there a way to known if a device is in the midle of an inform via api?

Usually when you do an API call with a connection_request you have a 200 return (if GeneieACS was able to do a connection request) or a 202 (if GenieACS could not perform a connection reuqest). The second one usually means the device is out of reach but sometimes (in my experience) the device is in the middle of an active Inform. Is there a way to know via api if there is an active inform currently happening?

Right now there is not a way.

Is there any plans for this feature? This is something I need for my project, and I’m willing to add this feature myself if nobody is working on it. Would this feature be interesting to the project?

I’m studying the code of the cwmp server and This is the solution I ended up with:
Creating a collection “sessions” with three parameters:

  • device_id (id of the device)
  • active (indicates if the device is currently in session)
  • timestamp (indicates the last time this entry was updated)

My idea is each time the function “processRequest” is called, the “active” value in the “sessions” document is updated to true to indicate the session is ongoing. Each time “endSession” is called the “active” value is updated to false.

Do you guys think it’s better to create a “sessions” collection or to create values in the existing “devices” collection?

as @akcoder said, I don’t think there’s a way. Filtering cwmp log could give you a hint when an Inform event started but not when it ended.

Honestly I don’t really understand the purpose of the Inform event (in fact we have it disabled during normal operation), because if we really need to update some parameter on an specific CPE we can simply make a Connection Request (we are an small ISP at the moment, tomorrow we might have to change it if the situation ask for it).

So here comes the question: Why do you need this ?

The reason is to give better feedback to the end-user. A common case is when the end user do a heavy operation (listing the connected devices of a router for exemple, wich takes a few seconds in some routers depending on the number of connected devices) then trying to change a parameter and getting a “device is offline” message from the GUI witch might led to an incorrect conclusion from the end user. My idea is to show a message akin to “device is busy” when a connectionRequest fails because there is an ongoing inform.

by end-user I guess you are talking about geanieacs management web.

While I think I understand what you mean in general terms I still fail to see why do you need that. Slow operations like refreshing a whole bunch of parameters takes time, that’s why I use two monitors, one with Firefox with the web open and another with a konsole running this command on acs server:

tail -n 200 -f /var/log/genieacs/genieacs-cwmp-access.log

this usually gives me an idea of what’s going on. There’s also the syslog to debug extensions if necessary.

My idea of end-user would be someone who works on a call center and does not necessary know what ACS is. He/She would be interacting with genie trough another program that uses Genie’s API. In your case you have the technical skills to enter in the server, check the log, and have a gasp on whats going on the device. But I can’t assume everyone in a call-center will have this technical skills.

This seems to be doing the trick with me, I tested with the simulator. Tomorrow I’ll test with some real devices.

IMHO that is totally off the mark. I don’t think GeanieACS UI and other tools are meant for average users.

Our customer support team uses a software we made specifically for support which interact with the ACS and OLT to obtain diagnosis parameters. I just finished (yesterday) a of provision which fires download and upload diagnosis on a router, just to see the speed graphs on the software.

edit: clarified.

I’m talking more specifically about the API not the UI. I agree with you that the GenieACS UI is not for the average user. But it’s API can definitely be used for a support team as you stated. ( It might be even used in a smartphone App to change wi-fi, but this is a little bit off-topic).

The ongoingSession flag I added on my fork enable my UI (not GenieACS UI) to tell the support team that the “device is busy” and none of the parameters they are allowed to change (wifi/ssid/channel/pppoe) will take effect immediately.

1 Like

apologies, I did not read that second phrase in your post stating about GenieACS API. In our software I believe we use a timer to disable a control during diagnostics. That’s how we prevent multiple queries to the same CPE from the same user.

Another thing that might be handy is to display a latency graph. We are required to test speed and latency once per quarter for 7 days (7 days for speed, 7 days for latency) with latency being tested every minute and speed every hour. I chart this data in a scatter plot. The line at 100 ms is what we are supposed to be under for our performance testing requirements. Missing entries are because we are not required to test if the cm is using more than 64k down or 32k up.

IPPing is easier to setup, but doesn’t give you as much granular information. UDPEcho requires a UDPEcho server. Here is one I use, albeit stripped out all the boilerplate cruft.

I also have an option in our subscriber mgmt software to manually initiate a test:

Depending on what you are using for a pppoe server or router, you might be able to get real time stats for a particular cm. Our support guys use this graph a lot when a cm calls in saying their internet “doesn’t work.” Usually because they have several cloud services absolutely saturating their upstream.

I also allow the techs to initiate a download/upload test so they can watch the performance of the test real time.

1 Like