How to Turn ON and Turn OFF Bluetooth from command line ?

Rfkill is a tool for enabling and disabling wireless devices. Using “rfkill list” command we first check the list of available wireless devices supported in our hardware as,

$ rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: brcmwl-0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

As seen above we have a WiFi, LAN and Bluetooth supported and ON in my laptop. Now lets try turning ON & OFF this Bluetooth device using rfkill as,

Turn OFF Bluetooth

 $ rfkill block bluetooth 

Or using “rfkill index” bluetooth can be turned off as,

 $ rfkill block 3 

Now, as we can see in “rfkill list” Bluetooth is now turned OFF,

$ rfkill list
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no

Turn ON Bluetooth

 $ rfkill unblock bluetooth 

OR using “rfkill list” index,

 $ rfkill unblock 3 


lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded