Background info
This is a strange project. It’s an on-going ubuntu experiment and learning experience for me.
I want to create a portable Plex Media Server on an External SSD ubuntu.
Firstly – I must emphasise that my ubuntu / linux knowledge is very novice. I am just try to self learn. I have zero background in IT or networking. My background is in Finance, so very little IT knowledge.
Why?
- I want to have a Plex Media Server without depending on Internet access with me when I travel. I don’t want to stream over the network from my home Plex Server. Don’t want to incur network charges; also on some occasions I find internet access either bad or non existent. Hence, the portable Plex Media Server.
- Why ubuntu? I am a ubuntu amateur, and I just want to further my knowledge on ubuntu to practical uses. I can use Windows (which I use at work) or MacOS (for personal home use), but I want a reason to use & learn ubuntu – hence, using it for the Plex Media Server as a start.
- Why an external SSD bootable with ubuntu? Well, my travelling laptop will likely be a Windows machine (as I carry work with me). And when I want to switch off work, I want to boot into ubuntu.
What I am trying to achieve
My use case: is to have this portable Plex Media Server (on ubuntu) booted from external (2TB) SSD on my laptop (currently a Surface Pro 4), and to watch videos on the hotel room TV using a Google TV or Roku device connected to the TV via HDMI. For ease of this post, I will call the Plex Media Server on Ubuntu, booted from the external SSD as THE SERVER.
So what I need is to configure the to connect THE SERVER to the internet using the hotel WiFi, and at the same time provide an access point so that the Google TV device connects to THE SERVER in order to watch the plex videos.
I have already created a bootable ubuntu on external SSD. I have tested the surface pro 4 booting from the external SSD. And I can setup the Plex Server no problems.
The problem I need help with
I am only unsure how to set up the WiFi AND create the access point at the same time.
I’ve searched the net for guides on how to do this, and the one that seems closest are the following: How to use wifi & enable hotspot at the same time https://linuxh2o.com/how-to-use-wifi-enable-hotspot-at-the-same-time/
I also followed the question and responses on How do I create a WiFi hotspot sharing wireless internet connection (single adapter)? and used the oblique’s create_ap solution by https://askubuntu.com/users/402335/kcdtv
(I didn’t try the other solution by https://askubuntu.com/users/147044/radu-r%c4%83deanu because I’m an ubuntu newbie and editing config files and making shell scripts scares me because I don’t understand most of it. I try not to do things I don’t fully understand.)
So, I’ve managed to install hostapd and used the create_ap to create the access point from THE SERVER, however while the Google TV device can see the access point SSID, it cannot connect. So I am not sure what is the problem.
Appreciate if you can guide me on resolving this? Also, in the event I’m done with the access point – how do I disable it.
Also – I read somewhere that it is not feasible or advisable to use the same WiFi device to do both the receiving and transmitting of signals as this will both slow the connections and overload the WiFi device. Can somebody confirm this? As a solution to this, I bought a WiFi USB dongle to be the second WiFi device to work around this constraint.
See some technical details below. Let me know if there any other details I need to check and provide.
[su_divider top=”no” style=”dotted” size=”2″]
Technical details:
- Using
sudo lshw -class network– The wireless card on my Surface Pro 4 is made by Marvell Semiconductor, product 88W8897 [AVASTAR] 802.11ac Wireless. - Using
iw list– the network card supports AP interface modes. And the valid interface combinations include#channels <= 1. - Given I am using the same hardware as AP and also the WiFi connection, I used the command –
sudo create_ap wlan0 wlan0 hotspotSSID hotspotpassword - I used the
wlan0connection name as perifconfig - I note that
dnsmasqhad issues:failed to create listing socket for port 53: Address already in use
My details on the network and the 2 WiFi devices are as follows:
sudo lshw -class network – details
*-usb:0 description: Wireless interface product: 802.11 n WLAN vendor: Ralink physical id: 1 bus info: usb@1:1.1 logical name: wlan1 version: 1.01 serial: 9c:ef:d5:fa:27:1b capabilities: usb-2.00 ethernet physical wireless configuration: broadcast=yes driver=rt2800usb driverversion=5.10.17-v7l+ firmware=0.36 ip=192.168.1.236 link=yes maxpower=450mA multicast=yes speed=480Mbit/s wireless=IEEE 802.11 *-network:0 description: Ethernet interface physical id: 1 logical name: eth0 serial: dc:a6:32:af:d0:1a size: 100Mbit/s capacity: 1Gbit/s capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=5.10.17-v7l+ duplex=full ip=192.168.1.192 link=yes multicast=yes port=MII speed=100Mbit/s *-network:1 description: Wireless interface physical id: 2 logical name: wlan0 serial: dc:a6:32:af:d0:1b capabilities: ethernet physical wireless configuration: broadcast=yes driver=brcmfmac driverversion=7.45.229 firmware=01-2dbd9d2e ip=192.168.1.193 multicast=yes wireless=IEEE 802.11
iw list – details
Wiphy phy1
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
Retry short long limit: 2
Coverage class: 0 (up to 0m)
Device supports RSN-IBSS.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP-128 (00-0f-ac:4)
* CCMP-256 (00-0f-ac:10)
* GCMP-128 (00-0f-ac:8)
* GCMP-256 (00-0f-ac:9)
* CMAC (00-0f-ac:6)
* CMAC-256 (00-0f-ac:13)
* GMAC-128 (00-0f-ac:11)
* GMAC-256 (00-0f-ac:12)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
Band 1:
Capabilities: 0x2fe
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 2-streams
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 2 usec (0x04)
HT TX/RX MCS rate indexes supported: 0-15, 32
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)
Supported commands:
* new_interface
* set_interface
* new_key
* start_ap
* new_station
* new_mpath
* set_mesh_config
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* frame
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* probe_client
* set_noack_map
* register_beacons
* start_p2p_device
* set_mcast_rate
* connect
* disconnect
* set_qos_map
* set_multicast_to_unicast
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ AP, mesh point } <= 8,
total <= 8, #channels <= 1
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
Device supports TX status socket option.
Device supports HT-IBSS.
Device supports SAE with AUTHENTICATE command
Device supports low priority scan.
Device supports scan flush.
Device supports AP scan.
Device supports per-vif TX power setting
Driver supports full state transitions for AP/GO clients
Driver supports a userspace MPM
Device supports configuring vdev MAC-addr on create.
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Supported TX frame types:
* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* IBSS: 0x40 0xb0 0xc0 0xd0
* managed: 0x40 0xb0 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* mesh point: 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* P2P-device: 0x40 0xd0
Supported extended features:
* [ RRM ]: RRM
* [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
Wiphy phy0
max # scan SSIDs: 10
max scan IEs length: 2048 bytes
max # sched scan SSIDs: 16
max # match sets: 16
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports roaming.
Device supports T-DLS.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP-128 (00-0f-ac:4)
* CMAC (00-0f-ac:6)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* P2P-client
* P2P-GO
* P2P-device
Band 1:
Capabilities: 0x1062
HT20/HT40
Static SM Power Save
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 16 usec (0x07)
HT TX/RX MCS rate indexes supported: 0-7
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)
Band 2:
Capabilities: 0x1062
HT20/HT40
Static SM Power Save
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 16 usec (0x07)
HT TX/RX MCS rate indexes supported: 0-7
VHT Capabilities (0x00001020):
Max MPDU length: 3895
Supported Channel Width: neither 160 nor 80+80
short GI (80 MHz)
SU Beamformee
VHT RX MCS set:
1 streams: MCS 0-9
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT RX highest supported: 0 Mbps
VHT TX MCS set:
1 streams: MCS 0-9
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT TX highest supported: 0 Mbps
Bitrates (non-HT):
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 5170 MHz [34] (disabled)
* 5180 MHz [36] (20.0 dBm)
* 5190 MHz [38] (disabled)
* 5200 MHz [40] (20.0 dBm)
* 5210 MHz [42] (disabled)
* 5220 MHz [44] (20.0 dBm)
* 5230 MHz [46] (disabled)
* 5240 MHz [48] (20.0 dBm)
* 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
* 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
* 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
* 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
* 5500 MHz [100] (20.0 dBm) (no IR, radar detection)
* 5520 MHz [104] (20.0 dBm) (no IR, radar detection)
* 5540 MHz [108] (20.0 dBm) (no IR, radar detection)
* 5560 MHz [112] (20.0 dBm) (no IR, radar detection)
* 5580 MHz [116] (20.0 dBm) (no IR, radar detection)
* 5600 MHz [120] (20.0 dBm) (no IR, radar detection)
* 5620 MHz [124] (20.0 dBm) (no IR, radar detection)
* 5640 MHz [128] (20.0 dBm) (no IR, radar detection)
* 5660 MHz [132] (disabled)
* 5680 MHz [136] (disabled)
* 5700 MHz [140] (disabled)
* 5720 MHz [144] (disabled)
* 5745 MHz [149] (20.0 dBm)
* 5765 MHz [153] (20.0 dBm)
* 5785 MHz [157] (20.0 dBm)
* 5805 MHz [161] (20.0 dBm)
* 5825 MHz [165] (20.0 dBm)
Supported commands:
* new_interface
* set_interface
* new_key
* start_ap
* join_ibss
* set_pmksa
* del_pmksa
* flush_pmksa
* remain_on_channel
* frame
* set_wiphy_netns
* set_channel
* tdls_oper
* start_sched_scan
* start_p2p_device
* connect
* disconnect
* crit_protocol_start
* crit_protocol_stop
* update_connect_params
software interface modes (can always be added):
valid interface combinations:
* #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
total <= 3, #channels <= 2
* #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
total <= 4, #channels <= 1
Device supports scan flush.
Device supports randomizing MAC-addr in sched scans.
max # scan plans: 1
max scan plan interval: 508
max scan plan iterations: 0
Supported TX frame types:
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* managed: 0x40 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* P2P-device: 0x40 0xd0
Supported extended features:
* [ 4WAY_HANDSHAKE_STA_PSK ]: 4-way handshake with PSK in station mode
* [ 4WAY_HANDSHAKE_STA_1X ]: 4-way handshake with 802.1X in station mode
* [ DFS_OFFLOAD ]: DFS offload
ifconfig – details
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.192 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::9732:acb9:693:cb6f prefixlen 64 scopeid 0x20<link> ether dc:a6:32:af:d0:1a txqueuelen 1000 (Ethernet) RX packets 265683 bytes 331986291 (316.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 135781 bytes 13170606 (12.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.193 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::5466:77f:16a1:e949 prefixlen 64 scopeid 0x20<link> ether dc:a6:32:af:d0:1b txqueuelen 1000 (Ethernet) RX packets 7582 bytes 1180377 (1.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 296 bytes 54903 (53.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.236 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::b11d:f5be:303f:d9 prefixlen 64 scopeid 0x20<link> ether 9c:ef:d5:fa:27:1b txqueuelen 1000 (Ethernet) RX packets 3598 bytes 692244 (676.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 120 bytes 20100 (19.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
iwconfig – details
lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11 ESSID:"mywifi" Mode:Managed Frequency:2.462 GHz Access Point: 64:A5:C3:6A:C6:CC Bit Rate=24 Mb/s Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on Link Quality=51/70 Signal level=-59 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:152 Invalid misc:0 Missed beacon:0 wlan1 IEEE 802.11 ESSID:"mywifi" Mode:Managed Frequency:2.462 GHz Access Point: 64:A5:C3:6A:C6:CC Bit Rate=130 Mb/s Tx-Power=20 dBm Retry short long limit:2 RTS thr:off Fragment thr:off Power Management:off Link Quality=51/70 Signal level=-59 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:40 Invalid misc:86 Missed beacon:0