RPi4 wifi help please

I am attempting to create a mobile wireless router using a Raspberry Pi 4b. I am attempting to use the onboard wireless radio for the client and an external Canakit ckxw 1000 usb dongle to act as an access point for my family vacation. I am not looking to have a super mega throughput on this but the best speed test I have had to this point has been 3-4 Mbps no matter what I do.

It seems that almost all posts I find in this topic are usually answered with the onboard chip is garbage and to just use a separate access point instead, but that defeats the purpose of what I am trying to accomplish with the "mobile" part of this case. I have turned on packet steering and installed and enable irqbalance with no luck to this point. I can understand the issues for a weak internal chip with no antenna but I can actually get the client and AP to both work just get agonizingly slow rates when I test. Can someone recommend something I have missed possibly? Should I instead use 2 separate usb dongles and remove the internal chip from the equation or is this possibly due to a setting I have missed on? Any suggestions would be welcome sorry ahead of time for being a noob and probably an idiot compared to the majority of folks on this forum.

Yes you are right the on board chip is actual garage

What you can do is use the same usb wifi module and just use it as a client and an ap at the same time

Other then that you did ot provide any configuration
Run the following comands :

uci export network
uci export wireless
uci export firewall

And please remember to hide your public ip, mac adress, and passwords

Or just get rid of the rpi, and get som dual radio gl.inet device for ~$30.

Thank you @dankatapich for the response, and @frollic too :smiley:

I swapped values for the ip's, mac's, and passwords.
Here are the configurations you mentioned, (I have probably broken these about a few dozen ways by now):


package network


config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix '#####'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option force_link '1'

config interface 'wwan'
        option proto 'dhcp'
        option peerdns '0'
        option dns '1.1.1.1 8.8.8.8'

config interface 'vpnclient'
        option proto 'none'
        option device 'tun0'

config device
        option name 'wlan0'

config device
        option name 'wlan1'

package wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '#####'
        option htmode 'HT20'
        option disabled '0'
        option short_gi_40 '0'
        option cell_density '0'
        option country 'US'
        option hwmode '11a'
        option channel 'auto'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '#####'
        option channel 'auto'
        option band '2g'
        option htmode 'HT20'
        option disabled '0'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'MyHotSpot'
        option key 'YouToldMeNotToShare'
        option encryption 'psk-mixed'

config wifi-device 'radio2'
        option type 'mac80211'
        option path '#####'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option disabled '0'

config wifi-iface 'default_radio2'
        option device 'radio2'
        option network 'lan'
        option mode 'ap'
        option ssid 'MyHotSpot'
        option key 'YouToldMeNotToShare'
        option encryption 'psk-mixed'

config wifi-iface 'wifinet3'
        option device 'radio0'
        option mode 'sta'
        option network 'wwan'
        option ssid 'Guest'
        option encryption 'none'

package firewall

config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'
        option flow_offloading '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'wwan'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

Without specific filtering, two radios operating next to each other will jam each other and seriously degrade performance-- possibly even if they are on different bands. An actual dual-band router contains RF filters to avoid this. Selectable dual band endpoints like USB adapters and the Pi built in radio don't have any real filters.

So as suggested it will be better to run the AP and the STA in the same radio, if the USB adapter you have supports that. The radio driver synchronizes operation so that jamming does not occur (though of course the bandwidth is still inevitably cut in half due to sharing the same radio).

True your best case in this scenario is to use the usb dongle as client and Ap at the same time

Other then that i dont see any miss configuration there wich means is a the built in chipset the problem :frowning:

Thank you both. I did some trial and error and got the config to accept a setup for the AP and the client to both use the usb dongle and it doubled the throughput to ~5-6 Mbps. I think now my hold up is that I am using a cheap usb dongle with no antenna attached, and frankly I am using this rpi4 with wireless at all. Starting to understand why all the forums deride the use of these for a AP instead of using as a router in conjunction with a full fledged separate AP. If I use the usb dongle as a client and test throughput from the ethernet it goes up to the neighborhood of about 30Mbps, if I use wired internet connection and the dongle for an AP it still chokes down to 3Mbps with the onboard chip disabled. Going to try a different dongle and see if the results get any better, and will update and then leave you folks alone, feel like I am wasting your time at this point.

It's mainly your time, have fun anyway :slight_smile:

You want one (or two) of these https://github.com/morrownr/USB-WiFi/

1 Like

I ordered a usb dongle with an antenna vs the chip based flat dongles I had been trying. My first attempt using the other dongle as both AP and client had an immediate positive impact in that it doubled my throughoput to ~5-6 Mbps, but using the antenna dongle pushed that to a more usable rabge of ~20Mbps. I did some looking at so many articles that I can not remember where I found the one that pointed out the other issue for the limited power through a pi to push the signal out in the first place. Thank you everyone for your help with this. I hope anyone else who tries to do the same configuration and has the same trouble can see this and get the same help as quickly as you guys gave me.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.