Very basic wifi 4x clients + AP ... no internet needed!

Heya, I've been strugelling with this on and off for years now - it should be so simple!

I need to setup a WR703N as a client for an existing network that listens for websocket and HTTP requests on port 7890 from any remote host - https://github.com/nemik/fadecandy-openwrt

I can get the 703N setup as an access point no problem but cannot for the life of me configure it to connect to another router. The final setup will have at least 4x 703Ns connected to an AP (not openwrt). My laptop will then connect to this and send data for lighting control

please can someone shed some light on the configuration for a basic client mode - ideally with a static IP. There is no need for internet connectivity or use of the ethernet port - all will be done via wifi and data is fed out via the usb socket.

Cheers
Rich

The important thing to know here is that a client of a regular AP cannot be in a bridge such as the LAN is. It needs to be its own network by itself.

Usually when Internet access is the primary function, the wifi would be WAN and the existing LAN would support a wired user routing out to the WAN. Here you don't need that sort of function, so you can just make another network (not a bridge), give it a static IP (that doesn't overlap the LAN) and put it in the lan firewall zone.

If you do go with conventional LAN and WAN, the LAN and WAN still need to have different IP subnets. The default firewall wan configuration rejects incoming connections, so you will need to open each port on the firewall to accept connections from the wan network. Typically that would be port 22 for SSH, 80 for http, and 7890 for your custom application.

A mesh topology could also be considered. Here there would be a mesh interface that is bridged into the LAN, and when the node is brought up it becomes part of a larger LAN.

2 Likes

info from the router:

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11ng'
        option path 'platform/ar933x_wmac'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'wan'
        option mode 'ap'
        option ssid 'mirrors'

        option encryption 'psk2'
        option key 'Badger101'


- /etc/config/wireless 1/22 

        option leasetime '12h'                   
        option ignore '1'                        
        option dhcpv6 'hybrid'               
        option ra 'hybrid'          
        option ndp 'hybrid'         
                                           
config dhcp 'wan'                                
        option interface 'wan'                   
        option start '100'                       
        option limit '150'                       
        option leasetime '12h'                   
                                                 
config odhcpd 'odhcpd'                           
        option maindhcp '0'                      
        option leasefile '/tmp/hosts/odhcpd'     
        option leasetrigger '/usr/sbin/odhcpd-update'
                                                     
config dhcp 'wan6'                                   
        option dhcpv6 'hybrid'              
        option ra 'hybrid'                           
        option ndp 'hybrid'                 
        option master '1'                            
                                                     
- /etc/config/dhcp 45/45 100%


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

config interface 'lan'
        option ifname 'eth0'
        option proto 'dhcp'
        option gateway '192.168.0.254'
        option dns '192.168.0.254'
        option ipaddr '192.168.2.1'

config interface 'wan'
        option ifname 'wlan0'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

- /etc/config/network 1/20 5%

there is nothing in firewall

Quite a bit wrong here.

  • The wifi interface that connects wan to the main router must be mode 'sta' not AP.
  • Do not run a DHCP server on wan.
  • wan should be either DHCP client or static IP with an IP in the range of but different last number than the main AP and its other clients.
  • lan should be static IP with a different IP range than wan.
  • Do run a DHCP server on lan.

Points 2, 4, and 5 are the default configuration and point 3 is a minor change. When someone has been trying many different configurations unsuccessfully it is advisable to reset to default and start over.

3 Likes

Thanks so much!!

got it figured out and sorted - now happily sending data over wifi to 3x usb fadecandy devices and leds are all in sync!!

Total game changer for my larger installations - thanks again

Just realised while I can use the router no problem over wifi my LAN settings are incorrect as I cannot ssh into it over ethernet...

I'm not sure what relationship gateway, dns and the ip address should have to each other, I've tried a few variations and even removing them but no dice yet. Any tips or suggestions?

This isn't critical as the WAN works but I'd like to understand it more for the future - cheers

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

config interface 'lan'
        option ifname 'eth0'
        option proto 'static'
#       option gateway '192.168.0.254'
#       option dns '192.168.0.254'
        option ipaddr '192.168.0.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'wlan0'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

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