Connect wifi direct ,GO with 5GHZ frequency

https://raspberrypi.stackexchange.com/questions/122165/connect-wifi-direct-go-with-5ghz-frequency

I can connect with 2GHZ frequency and can transfer data successfully using WIFI DIRECT. In this connection, I have a data transfer rate is only 2MB/s.

By online search, I found that if we use the 5GHZ range then we can achieve more data transfer rate.

CONFIGURATION FILE

ctrl_interface=/var/run/wpa_supplicant
update_config=1
device_name=ABC_123
device_type=10-0050F204-1

COMMAND

wpa_supplicant -iwlan0 -Dnl80211  -c/usr/share/wl18xx/wpa_supplicant.conf

p2p_group_add freq=5
rfkill: Cannot open RFKILL control device
OK
> p2p-wlan0-0: interface state UNINITIALIZED->HT_SCAN
Using interface p2p-wlan0-0 with hwaddr 2e:6b:7d:0c:73:61 and ssid "DIRECT-Ij"
random: Only 3/20 bytes of strong random data available from /dev/random
random: Allow operation to proceed based on internal entropy
p2p-wlan0-0: interface state HT_SCAN->ENABLED
p2p-wlan0-0: AP-ENABLED 
p2p-wlan0-0: CTRL-EVENT-CONNECTED - Connection to 2e:6b:7d:0c:73:61 completed [id=0 id_str=]
P2P-GROUP-STARTED p2p-wlan0-0 GO ss freq=5240 go_dev_addr=2c:6b:7d:0c:73:62
<3>P2P-GROUP-STARTED p2p-wlan0-0 GO ss freq=5240 passphrase="XTruyGDt" go_dev_addr=2c:6b:7d:0c:73:62
<3>CTRL-EVENT-SCAN-RESULTS

Group is started with 5GHZ frequency but it is not discoverable in remote devices. In the remote device, I\'m using wifi-radar inside ubuntu.

If I start a group with p2p_group_add freq=2 then it is showing in wifi-radar with the added group name(DIRECT-Ij).

I have also set operating frequency using p2p_oper_channel=32 but there is no effect in the wifi-radar analysis. Whereas it displays another accesspoint channel with 5GHZ.

I need expert advice on the below questation.

Please guide on configuration parameter require to set frequency/channel.
What is the command sequence to set frequency 5GHZ.
Please give the tool name to test frequency on Linux(Ubuntu) platform.

Thank you.

====================================================================

A year or longer ago, I found my Rpi buster could only connect to 2GHz channel of my NetGear 2/5G WiFi router, but not 5GHz channel. I googled and read linux experts saying that there was a software bug and could NOT be fixed, unless software updated later. A month ago I upgraded to the latest buster update and found the problem disappeared, without me making any config changes. My problem might not apply to your case. But there is no harm doing buster full upgrade/update and see if problem solved. Good luck and cheers. –

tlfong01

Mar 12 \'21 at 11:21

@tlfong01 thank you for your time. can you please share your steps sequence and configuration file in the answer section –

bhvn

Mar 12 \'21 at 11:47

Ah, my WiFi 2GHz/5GHz experience only applies to Rpi3B+/Rpi4B stretch/buster. I don\'t have any practical experience in Ubuntu, so I am sorry I might not be able to help. I do vividly remember that I read the above 5GHz bug in Rpi OS in another Rpi forum: raspberrypi.org/forums/viewforum.php?f=37&start=8250. I would suggest you go there where you can find help in linux related stuff. Good luck and cheers. –

tlfong01

Mar 12 \'21 at 12:14

@tlfong01 I need steps for Rpi not for ubuntu. In ubuntu, I\'m only run monitoring tools like wifi-radar. if you provide steps for Rpi then it will greatly help to me. –

bhvn

Mar 12 \'21 at 12:56

Let me see. My config is summarized below: (1) Rpi4B buster, (2) NetGear Wifi Router 2GHz/5GHz. (3) So I read the Netgeat WiFi 2/5GHz router, and set up two Channels, (a) 2GHz, (b) 5GHz. (4) I used my SamSung C9 Pro mobile phone to connect to either 2GHz channel or 5GHz channel, no problem at all. (5) Then I tried to connect my Rpi4B to the two channels. I found the 2GHz channel OK, but the 5GHz could not be connected. (6) So I asked my question on rpi.org.forum and a couple of linux experts told me that there was a bug in the rpi raspbian version at that time. / to continue, ... –

tlfong01

Mar 12 \'21 at 13:38

(7) So I give up and wait for a debugged version. (8) Fast forward to 2021 Feb, I downloaded and installed a fresh copy of Rpi OS, and found I could connect to the 2GHz or 5GHz channel without any problem. (9) I used the GUI Desktop to setup the connection. I did not use any CLI comnands. (10) If you setup like me, you will get the /boot/config.txt like mine. –

tlfong01

Mar 12 \'21 at 13:46

I am sorry I could not have my Rpi4B in hand to get the /boot/config.txt, or do any CLI command for you to compare, because I have been playing my two Rpi Pico\'s with Thonny IDE for weeks (No Rpi buster any more), and my Rpi4B\'s with all the hardware sensors are disconnected. –

tlfong01

Mar 12 \'21 at 13:51

Do you need to add the country code to wpa_supplicant.conf (e.g. for the UK country=GB)? The 5Ghz frequencies are determined by country legislation and more restricted by the country defined in this file that the 2.4Ghz range (top end freq are not available in some areas). –

user130616

Mar 12 \'21 at 18:09

@Andrew, Ah yes, your reminder is helpful, but I am afraid not applicable in our No 5GHz problem. When I googled for a answer when I first encountered the problem, I saw many helpers pointing out this cause of trouble. However, I did like every time gave the locale/country data when setting up my first SD card installation. Actually it took hours to double check that it was not related to rpi. It was later when I visited rpi.org.forum that the linux experts pointed out that it was a linux software problem, and could not fixed until the next release. / to continue, ... –

tlfong01

Mar 13 \'21 at 1:14

Actually I waited and tried a couple of later buster releases but found the no 5G bug was still there, so I gave up trying. It was only recently when I tried again and found the problem disappeared. –

tlfong01

Mar 13 \'21 at 1:15

@Andrew, Yes.. I have also used it with country code US. But it gives the same result that\'s why it is removed from the configuration file (:- Thank you for your time :-) –

bhvn

Mar 15 \'21 at 7:13