<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wireless on Major Hayden</title><link>https://major.io/tags/wireless/</link><description>Recent content in Wireless on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Sun, 07 Jun 2026 23:39:03 +0000</lastBuildDate><atom:link href="https://major.io/tags/wireless/index.xml" rel="self" type="application/rss+xml"/><item><title>Restoring wireless and Bluetooth state after reboot in Fedora 22</title><link>https://major.io/p/restoring-wireless-and-bluetooth-state-after-reboot-in-fedora-22/</link><pubDate>Sun, 19 Jul 2015 22:14:30 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/restoring-wireless-and-bluetooth-state-after-reboot-in-fedora-22/</guid><description>&lt;p&gt;&lt;img alt="1" loading="lazy" src="https://major.io/wp-content/uploads/2015/03/ThinkPad-Carbon-X1.jpg"&gt;&lt;/p&gt;
&lt;p&gt;My upgrade to Fedora 22 on the ThinkPad X1 Carbon was fairly uneventful and the hiccups were minor. One of the more annoying items that I&amp;rsquo;ve been struggling with for quite some time is how to boot up with the wireless LAN and Bluetooth disabled by default. Restoring wireless and Bluetooth state between reboots is normally handled quite well in Fedora.&lt;/p&gt;
&lt;p&gt;In Fedora 21, NetworkManager saved my settings between reboots. For example, if I shut down with wifi off and Bluetooth on, the laptop would boot up later with wifi off and Bluetooth on. This wasn&amp;rsquo;t working well in Fedora 22: both the wifi and Bluetooth were always enabled by default.&lt;/p&gt;
&lt;h3 id="digging-into-rfkill"&gt;Digging into rfkill&lt;/h3&gt;
&lt;p&gt;I remembered &lt;a href="https://wireless.wiki.kernel.org/en/users/documentation/rfkill"&gt;rfkill&lt;/a&gt; and began testing out some commands. It detected that I had disabled both devices via NetworkManager (soft):&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
 Soft blocked: yes
 Hard blocked: no
2: phy0: Wireless LAN
 Soft blocked: yes
 Hard blocked: no
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It looked like systemd has some hooks already configured to manage rfkill via the &lt;a href="http://www.freedesktop.org/software/systemd/man/systemd-rfkill@.service.html"&gt;systemd-rfkill&lt;/a&gt; service. However, something strange happened when I tried to start the service:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# systemctl start systemd-rfkill@0
Failed to start systemd-rfkill@0.service: Unit systemd-rfkill@0.service is masked.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Well, that&amp;rsquo;s certainly weird. While looking into why it&amp;rsquo;s masked, I found an empty file in &lt;code&gt;/etc/systemd&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# ls -al /etc/systemd/system/systemd-rfkill@.service
-rwxr-xr-x. 1 root root 0 May 11 16:36 /etc/systemd/system/systemd-rfkill@.service
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I don&amp;rsquo;t remember making that file. Did something else put it there?&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# rpm -qf /etc/systemd/system/systemd-rfkill@.service
tlp-0.7-4.fc22.noarch
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ah, &lt;a href="http://linrunner.de/en/tlp/tlp.html"&gt;tlp&lt;/a&gt;!&lt;/p&gt;
&lt;h3 id="configuring-tlp"&gt;Configuring tlp&lt;/h3&gt;
&lt;p&gt;I looked in tlp&amp;rsquo;s configuration file in &lt;code&gt;/etc/default/tlp&lt;/code&gt; and found a few helpful configuration items:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
# on system startup: 0=disable, 1=enable.
# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
# are ignored when this is enabled!
RESTORE_DEVICE_STATE_ON_STARTUP=0

# Radio devices to disable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
#DEVICES_TO_DISABLE_ON_STARTUP=&amp;#34;bluetooth wifi wwan&amp;#34;

# Radio devices to enable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
#DEVICES_TO_ENABLE_ON_STARTUP=&amp;#34;wifi&amp;#34;

# Radio devices to disable on shutdown: bluetooth, wifi, wwan
# (workaround for devices that are blocking shutdown).
#DEVICES_TO_DISABLE_ON_SHUTDOWN=&amp;#34;bluetooth wifi wwan&amp;#34;

# Radio devices to enable on shutdown: bluetooth, wifi, wwan
# (to prevent other operating systems from missing radios).
#DEVICES_TO_ENABLE_ON_SHUTDOWN=&amp;#34;wwan&amp;#34;

# Radio devices to enable on AC: bluetooth, wifi, wwan
#DEVICES_TO_ENABLE_ON_AC=&amp;#34;bluetooth wifi wwan&amp;#34;

# Radio devices to disable on battery: bluetooth, wifi, wwan
#DEVICES_TO_DISABLE_ON_BAT=&amp;#34;bluetooth wifi wwan&amp;#34;

