Hello Daniel,

thanks for your feedback :+1:

Or where do I have to start?


This could be done by introducing a new type of UCI section,
'wifi-credential' which can be listed in the 'wifi-iface' section of a
station interface.

The way I see it, we have to hook into here [1] for the sta mode.
Now I am not sure if this is also useful for other modes for example mesh.

In the whole mac80211 layer there is no 'config_load' call.
All data settings are added via json.
So I do not have the new section 'wifi-credential' available to get the additional network options from the json config. I now only have the new uci list option ( I named it 'networks') for the interface that points to the new 'wifi-credential' section to add an additional network config section to the wpa_supplicant config.

May config would looks like this:

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'sta'
        option encryption 'psk2+tkip'
        option key 'nas21234'
        option network 'nas2'
        option ssid 'nas2'
        option autoscan_periodic_interval '600'
        list networks 'test1'
        list networks 'test2'

config wifi-credential
        option encryption 'psk2+tkip'
        option key 'test1'
        option ssid 'test1'

config wifi-credential
        option encryption 'psk2+tkip'
        option key 'test'
        option ssid 'test'


The question is now who to iterate of the uci option 'networks' of the 'wifi-iface' to get the 'wifi-credential' and hand them over to the wpa_supplicant_add_network [2] function.
In this function, all options are read from the config json object.

Is the procedure here that I have to implement this as in this Commit [3].
And also have to update netifd as in this commits [5] [6].

So that we can use a new uci section wifi-credential via json?

Kind regards

Florian

[1] https://github.com/openwrt/openwrt/blob/master/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh#L641 [2] https://github.com/openwrt/openwrt/blob/master/package/network/services/hostapd/files/hostapd.sh#L928 [3] https://github.com/openwrt/openwrt/commit/5aa2ddd0d6b9759c62bbb7bb11b72a7f4269c16b#diff-0524cbcb28eb9c9b7a08dd8c38f9b88ab8dab0af51bae8ca63e1124090008907 [4] https://git.openwrt.org/?p=project/netifd.git;a=commit;h=a56b457656218e5b6142b6238286ea54801ac4b2
https://git.openwrt.org/?p=project/netifd.git;a=commit;h=4ce33cee34e413f69082a80a833f3ed1baf8a761
[5]

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to