Skip to content

Instantly share code, notes, and snippets.

@johnstanfield
Created September 7, 2021 02:00
Show Gist options
  • Save johnstanfield/3078eee2e5eaa55a9f3bf49847ec1f0e to your computer and use it in GitHub Desktop.
Save johnstanfield/3078eee2e5eaa55a9f3bf49847ec1f0e to your computer and use it in GitHub Desktop.
When staying at a hotel with a Chromecast, make the laptop an AP and connect the Chromecast to it to bypass hotel authentication
#!/bin/bash
# i want to stream netflix and prime video from my chromecast to the hotel TV
#
# hotels often have an authentication / agreement page that you have to click OK on
# chromecasts do not play nicely with those
#
# solution: connect your laptop to the hotel's wi-fi, then set up an AP and connect the chromecast to the AP
# your laptop will be both a client of the hotel's WLAN and an access point + bridge of your own WLAN
#
# https://superuser.com/questions/155795/can-a-linux-machine-act-as-both-a-wireless-client-and-access-point-simultaneousl
#
# install create_ap from https://github.com/oblique/create_ap
#
# create an interface for the access point
# note: replace wlp58s0 with your interface name
# wlan0_ap is the new interface name
sudo iw dev wlp58s0 interface add wlan0_ap type managed
# now fire up an access point to the interface
# note: replace wlp58s0 with your interface name
# wlan0_ap is the new interface name specified in the previous step
# myaccesspoint and mypasskey are the WLAN name and passkey
sudo create_ap wlan0_ap wlp58s0 myaccesspoint mypasskey
# now have the Chromecast connect to the access point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment