init-ifupdown: p2plink: allow to set persistent parameters
Use ifupdown variable 'p2p-network-id' to pass a WPA supplicant network
id, to pre-populate some parameters (SSID/passphrase) when creating the
group where this device is the GO.
Also replace go_intent=7 with the auto parameter. According to the
documentation:
"auto" can be used to request wpa_supplicant to automatically
figure out whether the peer device is operating as a GO and if so,
use join-a-group operation rather than GO Negotiation.
https://jira.digi.com/browse/DEL-6741
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
73190ee6d4
commit
7013acc439
|
|
@ -24,6 +24,7 @@
|
|||
# p2p-freq <channel-freq>
|
||||
# p2p-local-address <local-ip>
|
||||
# p2p-local-netmask <local-netmask>
|
||||
# p2p-network-id <wpa_supplicant_conf P2P network ID>
|
||||
#
|
||||
|
||||
# Execute only for the p2p0 interface
|
||||
|
|
@ -54,7 +55,7 @@ if [ "${MODE}" = "start" ]; then
|
|||
|
||||
# Peer found, establish the link
|
||||
log info "establish P2P link"
|
||||
wpa_cli -i"${IFACE}" p2p_connect "${IF_P2P_PEER_MAC}" pbc go_intent=7 ${IF_P2P_FREQ:+freq=${IF_P2P_FREQ}}
|
||||
wpa_cli -i"${IFACE}" p2p_connect "${IF_P2P_PEER_MAC}" pbc ${IF_P2P_NETWORK_ID:+persistent=${IF_P2P_NETWORK_ID}} ${IF_P2P_FREQ:+freq=${IF_P2P_FREQ}} auto
|
||||
for _ in $(seq 20); do
|
||||
if wpa_cli status 2>&1 | grep -qs "^wpa_state=COMPLETED$"; then
|
||||
if wpa_cli status 2>&1 | grep -qs "^mode=P2P GO$"; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue