XML API and MAC address collection

Started by Tony

Tony

XML API and MAC address collection   24 March 2015, 06:39

Andrew, I must say that the recent changes have really improved the BWM for my application.

I have searched for information on the API to the database and it all seems quite old. I would love a way to automate adding Mac addresses, email addresses and possibly passwords, and change quotas within rules from an external program.

Is there something you can point me to, or some additional information on how this could be done?

Also possibly as a separate product, it would be great if there was web interface I could point users to, that logs their MAC address and associates it with a rule. If a user has say up to 5 - 6 computers it would be great if they could click on a local web page and add these the their rule. I understand that Mac addresses are only available on the local LAN segment.

Thanks in advance.
smile
Tony

Re: XML API and MAC address collection   24 March 2015, 06:42

Actually thinking about that a little more... As a minimum, could the users visit the web usage page, and enter that info? Even if it is only their email address.
SoftPerfect Support forum - Andrew avatar image

Re: XML API and MAC address collection   24 March 2015, 10:27

You can directly read and write any BM data and this can be done in two ways:

1. Direct reading of the database. BM uses a standard SQLite 3 database that can be read from many programming languages and environments. You can find it in the path shown on the Storage tab:

SoftPerfect support forum

Grab any SQLite management tool like SQLiteSpy and you can read this database in any way you like as well as write into it. You will need to restart the BM service for any changes to take effect.

2. There's a XML-based API, for which however we don't have any official documentation. For that you'd have to use a sniffer to trace the exchange between the BM management console and the bandwidth management service. The protocol is pretty much self-explanatory.

For your purposes, accessing the database may be easier. As to capturing user details such as MAC address, e-mail, etc, it may be possible in the future as we'd like to add some captive portal functionality over time.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 ********   ******   **     **  ********  **    ** 
 **        **    **  **     **  **         **  **  
 **        **        **     **  **          ****   
 ******    **        *********  ******       **    
 **        **        **     **  **           **    
 **        **    **  **     **  **           **    
 ********   ******   **     **  **           **    

Message: