Commit graph

29 commits

Author SHA1 Message Date
Polynomialdivision
05565ae1e2 datastorage/uci/msghandler/ubus: add steering with beacon reports
The AP periodically asks all clients in the environment with what signal
strength they see the other APs. Instead of the RSSI, which can only be
collected if the client scans, the 802.11k values are much more
up-to-date.

In the future it will no longer be necessary to exchange all
probe request frames with all APs, which will significantly reduce the
message overhead and complexity.

Right now there is the issue that clients react very strangely to
becaon requests or they do not react at all.

The client will hopefully report back the RCPI or the RSNI.

Theoretically the values can be converted into each other and so
compared, but this did not work well in self-experiments. Therefore, we
compare the values like the rssi.

We introduce
- rcpi: value that is added to the AP score if rcpi is above rcpi_val
- rcpi_val: threshold that indicates a good rcpi value
            (between 0 and 255)
- low_rcpi: value that is added to the AP score if rcpi is under
	    low_rcpi_val (use a negative value)
- low_rcpi_val: threshold that indicates a bad rcpi value
                (between 0 and 255)
- rsni: value that is added to the AP score if rsni is above rsni_val
- rsni_val: threshold that indicates a good rsni value
            (between 0 and 255)
- low_rsni: value that is added to the AP score if rsni is under
            low_rsni_val (use a negative value)
- low_rsni_val: threshold that indicates a bad rsni value
                (between 0 and 255)
I have to find out values for each parameter myself. So please take a
look at the dawn-hearingmap and if you have a good setting, you can send
it to me.
2020-09-07 11:07:51 +02:00
Polynomialdivision
b639145ce9 ubus: fix rrm string callback function
The rrm_nr_get_own call returns an array. We need the 3rd value. We do
not need to call blobmsg_data before blobmsg_get_string to extract the
value. Additionally this causes strange behavior where an offset in the
string is accessed.
2020-09-03 03:45:25 +02:00
Polynomialdivision
c2c0009d61 datastorage: fix hearingmap not synced
The datastorage-refactoring changes an already existing entry instead
of inserting and deleting it. However, it was forgotten to adopt
some information from the new probe entry.

The ht_capabilities and vht_capabilities are now synced correctly.

RCPI and RSNI is now correctly synced.
2020-08-26 12:05:50 +02:00
Polynomialdivision
25a493c438 tcpsocket: add option to add server ip
A new config option allows to add a server ip
	option server_ip '10.0.0.2'

However, this server does not send anything back. Therefore it is not
possible to change the node configuration. This will probably be added
soon. The main goal of this commit is to allow monitoring of all nodes
in a network with DAWN, e.g. clients, channel utilization, ...

Also a network option (3) has been added which allows to use TCP but
not to announce your daemon in the broadcast domain. This allows you to
create a monitor-only node that holds only the local information and
forwards it to the central server.

A monitor-only node could be configured like
	option server_ip '10.0.0.1'
	option tcp_port '1026'
	option network_option '3'

Another possible config is
        option server_ip '10.0.0.1'
        option tcp_port '1026'
        option network_option '3'
Here, the node shares information with a central server, which can be
located outside the broadcast domain. Nevertheless, it also shares
information within its broadcast domain and can therefore perform
client steering.
2020-08-21 23:03:56 +02:00
Ian Clowes
117a340b9d datastorage: fixes to linked list handling
general: fixed whitespace and typos
memory audit: on by default in build
memory audit: enhanced audit info
ubus: refactor denied_req expiry to assist datastorage testing
datastorage: fixed performance bug in handling of linked list entry expiry
datastorage: fixed SEGV in skip list handling
test_storage: added linked list memory allocation stress tests
2020-08-05 12:30:19 +02:00
Ian Clowes
34da5328f6 memory auditing: bug fixes to memory auditing and hearing map
memory auditing: refined auditing code and use in main code
hearing map: fixed bug causing it not be be built correctly
datastorage: fixed memory leak from linked list handling
2020-08-05 12:29:47 +02:00
Ian-Clowes
d56c5c4e15 general: add memory auditing
memory_utils: added to wrap memory alloc / free
general: adjusted stabdard and other memory allocs t be audited
2020-08-05 12:28:49 +02:00
Ian Clowes
7262cf02d0 datastorage/test: improve scalability and performance
datastorage: convert to linked lists and optimise use of pointers
datastorage: AP, client, probe, auth entry and MAC list converted to
             linked list
datastorage: functions adjusted to take pointers as parameters
datastorage: optimised sort and search functions added
mac_utils: struct dawn_mac added and comparisons adjusted
general: adjust code to  call new datastorage functions
test_storage: large scale 100 AP, 3000 client, 70k probe added

[fix commit]
Signed-off-by: Nick Hainke <vincent@systemli.org>
2020-08-04 09:50:48 +02:00
Ian Clowes
67c3ed0d0a test_storage: extend test harness; datastorage: two bug fixes
datastorage (bug fix): deleting expired array item would fail to test next item
test_storage: extended to cover all required datastorage entry points
test_storage: added ability to read script file
test_storage: added new and revised test scripts
TESTING.md: added to describe testing approach
general: added various TODO notes on things to come back to
general: revised #includes to make each "self-compiling"
general: revised #includes to minimise usage across source files
general: moved declarations and defintions to simplify and rationalise code
datastorage: refactor to support scalability testing
datastorage: made independent of time() calls to support testing
datastorage: fixed redundant use of both SORT_NUM and SORT_LENGTH defines
datastorage: fake kicking to test clients move between access points
msghandler: new module to reduce compile time interdependencies
mshhandler: (issue #100?) fixed SEGV memcpy() in dump_client() using strncpy()
ubus: merged uface into ubus
mac_utils: new module for MAC address utilites
test_header: added target to help #include rationalisation

Tested-by: Nick Hainke <vincent@systemli.org>
2020-07-12 13:47:23 +02:00
Polynomialdivision
77619e9b18 ubus: use strncpy and add backwards compatibility 2020-06-09 13:00:07 +02:00
Polynomialdivision
ffa08dbccd ubus/uci/datastorage: add iface and hostname
The network overview now displays the interface name and hostname.
2020-06-09 11:19:56 +02:00
Polynomialdivision
534f786616 ubus: fix wrong parsing policy 2020-06-06 09:09:09 +02:00
twy_2000
5ce4c978c8 ubus/datastorage: don't repeatedly ask devices for beacon reports if they don't support it 2020-06-01 18:47:00 +02:00
Polynomialdivision
71536468ff uci: fix loading of config 2020-06-01 10:15:58 +02:00
twy_2000
b5043ad98e utils/ubus: fix memory leak at blobmsg_format_json 2020-05-30 17:52:17 +02:00
Polynomialdivision
f603dde7f7 ubus: add local flag to network overview 2020-05-30 08:55:52 +02:00
Polynomialdivision
26745815e8 ubus: fix network overview 2020-05-30 08:48:33 +02:00
Ian Clowes
50d347c233 datastorage: refactor to support scalability testing 2020-05-28 00:29:15 +02:00
twy_2000
2d1a6f9c0c ubus: filter out global interface 2020-05-21 10:21:16 +02:00
twy_2000
73c7998967 ubus: make decide_function consist with configuration
in luci-app-dawn, if eval_probe_req is not ticked, eval_probe_req would be -1.
however, in c language, !(-1) is false.
Since only zero in if statement is false, non-zero number is true.
2020-05-20 15:06:47 +02:00
David Bauer
617080a7c9 ubus: only update TCP socket list when using TCP connections
DAWN currently tries to update it's list of TCP socket endpoints using
mDNS when it is configured to use UDP.

Only update the TCP socket list when DAWN is configured to use TCP
sockets.

Fix a identation mismatch along the way.
2020-04-30 10:56:47 +02:00
Polynomialdivision
2ff3b3017f remove unecessary params and debug output 2020-04-17 12:59:06 +02:00
Polynomialdivision
9c6bc1b2fe fix null mac in beacon-report 2020-04-17 12:58:21 +02:00
Polynomialdivision
a63c723e31 feed hostapd with nr reports 2020-04-17 09:46:12 +02:00
Polynomialdivision
1804d18bf5 allow disable beacon reports timer 2020-04-16 17:32:56 +02:00
Polynomialdivision
0fbef59869 implement 802.11v/k 2020-04-16 15:39:29 +02:00
Polynomialdivision
899eae05f0 survive reboot 2020-04-15 17:37:59 +02:00
Polynomialdivision
5709b96a4d dawn: fix typos 2020-04-10 10:26:54 +02:00
Polynomialdivision
f03f55ff92 first version 2020-03-23 21:22:21 +01:00