Page 1 of 1
Hotspot $(radius<id>) variables broken again?
Posted: Mon Oct 24, 2011 1:01 pm
by cmacneill
I have read various post on this Forum where the $(radius<id>) variables were broken sometime ago and MikroTik response was "fixed in v4.4". However, I am using v5.6 and they don't seem to work, has this been broken again?
It would be useful if anyone that has these variables working in v5.x could post an example of what actually works for them. Many posts have been inconclusive with no one actually posting something that in the end worked for them.
The documentation appears to imply the the $(radius<id>) variables should be substituted in all Hotspot servlet pages. Is this true or do they only work in a subset? I'm trying to use in status.html and logout.html.
Regards
Chris Macneill
Re: Hotspot $(radius<id>) variables broken again?
Posted: Mon Oct 24, 2011 1:04 pm
by sergejs
Chris, please post your syntax that is used for radius attribute.
Re: Hotspot $(radius<id>) variables broken again?
Posted: Mon Oct 24, 2011 1:22 pm
by cmacneill
Hi Sergejs,
The specific attributes I'm trying to capture are:-
ATTRIBUTE Mikrotik-Recv-Limit 1 integer Mikrotik
ATTRIBUTE Mikrotik-Xmit-Limit 2 integer Mikrotik
ATTRIBUTE Mikrotik-Recv-Limit-Gigawords 14 integer Mikrotik
ATTRIBUTE Mikrotik-Xmit-Limit-Gigawords 15 integer Mikrotik
From your post some time ago, I believe the correct syntax for Mikrotik-Recv-Limit is $(radius1-14988).
Before finding your previous posts I tried many other variants as the documentation isn't too clear, e.g. $(radius<1>-<14988>), $(radius<Mikrotik-Recv-Limit>) and virtually every other permutation I could think of!
I would really appreciate it if you can point me (and others) in the right direction.
Regards
Chris Macneill
Re: Hotspot $(radius<id>) variables broken again?
Posted: Tue Oct 25, 2011 11:03 am
by sergejs
Yes, $(radius1-14988) syntax is correct.
Are you sure Mikrotik-Recv-Limit sent to clients?
Re: Hotspot $(radius<id>) variables broken again?
Posted: Tue Oct 25, 2011 1:18 pm
by cmacneill
Yes, this RADIUS attribute is sent in the reply from the server following a successful authentication. Otherwise the MikroTik Hotspot wouldn't know the data remaining on the user's account. It is displayed in the logs and used internally to determine when to disconnect a user.
What is currently happening is that the variable isn't being substituted at all, i.e. the string "$(radius1-14988)" appears in the HTML page presented to the user. If the variable was being substituted, but not available, I would expect a NULL string to be returned.
Looks to me like the substitution of all $(radiusX-X) variables are failing.
Unfortunately I am away on a business trip now until the end of the week. I will post more debug output then.
This may be related to a problem I reported sometime ago. When using total data for determining user limits the separately defined $(remain-bytes-in) & $(remain-bytes-out) are returned as NULL. I reported this sometime ago, but there was no response to my post on the Forum. Hence with these variables unavailable I've been trying my own workaround using the RADIUS attributes directly.
Regards
Chris Macneill
[SOLVED] Re: Hotspot $(radius<id>) variables broken again?
Posted: Sun Oct 30, 2011 3:23 am
by cmacneill
OK, after further testing it appears RADIUS variables
are working, but just not quite how I expected.
The attributes I was after were actually $(radius17-14988) and $(radius18-14988), these are substituted correctly, but if you select a RADIUS attribute which is not passed from the Server to Client you get the original "$(radius....)" string left in the HTML. I had rather expected that this would return a 0 or NULL value. A little confusing when you're debugging, as the documentation did seem to imply that 0 or NULL would be returned if the variable was unset.
Re: Hotspot $(radius<id>) variables broken again?
Posted: Wed Oct 30, 2013 12:27 pm
by reinierk
The
ONLY syntax accepted is radius<id>-<vendor>
for example: 3com attribute 3Com-Product-ID should be coded as radius255-43 Where 255 is the attribute number from the 3Com dictionary and 43 is the VENDOR id of 3Com.
Standard attributes should be coded with VENDOR 0. For example standard Connect-Info as radius77-0.
Simply specifying radius77 is not processed as documented.
Documentation error on
http://wiki.mikrotik.com/wiki/Manual:Cu ... able_Pages