Compare commits

...

4 Commits

Author SHA1 Message Date
Moritz Rosenthal 8e34c700a6 Added definition of GPSACP message element (#10) 2017-05-30 16:19:46 +02:00
Andreas Schultz cc55da831b
release v1.4.1 2016-11-15 15:15:45 +01:00
Tobias Hintze 848b01e53c Merge remote-tracking branch 'gh/split-wtp-patches' 2016-11-15 12:07:27 +01:00
Andreas Schultz 890a2af6bb split STA deletion into immediate and delayed action
When sending a DeAuthentication frame to a STA we have to wait
a bit to make sure the driver has actually delivered the frame.
Once we get the DeAuthetication frame from a STA, we can stop
waiting and delete the STA.
2016-11-11 13:32:44 +01:00
3 changed files with 94 additions and 11 deletions

View File

@ -3,6 +3,15 @@ FreeWTP
Open Source CAPWAP WTP implementation
Version 1.4.1 - 15 Nov 2016
---------------------------
* fix endianness buf in RSNE processing
* command line fixes/enhances
* updated kernel patches for plain upstream and OpenWRT/LEDE
* remove some left over references to SmartCAPWAP
* fix STA removal (make sure the DeAuthentication frame is sent)
Version 1.4.0 - 22 Aug 2016
---------------------------

66
docs/GPSACP.md Normal file
View File

@ -0,0 +1,66 @@
# GPSACP message
GPSACP messages are defined in [WTP - SCG Reference Points](https://www.hochbahn.de/hochbahn/wcm/connect/de/1d8945fd-174c-447a-85a5-4a8424406b5a/Lieferung%2Bvon%2BWLAN%2BRoutern%2BAB%2B17.12.2016.pdf?MOD=AJPERES&CACHEID=ROOTWORKSPACE.Z18_JH8I1JC0L05M10AEB6TSP430A1-1d8945fd-174c-447a-85a5-4a8424406b5a-lLovXv0) can be sent within WTP Event Requests.
## Definition GPS Last Acquired Position
The GPS Last Acquired Position contains the output of the AT$GPSACP command from an WWAN Modem.
### Format
```
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Timestamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| WWAN Id | GPSACP ....
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```
**Vendor Id** 18681 (Travelping GmbH)
**Type** 15
**Length** >= 5
**Timestamp** The WTPs time when the meassurment was recorded
**WWAN Id** WWAN Interface Id, used to differentiate between multiple WWAN interfaces, MUST be between
one (1) and 16.
**GPSACP** The full output (including the starting $GPSACP) of the AT$GPSACP command the WWAN Interface:
```
$GPSACP:<UTC>,<latitude>,<longitude>,<hdop>,<altitude>,<fix>,<cog>,<spkm>,<spkn>,<date>,<nsat>
<UTC>: HHMMSS
HH: Hour of day (00..23)
MM: Minute (00..59)
SS: Second (00..60)
<latitude>: ddmm.mmmmD
dd: Degree (00..90)
mm.mmmm: Minutes with decimal fraction (00.0000 .. 59.9999)
D: Direction (N|S)
<longitude>: dddmm.mmmmD
dd: Degree (00..180)
mm.mmmm: Minutes with decimal fraction (00.0000 .. 59.9999)
D: Direction (W|E)
<hdop>: xx.x
xx.x: Horizontal dilution of precision in m (00.0..99.9)
<altitude>: xxxx.x
xxxx.x: Altitude above sea level in m (0000.0..9999.9) - Empty value for negative values.
<fix>: x
x: Fix status (0: No fix, 1: 2D, 2: 3D)
<cog>: xxx.x
xxx.x: Course over ground (000.0 .. 359.9)
<spkm>: xxx.x
xxx.x: Horizontal speed in km/h (000.0 .. 999.9)
<spkn>: xxx.x
xxx.x: Horizontal speed in knots (000.0 .. 999.9)
<date>: ddmmyy
dd: Day (01 .. 31)
mm: Month (01 .. 12)
yy: Year (00 .. 99)
<nsat>: xx
xx: Number of satallites in view (00 .. 99)
```

View File

@ -387,6 +387,20 @@ static void wifi_station_clean(struct wifi_station* station)
station->supportedratescount = 0;
}
/* */
static void wifi_station_schedule_delete(struct wifi_station* station)
{
ASSERT(station != NULL);
/* */
log_printf(LOG_INFO, "Schedule Delete station: " MACSTR, MAC2STR(station->address));
/* Delay delete station */
station->timeout_action = WIFI_STATION_TIMEOUT_ACTION_DELETE;
station->timeout.repeat = WIFI_STATION_TIMEOUT_AFTER_DEAUTHENTICATED / 1000.0;
ev_timer_again(EV_DEFAULT_UC_ &station->timeout);
}
/* */
static void wifi_station_delete(struct wifi_station* station)
{
@ -395,13 +409,9 @@ static void wifi_station_delete(struct wifi_station* station)
/* */
log_printf(LOG_INFO, "Delete station: " MACSTR, MAC2STR(station->address));
/* */
/* Free station into hash callback function */
wifi_station_clean(station);
/* Delay delete station */
station->timeout_action = WIFI_STATION_TIMEOUT_ACTION_DELETE;
station->timeout.repeat = WIFI_STATION_TIMEOUT_AFTER_DEAUTHENTICATED / 1000.0;
ev_timer_again(EV_DEFAULT_UC_ &station->timeout);
capwap_hash_delete(g_wifiglobal.stations, station->address);
}
/* */
@ -508,7 +518,7 @@ static void wifi_wlan_deauthentication_station(struct wifi_wlan* wlan,
wifi_wlan_send_mgmt_deauthentication(wlan, station->address, reasoncode);
/* delete station */
wifi_station_delete(station);
wifi_station_schedule_delete(station);
}
/* */
@ -585,9 +595,7 @@ static void wifi_station_timeout(EV_P_ ev_timer *w, int revents)
station->timeout_action);
if (station->timeout_action == WIFI_STATION_TIMEOUT_ACTION_DELETE) {
/* Free station into hash callback function */
wifi_station_clean(station);
capwap_hash_delete(g_wifiglobal.stations, station->address);
wifi_station_delete(station);
return;
}
@ -1574,7 +1582,7 @@ wifi_wlan_receive_ac_mgmt_deauthentication(struct wifi_wlan* wlan,
/* Delete station */
station = wifi_station_get(wlan, frame->da);
if (station)
wifi_station_delete(station);
wifi_station_schedule_delete(station);
return 1;
}