From charlesreid1

Widy as an Access Point

This page guides you through setting up the Widy to act as an Access Point and create a wireless network that will allow multiple devices to talk to each other.

The step by step of the setup process:

1. Get access point on and broadcasting

2. Connect to access point from another computer

3. DHCP server on Widy, successfully assigning IP addresses

4. Everyone getting on the wifi network can get a DHCP lease

5. Reproduce from scratch. Luci interface, clear out, start from square one, have DHCP config file in a repo somewhere, widy repo, multi clients communicate via network

Start with the Luci interface. We'll start with a clean slate, and set up the access point and the DHCP service so that our Widy access point will hand out IP addresses properly.

Basic Setup

Start by plugging in the Widy router to the computer via the Ethernet cable. Your computer should be assigned an IP address like 192.168.1.109. Now the Widy router and its web interface (Luci) should be available by typing 192.168.1.1 into your browser.

The first page you'll see is the login page. Start by logging in with your root username and password.

Set Up the AP Interface

Now click Network > Interfaces. You should see this page:

Luci1.png

Create a new interface:

Luci2.png

Call it wrtwifi (or whatever you want) - this is the name the connection will be given in Unix, not the AP's BSSID that will be broadcast. Associate it with your wireless network interface wlan0 (you may need to add a custom interface if you don't have a wlan0 interface listed).

Luci3.png

The next step is to set up the DHCP settings, and govern how IP addresses will be handed out. When configuring the wireless access point, you will set the IP address of the access point, as well as the subnet mask and other details. You should probably stick to 192.168.{0,1}.X and 10.{0,1}.{0,1}.X as your IP address namespaces - if your network is large enough to need subnets, it probably carries enough traffic to need a beefier router.

Luci4.png

Now save the changes. Those will be applied and the page will be updated LIVE:

Luci5.png

Double-Check Associated Clients

Now it's time to double-check that our wireless network can, in fact, receive new clients. Click Network > Wifi, then check the "Associated Stations" list - this is a list of clients connected to the wireless access point.

Luci6.png

Luci7.png

Note that the associated station that is listed is just the direct ethernet connection that we have - nothing to get excited about.

Next, we connect to the freshly-created wireless network, either from the same computer, or from a different computer. Here, I connect to the OpenWrts wireless network, served up by my Widy AP:

Luci8.png

And finally, the payoff - we can see the newly-connected station.

Luci9.png

Problems (Solved)

I can successfully ping machine B from machine A, when the two machines are connected to the Widy wireless network.

I can't SSH into machine B from machine A, or vice versa.

However, I can SSH from machine B into the Widy, and from machine A into the Widy.

Debug notes: Widy/Access Point/SSH

Finished. Debugged. dpkg-reconfigure openssh-server to the rescue!

Other Notes

Test Connection to Access Point

To troubleshoot the process of connecting clients to the access point (for example, if you are connecting but not getting IP addresses), or at least monitor it to make sure it goes as planned, is to connect to the Widy via ethernet, and run tcpdump to monitor the wireless network interface. Then, connect to the OpenWrt wireless network with another computer, and watch the packet traffic that passes through the wireless network interface. You should see some DHCP requests and BOOTP requests, which is the new computer that is connecting to the wireless network getting an IP address.

$ tcpdump -i wlan0
09:10:46.662109 00:21:6a:07:17:14 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
09:10:46.663583 EAPOL key (3) v2, len 95
09:10:46.672735 EAPOL key (3) v1, len 117
09:10:46.674190 EAPOL key (3) v2, len 151
09:10:46.677946 EAPOL key (3) v1, len 95
09:10:46.699734 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
09:10:46.699917 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
09:10:46.745280 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:21:6a:07:17:14 (oui Unknown), length 300
09:10:46.745457 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:21:6a:07:17:14 (oui Unknown), length 300
09:10:46.748579 IP 10.0.0.1.bootps > morpheus.lan.bootpc: BOOTP/DHCP, Reply, length 307
09:10:46.766606 IP morpheus.lan > 224.0.0.22: igmp v3 report, 1 group record(s)
09:10:46.766770 IP morpheus.lan > 224.0.0.22: igmp v3 report, 1 group record(s)
09:10:47.019375 IP morpheus.lan.mdns > 224.0.0.251.mdns: 0 [4q] [7n] ANY (QM)? morpheus._udisks-ssh._tcp.local. ANY (QM)? morpheus.local. ANY (QM)? 228.0.0.10.in-addr.arpa. ANY (QM)? morpheus [00:21:6a:07:17:14]._workstation._tcp.local. (262)
09:10:47.019499 IP morpheus.lan.mdns > 224.0.0.251.mdns: 0 [4q] [7n] ANY (QM)? morpheus._udisks-ssh._tcp.local. ANY (QM)? morpheus.local. ANY (QM)? 228.0.0.10.in-addr.arpa. ANY (QM)? morpheus [00:21:6a:07:17:14]._workstation._tcp.local. (262)
09:10:47.060955 IP morpheus.lan.mdns > 224.0.0.251.mdns: 0*- [0q] 4/0/0 PTR _udisks-ssh._tcp.local., PTR morpheus [00:21:6a:07:17:14]._workstation._tcp.local., PTR _workstation._tcp.local., PTR morpheus._udisks-ssh._tcp.local. (164)
09:10:47.061073 IP morpheus.lan.mdns > 224.0.0.251.mdns: 0*- [0q] 4/0/0 PTR _udisks-ssh._tcp.local., PTR morpheus [00:21:6a:07:17:14]._workstation._tcp.local., PTR _workstation._tcp.local., PTR morpheus._udisks-ssh._tcp.local. (164)

Check that you have gotten an IP address by running ifconfig from the connecting client.

Related