# Radio devices to disable on battery when not in use (not connected):
# bluetooth, wifi, wwan
#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE=&amp;#34;bluetooth wifi wwan&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So tlp&amp;rsquo;s default configuration doesn&amp;rsquo;t restore device state &lt;strong&gt;and&lt;/strong&gt; it masked systemd&amp;rsquo;s rfkill service. I adjusted one line in tlp&amp;rsquo;s configuration and rebooted:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;DEVICES_TO_DISABLE_ON_STARTUP=&amp;#34;bluetooth wifi wwan&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the reboot, both the wifi and Bluetooth functionality were shut off! That&amp;rsquo;s exactly what I needed.&lt;/p&gt;
&lt;h3 id="extra-credit"&gt;Extra credit&lt;/h3&gt;
&lt;p&gt;Thanks to a coworker, I was able to make a NetworkManager script to automatically shut off the wireless LAN whenever I connected to a network via ethernet. This is typically what I do when coming back from an in-person meeting to my desk (where I have ethernet connectivity).&lt;/p&gt;
&lt;p&gt;If you want the same automation, just drop this script into &lt;code&gt;/etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive.sh&lt;/code&gt; and make it executable:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;LC_ALL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;C
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;enable_disable_wifi &lt;span class="o"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;nmcli dev &lt;span class="p"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;&amp;#34;ethernet&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; grep -w &lt;span class="s2"&gt;&amp;#34;connected&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$result&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; nmcli radio wifi off
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;up&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; enable_disable_wifi
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Unplug the ethernet connection, start wifi, and then plug the ethernet connection back in. Once NetworkManager fully connects (DHCP lease obtained, connectivity check passes), the wireless LAN should shut off automatically.&lt;/p&gt;</description></item><item><title>Getting online with a CradlePoint PHS-300 and an AT&amp;T USBConnect Mercury</title><link>https://major.io/p/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/</link><pubDate>Fri, 16 Dec 2011 07:07:08 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/</guid><description>&lt;p&gt;Anyone who has used a 3G ExpressCard or USB stick knows how handy they can be when you need internet access away from home (and away from Wi-Fi). I&amp;rsquo;ve run into some situations recently where I needed to share my 3G connection with more than one device without using internet sharing on my MacBook Pro.&lt;/p&gt;
&lt;p&gt;That led me to pick up a CradlePoint PHS-300 (discontinued by the manufacturer, but available from &lt;a href="http://www.amazon.com/CradlePoint-PHS300-Personal-Hotspot-Wireless/dp/B001212ELY"&gt;Amazon&lt;/a&gt; for about $35). It&amp;rsquo;s compatible with my AT&amp;amp;T USBConnect Mercury (a.k.a. Sierra Wireless Compass 885/885U) USB stick.&lt;/p&gt;
&lt;p&gt;Configuring the PHS-300 was extremely easy since I could just associate with the wireless network and enter the password printed on the bottom of the unit. However, getting the 3G stick to work was an immense pain. If you&amp;rsquo;re trying to pair up these products, these steps should help:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Access the PHS-300&amp;rsquo;s web interface&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Modem&lt;/strong&gt; tab&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Settings&lt;/strong&gt; on the left&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Always on&lt;/strong&gt; under &lt;strong&gt;Reconnect Mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Uncheck &lt;strong&gt;Aggressive Modem Reset&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Put the following into the &lt;strong&gt;AT Dial Script&lt;/strong&gt; text box:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;ATE0V1&amp;amp;F&amp;amp;D2&amp;amp;C1S0=0
ATDT*99***1#
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;ISP.CINGULAR&lt;/code&gt; to the &lt;strong&gt;Access Point Name (APN)&lt;/strong&gt; box&lt;/li&gt;
&lt;li&gt;Flip the &lt;strong&gt;Connect Mode&lt;/strong&gt; under &lt;strong&gt;Dual WiMAX/3G Settings&lt;/strong&gt; to &lt;strong&gt;3G Only&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Scroll up and push &lt;strong&gt;Save Settings&lt;/strong&gt; and then &lt;strong&gt;Reboot Now&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once the PHS-300 reboots, the USB stick may light up, then turn off, and the display on the PHS-300 might show a red light for the 3G card. Wait about 10-15 seconds for the light to turn green. The lights on the 3G stick should be glowing and blinking as well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So how did I figure this out?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After scouring Google search results, Sierra Wireless FAQ&amp;rsquo;s, CradlePoint&amp;rsquo;s support pages, and trolling through minicom (yes, minicom), I thought I&amp;rsquo;d try connecting with my MacBook Pro using the 3G Watcher application provided by Sierra Wireless. Before connecting, I opened up Console.app and watched the &lt;code&gt;ppp.log&lt;/code&gt; file. Sure enough, two lines popped up that were quite relevant to my interests:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Fri Dec 16 00:37:51 2011 : Initializing phone: ATE0V1&amp;amp;F&amp;amp;D2&amp;amp;C1S0=0
Fri Dec 16 00:37:51 2011 : Dialing: ATDT*99***1#
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I didn&amp;rsquo;t have the exact initialization string in the PHS-300 and that was the cause of the failure the entire time.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;d like to talk to your USBConnect Mercury stick with minicom, just install minicom from macports (&lt;code&gt;sudo port -v install minicom&lt;/code&gt;) and start it up like so:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;sudo minicom -D /dev/cu.sierra04
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For other Sierra Wireless cards and adapters, there&amp;rsquo;s a &lt;a href="http://mycusthelp.net/SIERRAWIRELESS/_cs/AnswerDetail.aspx?aid=7"&gt;helpful page&lt;/a&gt; on Sierra Wireless&amp;rsquo; site for Eee PC users.&lt;/p&gt;</description></item></channel></rss>