hostapd how to enable and use WPS to connect wireless devices like printers

Edit your /etc/hostapd/hostapd.conf file like below and restart hostapd.

#WPS stuff
# Enable control interface for PBC/PIN entry


wpa_psk_file=/etc/hostapd/hostapd.psk
ctrl_interface=/var/run/hostapd
eap_server=1
wps_state=2
ap_setup_locked=1
wps_pin_requests=/var/run/hostapd.pin-req
config_methods=label display push_button keypad

#WPS model info stuff change to suit your needs
device_name=Your Device Name
manufacturer=Company
model_name=Model
model_number=ModelNum

Create the .psk file from above

touch /etc/hostapd/hostapd.psk

Restart hostapd

systemctl restart hostapd
 

Here's how to push the non-existent button on your router for WPS

hostapd_cli wps_pbc

Then you should get this and your device should be able to connect now.

Once you see the below, the device has 2 minutes to connect.


Selected interface 'wlan0'
OK

 

 
 

 

 


Tags:

hostapd, enable, wps, wireless, devices, printersedit, etc, conf, restart, interface, pbc, entry, ctrl_interface, var, eap_server, wps_state, ap_setup_locked, wps_pin_requests, req, config_methods, label, display, push_button, keypad, info, device_name, usb, wlan, manufacturer, atheros, model_name, wap, model_number, existent, router, hostapd_cli, wps_pbc, selected, ok,

Latest Articles

  • How to combine .txt ACLs without breaking things
  • How to ping all of Googlebot's IPs script
  • 'virtio0' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3
  • Linux bash script to get the IP of a list of hostnames
  • How To Use Camera Webcam in Docker for OBS Studio etc...
  • Computer Server Won't Post Boot Or Enter BIOS Setup After Installing RAID SAS or GPU Card etc..
  • How To Test PHP Scripts from CLI with GET variables/query string
  • apt-cache how to see all available versions of a package in Debian Ubuntu Mint
  • Virtualbox VBox Guest-utils drag and drop files stops working with Windows VMs
  • How To Remove Ubuntu Netplan and Go Back to /etc/network/interfaces
  • How To Force Flash an AMD Instinct GPU To Another Model Using Debian Ubuntu Mint Linux
  • How To compile ollama from source to use unsupported AMD GPU with rocm in Ubuntu Debian
  • QEMU KVM Virtio GPU Windows Cannot Select 1080P
  • Linux Gnome Desktop Ubuntu Mint Debian Gets Slower After Weeks
  • Firefox How to Save Full Page As Screenshot/PDF
  • Nvidia Datacenter Driver Tesla Slow nvidia-smi response and high utilization with 0 usage
  • ffmpeg how to normalize / increase the volume of your audio
  • kdenlive audio blips pops cracks artifacts solution fix
  • haproxy / nginx certbot SSL issues
  • nginx how to see the real IP when behind a CDN