Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using a proprietary rt3652sta driver for my wireless card. It appears as a ra0 device on the 64-bit Ubuntu 12.04.

According to the online documentation the following used to work definitely up to 10.04.

dbus-send --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Set string:org.freedesktop.NetworkManager string:WirelessEnabled variant:boolean:false

This however has no effect on the aforesaid wireless card in 12.04. Also, rfkill does not work as it does not even list the wireless button (again, likely due to the wireless driver being proprietary):

rfkill list

It only lists the hci0 (bluetooth) one and one can block/unblock it accordingly but this has no effect on the wifi.

ifup/down also does not work (AFAICT)...

And this leaves me with disabling wireless through the network manager applet. However, trying to do so via dbus appears not to work and yet I would like to automate it via a script.

Any ideas how I could find out the proper dbus structure for the call? Is this even possible in Ubuntu 12.04?

share|improve this question
    
How about ifconfig ra0 up/down? –  mikewhatever Sep 6 '12 at 19:51
    
No, just like ifup/down that does not work unfortunately. roadmr's got the answer that works, see below. –  FlabbergastedPickle Sep 7 '12 at 3:40

1 Answer 1

up vote 0 down vote accepted

Have a look at the nmcli utility, it controls networkmanager via (I think) dbus calls but should be much simpler to use from your script.

share|improve this answer
    
Great! Thanks for the info! It appears that following solves the problem: nmcli nm wifi on/off BTW, is there a way to browse all available options inside dbus (kind of like dconf-editor but that one does not AFAICT provide info on dbus options, at least not for nm-applet)? –  FlabbergastedPickle Sep 7 '12 at 2:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.