Called-Station-Id parameter value in login url not the same as the AP MAC

  • 1
  • Question
  • Updated 3 weeks ago
  • (Edited)
Hello,

I'm trying to do authentication with external captive portal and radius server.
When my captive portal page loads, the url is filled with some querystring parameters  like the "Called-Station-Id" but i noticed that this parameter has not the same value as my AP casing mac address. Is there some way of getting the value of  "Called-Station-Id" from the cloud management platform? I need this, because i recognize what is the AP by it's MAC address.

The generated url is: ?url=E2B8F3578D88E9A53591BB4081984694C7651C985B7B&ssid=%23zooxwifi%5faerohive&mac=18227e27ce40&autherr=0&Called-Station-Id=c413e20130d4&NAS-IP-Address=1.1.1.1&RADIUS-NAS-IP=192.168.4.32&Calling-Station-Id=18227e27ce40&STA-IP=192.168.4.114&NAS-ID=AH-0130c0

As you can see, the Called-Station-Id is: c413e20130d4
My AP casing MAC is: C413E20130C0
The last 2 characters are not the same.

Also, is there some way to decode the "url" parameter?

Thanks!
Photo of Cristiano Sarmento

Cristiano Sarmento

  • 2 Posts
  • 0 Reply Likes

Posted 3 weeks ago

  • 1
Photo of Nick Lowe

Nick Lowe, Official Rep

  • 2491 Posts
  • 451 Reply Likes

Hi Cristiano,

The Called-Station-Id contains a BSSID.

You can calculate the MAC address base via: 

BSSID & ~0x3F = BASE_MAC

Otherwise written as:

BSSID & 0xFFFFFFFFFFC0 = BASE_MAC

Therefore, it is possible to perform the conceptual equivalent of...

if (BSSID_1 & ~0x3F == BSSID_2 & ~0x3F)
{
// Same AP.
}
else
{
// Different AP.
}

You can apply the same mask to the MAC address you see printed on the rear of an AP to get the BASE_MAC.

We do not provide a documented means to decode the URL parameter but we are considering to allow this to be sent unencoded in a future HiveOS update.

Cheers,

Nick

Photo of Cristiano Sarmento

Cristiano Sarmento

  • 2 Posts
  • 0 Reply Likes
Thanks!!