"SIOCSIFFLAGS: Operation not possible due to RF-kill"?

5,617

Solution 1

Soft-blocking

The output to sudo rfkill list shows that your network card is "soft-blocked".

This could happen when the wireless card has been signalled to switch-off via the kernel.

Try the following steps:

  1. run in a terminal:

    sudo rfkill unblock wifi; sudo rfkill unblock all

  2. rerun sudo rfkill list to confirm that the card has been unblocked.

  3. reboot

  4. rerun sudo rfkill list again to confirm unblocking as been retained.

  5. rerun sudo lshw -class network - you should now see that the kernel has recognised (or not) the wireless card.

If the wireless kernel module has been recognised (it should not say "unclaimed"), Network Manager should now be able to see wireless networks that are available in your vacinity.


Diagnose the kernel issue

If the network card is not recognised - and you have confirmed sudo rfkill list shows no blocking (i.e. both soft blocked and hard blocked are "no") then add the following to your question:

sudo modprobe -r iwl3945
sudo modprobe iwl3945
dmesg | tail -n 50

Hopefully this will point out the error - for example a firmware issue not loading.

Loading new firmware

If it is a firmware issue then you can try maybe one of the following:

  • install the backports wireless drivers:

i.e.

sudo apt-get install linux-backports-modules-cw-2.6.39-generic

Then reboot - test for software blocking etc.

  • get the latest firmware as follows:

i.e.

wget http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-3945-ucode-15.32.2.9.tgz

tar xzf iwlwifi-3945-ucode-15.32.2.9.tgz

cd iwlwifi-3945-ucode-15.32.2.9

sudo cp iwlwifi-3945-2.ucode /lib/firmware

Then reboot - test for software blocking etc.

N.B. your dmesg trace should indicate what the name of the firmware it is having an issue with. Possibly you need to rename "iwlwifi-3945-2.ucode" to whatever the name of the firmware it was expecting.

Solution 2

Check if bluetooth and wireless are not switching badly; verify that you must have this situation:

$ sudo rfkill list all
0: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

I solved my problem with:

$sudo rfkill block bluetooth
$sudo rfkill unblock wifi

Solution 3

I confirm this problem with the Asus X75VD laptop using rt2600pci driver. None of the above suggestions helped me, but on the French forum(1), there is a work-around that does work. Simply suspend the session (close the lid) and reactivate it and the wifi works.

I'm posting this because the other thread specifically for Asus X75VD was marked as a duplicate, and this model doesn't have a physical on/off switch for the wifi, and the fn key sequence doesn't work in this case.

It also appears to be a regression introduced by a bot(2)?

Hopefully there'll be a patch coming soon.

Sam

  1. http://forum.ubuntu-fr.org/viewtopic.php?id=1258361
  2. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1176812

Solution 4

Workaround without need to suspend the session

Having similar Asus laptop, I had the same problem with wifi and used this suspend session workaround and it's quite bothersome to have to suspend it every time.

However, I've found a solution in Fedora forums that also works in Ubuntu (it probably works for any distro):

As a root, create a file with a name like asus-wifi.conf in /etc/modprobe.d/ containing:

options asus_nb_wmi wapf=1

After refoot, wifi should be on.

Solution 5

This may or may not help you out but I'm using a hp computer and it was saying the same thing, so what I did was my keyboard has a WiFi button on it and I just held it down for a second and the icon up at the top disappeared and I typed in ifconfig wlan0 up And it worked

Share:
5,617

Related videos on Youtube

Annymmor A
Author by

Annymmor A

Updated on September 18, 2022

Comments

  • Annymmor A
    Annymmor A almost 2 years

    Please help me!!!

    I am trying to build an application which uses callbacks contracts.My app work fine both the client and the server on the same machine, but when i try to access the service from other machine i got an exception timeout(the operation din not complete within the allotted timeout).The client reads some values throw the service from the database which is on the server.I don't know where is my mistake.I have tried to put the client in a virtual machine, and the service(and database) on the real machine.

    Here is my Server config file:

                <binding name="TrainService" closeTimeout="00:02:00" openTimeout="00:02:00"
                    receiveTimeout="00:10:00" sendTimeout="00:02:00" bypassProxyOnLocal="false"
                    transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00" />
                    <security mode="None">
                        <message clientCredentialType="None" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsDualHttpBinding>
            <wsHttpBinding>
                <binding name="WSHttpBinding_ITrainService" closeTimeout="00:02:00"
                    openTimeout="00:02:00" receiveTimeout="00:10:00" sendTimeout="00:02:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="None" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
      <client>
        <endpoint address="http://localhost:8732/Design_Time_Addresses/WCFandEFService/TrainService/"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITrainService"
          contract="TrainServiceRef.ITrainService" name="WSHttpBinding_ITrainService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="net.tcp://localhost:8080/TcpService" binding="netTcpBinding"
          contract="TrainServiceRef.ITrainService" name="NetTcpBinding_ITrainService" />
        <endpoint address="http://localhost:8082/InterlockingService/Host/line"
          binding="wsDualHttpBinding" bindingConfiguration="LineService"
          contract="InterlockingServiceReference.ILineService" name="LineService">
          <identity>
            <userPrincipalName value="Romina-PC\Romina" />
          </identity>
        </endpoint>
    
        <endpoint address="http://localhost:8082/InterlockingService/Host/trains"
          binding="wsDualHttpBinding" bindingConfiguration="TrainService"
          contract="InterlockingServiceReference.ITrainService" name="TrainService">
          <identity>
            <userPrincipalName value="Romina-PC\Romina" />
          </identity>
        </endpoint>
    
      </client>
    
    </system.serviceModel>
    

    My client config file:

    -->

                <binding name="TrainService" closeTimeout="00:01:00" openTimeout="00:01:00"
                    receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
                    transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="52428800" maxReceivedMessageSize="6553600"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="1638400"
                        maxBytesPerRead="4096" maxNameTableCharCount="1638400" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00" />
                    <security mode="None">
                        <!--<message clientCredentialType="None" negotiateServiceCredential="true"
                            algorithmSuite="Default" />-->
                    </security>
                </binding>
            </wsDualHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8082/InterlockingService/Host/line"
                binding="wsDualHttpBinding" bindingConfiguration="LineService"
                contract="InterlockingServiceRef.ILineService" name="LineService">
                <identity>
                    <userPrincipalName value="Romina-PC\Romina" />
                </identity>
            </endpoint>
    
            <endpoint address="http://localhost:8082/InterlockingService/Host/trains"
                binding="wsDualHttpBinding" bindingConfiguration="TrainService"
                contract="InterlockingServiceRef.ITrainService" name="TrainService">
                <identity>
                    <userPrincipalName value="Romina-PC\Romina" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
    

    Thank you.

    Those are the contracts: public interface ITrainServiceCallBack { [OperationContract (IsOneWay=true)] void OnTrainChangeState(TrainData train); }

    //[ServiceContract(Name = "LineService", CallbackContract = typeof(ILineServiceCallBack))]
    [ServiceContract(CallbackContract = typeof(ITrainServiceCallBack))]
    public interface ITrainService
    {
        [OperationContract]
        TrainData GetTrainData(string trainName);
    
        [OperationContract]
        bool ChangeTrainState_bool(ref TrainData train);
    
        [OperationContract]
        void ChangeTrainState(ref Trains_Detail train);
        [OperationContract]
        bool SubscribeToTrainChangeEvent();
    
        [OperationContract]
        bool UnSubscribeFromTrainChangeEvent();
        [OperationContract]
        TrainData TranslateTrainEntityToTrainData(Trains_Detail trainEntity);
    
        [OperationContract]
        IEnumerable<Trains_Detail> GetTrains();
    
        [OperationContract]
        IEnumerable<Trains_Detail> GetTrains_ByStation(int Statie_plecare, int Statie_sosire);
    }
    

    Method implementation:

    using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using System.Data;

    namespace WCFandEFService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "ProductService" in both code and config file together. //[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]

    public partial class InterlockingService : ITrainService
    {
    
        static List<ITrainServiceCallBack> subscribers_train = new List<ITrainServiceCallBack>();
    
    
        public bool TrainExists(string nrTren, InterlockingEntities database)
        {
            // Check to see whether the specified product exists in the database
            int numTrain = (from t in database.Trains_Details
                           where string.Equals(t.Nr_tren, nrTren)
                           select t).Count();
    
            return numTrain > 0;
    
        }
    
    
        public TrainData TranslateTrainEntityToTrainData(Trains_Detail trainEntity)
        {
            TrainData train = new TrainData();
    
            train.nrTren=trainEntity.Nr_tren;
            train.ora_Plecare= trainEntity.Ora_plecare;
            train.ora_Sosire=trainEntity.Ora_sosire;
            train.statie_Plecare=trainEntity.Statie_plecare;
            train.statie_Sosire=trainEntity.Statie_sosire;
            train.rang=trainEntity.Rang;
            train.observatii=trainEntity.Observatii;            
            train.RowVersion=trainEntity.RowVersion;
    
            return train;
    
        }
    
        #region ILineService Members
    
    
    
        public IEnumerable<Trains_Detail> GetTrains()
        {
            InterlockingEntities context = new InterlockingEntities();
    
    
            IEnumerable<Trains_Detail> result =
                    (from t in context.Trains_Details
                     //where l.Station == station
                     select t);
            return result;
    
        }
    
         public IEnumerable<Trains_Detail> GetTrains_ByStation(int Statie_plecare,int Statie_sosire)
        {
            InterlockingEntities context = new InterlockingEntities();
    
            IEnumerable<Trains_Detail> result =
                    (from t in context.Trains_Details
                     where t.Statie_plecare==Statie_plecare && t.Statie_sosire==Statie_sosire
                     select t);
            return result;
    
        }
    
    
    
        public TrainData GetTrainData(string trainNr)
        {
            InterlockingEntities context = new InterlockingEntities();
            Trains_Detail trainInDB =
                 (from t
                  in context.Trains_Details
                  where String.Compare(t.Nr_tren, trainNr) == 0
                  select t).FirstOrDefault();
            if (trainInDB == null)
            {
    
                throw new Exception("No line cu numele " + trainInDB.Nr_tren);
    
            }
    
            context.Detach(trainInDB);
            return TranslateTrainEntityToTrainData(trainInDB);
        }
    
        public bool ChangeTrainState_bool(ref TrainData train)
        {
            InterlockingEntities context = new InterlockingEntities();
            String trainName = train.nrTren;
            //int lineStation = line.station;
            Trains_Detail trainInDB =
                 (from t
                  in context.Trains_Details
                  where String.Compare(t.Nr_tren, trainName) == 0
                  select t).FirstOrDefault();
    
            if (trainInDB == null)
            {
                throw new Exception("No train cu numele " + trainInDB.Nr_tren);
            }
    
            context.Detach(trainInDB);
    
    
            trainInDB.Nr_tren = train.nrTren;
            trainInDB.Ora_plecare=train.ora_Plecare;
            trainInDB.Ora_sosire=train.ora_Sosire;
            trainInDB.Statie_plecare=train.statie_Plecare;
            trainInDB.Statie_sosire=train.statie_Sosire;
            trainInDB.Rang=train.rang;
    
            trainInDB.RowVersion = train.RowVersion;
    
            context.Attach(trainInDB);
    
            context.ObjectStateManager.ChangeObjectState(trainInDB, System.Data.EntityState.Modified);
            context.SaveChanges();
            train.RowVersion = trainInDB.RowVersion;
            context.Dispose();
            raiseTrainChangeState(TranslateTrainEntityToTrainData(trainInDB));
            return true;
        }
    
    
        public void ChangeTrainState(ref Trains_Detail train)
        {
            using (var context = new InterlockingEntities())
            {
                context.Attach(train);
                context.ObjectStateManager.ChangeObjectState(train, EntityState.Modified);
                context.SaveChanges();
            }
        }
       }
    
    
        public bool SubscribeToTrainChangeEvent()
        {
            try
            {
                ITrainServiceCallBack callback = OperationContext.Current.GetCallbackChannel<ITrainServiceCallBack>();
    
                if (!subscribers_train.Contains(callback))
                {
                    subscribers_train.Add(callback);
                }
                return true;
            }
            catch (Exception)
            {
    
                return false;
            }
    
    
        }
    
        public bool UnSubscribeFromTrainChangeEvent()
        {
            try
            {
                ITrainServiceCallBack callback = OperationContext.Current.GetCallbackChannel<ITrainServiceCallBack>();
                subscribers_train.Remove(callback);
    
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
    
        #endregion
    
    
    
    
        private void raiseTrainChangeState(TrainData train)
        {
            subscribers_train.AsParallel().ForAll(callback =>
            {
                if (((ICommunicationObject)callback).State == CommunicationState.Opened)
                {
                    callback.OnTrainChangeState(train);
    
                }
                else
                {
                    subscribers_train.Remove(callback);
                }
            });
        }
    
    
    
    
    
    
    }
    

    }

    • SaravananArumugam
      SaravananArumugam about 13 years
      Would you like to share the contract structure and operation's implementation?
    • SaravananArumugam
      SaravananArumugam about 13 years
      Please refer to the Edited portion in my answer. Check if it helps.
  • Annymmor A
    Annymmor A about 13 years
    All my operation contracts?Because I put to all isoneway=true and i get the following error:System.InvalidOperationException: Operations marked with IsOneWay=true must not declare output parameters, by-reference parameters or return values.
  • SaravananArumugam
    SaravananArumugam about 13 years
    wsDualHttpBinding is duplex communication binding. In essence, it would call in one channel and receive in another. So when you make a call, you should expect you are simply making a forward only call (Reply would be received in a different channel), and won't expect any out put as a response for your call.
  • carlosfigueira
    carlosfigueira about 13 years
    WSDualHttpBinding does support non-one-way (i.e., request/reply) operations, you shouldn't need to set the operations to one-way.
  • SaravananArumugam
    SaravananArumugam about 13 years
    You may refer to saravananarumugam.wordpress.com/2011/04/08/… for an idea of this binding and duplex channel connection.
  • SaravananArumugam
    SaravananArumugam about 13 years
    Hi @carlosfigueira, would you mind showing an example on where and how the WSHttpBinding support request/response kind of communication?
  • SaravananArumugam
    SaravananArumugam about 13 years
    Whichever call you are going to use in the WSDualHttpBinding has to be a one way operation. Request/response is a different message exchange pattern than the duplex.
  • SaravananArumugam
    SaravananArumugam about 13 years
    I am not sure how would the request/response type message exchange be counted as Duplex. Please refer social.msdn.microsoft.com/Forums/en-US/wcf/thread/… for similar conversation.
  • carlosfigueira
    carlosfigueira about 13 years
    By duplex, it means that the service can send requests to the clients at any time - i.e., the client doesn't need to do some thing like polling the server for messages. WSDualHttpBinding actually creates a server on the client side, and in the initial handshake the client sends the server the address it will be listening to the messages.
  • Annymmor A
    Annymmor A about 13 years
    I have modified all that you have suggested, but it doesn't work.The same error message(for 10 minutes -> the operation din not complete within the allotted timeout).Other suggestions? Thanks for reply
  • SaravananArumugam
    SaravananArumugam about 13 years
    I absolutely agree to this definition. My argument is you are sending the request in a channel and listening to it in different one. That's the reason, the WSHttpBinding creates OneWayBindingElement. Ofcourse you are receiving a response in different channel. But it can't be considered to be request/response MEP right. it is duplex.
  • Annymmor A
    Annymmor A about 13 years
    I put to the callback interface the method to oneway=true, but i've got the same error.(the operation din not complete within the allotted timeout...).Thanks for advice.
  • Annymmor A
    Annymmor A about 13 years
    Well I have tried to change, but no result.Other suggestions?Thank you
  • carlosfigueira
    carlosfigueira about 13 years
    Operations on the callback contract for WSDualHttpBinding do not need to be marked as one way.
  • carlosfigueira
    carlosfigueira about 13 years
    @Saravanan, there's no WSHttpBinding in this question, it's about WSDualHttpBinding.
  • carlosfigueira
    carlosfigueira about 13 years
    @Annymmor, there are other things you can be wrong, depending on your contracts. If the service implementation tries to call the client operation, and the concurrency mode is set to Single (the default), then you may have a timeout as well. After changing the machine names (on both client and server), you can try using some tool such as Fiddler to see if there are requests actually being sent from the client, and see if the service is responding with a 200 (OK) or with some other error (and the response body may give you more information on your problem).
  • SaravananArumugam
    SaravananArumugam about 13 years
    That was a typo. I agree it is not about WSHttpBinding. It is WSDualHttpBinding we are talking about.
  • Annymmor A
    Annymmor A about 13 years
    I have add the contracts.I appreciate ypu help me.I need it a lot.It is urgent.I was looking for a solution all the day.If you want I can send you the code, but I do not know where to put it.
  • Annymmor A
    Annymmor A about 13 years
    If I add it in the interface it results an error.I put it in the implementation class, but I have the following error: "The open operation did not complete within the allotted timeout of 00:00:59.9843750. The time allotted to this operation may have been a portion of a longer timeout." (System.TimeoutException) Exception Message = "The open operation did not complete within the allotted timeout of 00:00:59.9843750. The time allotted to this operation may have been a portion of a longer timeout.", Exception Type = "System.TimeoutException"
  • Annymmor A
    Annymmor A about 13 years
    I have no idea what i can try
  • Annymmor A
    Annymmor A about 13 years
    I install Fiddler on the server machine and the client machine.On the client machine I see that the request is sent to server, but on the server machine the Fidler doesn't show anything.What I am missing?
  • carlosfigueira
    carlosfigueira about 13 years
    Do you get a valid response from the request you see from the client machine? Also, I noticed that you updated your question, but the endpoint address still shows "localhost". Did you update them as well?
  • Annymmor A
    Annymmor A about 13 years
    I get a 502 response on the server.And timeout.I have changed the localhost adress.
  • carlosfigueira
    carlosfigueira about 13 years
    502 == Bad Gateway. Try checking the proxy settings on your machine (if the client and the server are in the same network try disabling the proxy to see if it helps.
  • Annymmor A
    Annymmor A about 13 years
    It was the firewall and the service behaviour not configured right.Thanks guys
  • Lekensteyn
    Lekensteyn almost 13 years
    Observation: if I disable wireless using Fn + F11, it's "hard blocked", not "soft blocked". I guess "soft blocked" means that the software blocks it and pressing a Fn shortcut is a hardware one. Could you confirm it for your devices?
  • Admin
    Admin almost 13 years
    With no soft/hard blockking with the Wireless, I get "SIOCSIFFLAGS: No such device". I added the output of lshow -command to the question.
  • nilsonneto
    nilsonneto almost 13 years
    @hhh - the very last message indicates you are hardware blocked - are you definitely sure there is not a Fn type switch or a slider type switch on the wireless card/bios type switch?
  • Admin
    Admin almost 13 years
    sorry I forget to unblock the WiFi with the last dmesg, I added there now more dmesgs
  • nilsonneto
    nilsonneto almost 13 years
    @hhh - rfkill unblock will only unblock a soft-block. Your last trace still shows a "hard-block" present. As I said before this must be a physical hardware switch on your wireless card (sometimes quite small to see and easy to miss). Sometimes this can just be a Fn type switch. Also - have you tried my suggestion to install the wireless backports package?
  • nilsonneto
    nilsonneto almost 13 years
    @hhh you should be able to Fn+F5 whilst ubuntu is running to unblock and then doing a modprobe -r iwl3945 followed by modprobe iwl3945. Doing this then no longer shows "HW RF Kill Switch" in your dmesg trace? Can you add links to the bug reports you have read - I've searched but cant find anything similar to your observations.
  • Admin
    Admin almost 13 years
    I got it fixed! Never noticed that small switch under dirt at the bottom side of my machine, something like here. Yes, it was apparently a hard lock problem. Thank you for your general debugging instructions, learnt a ton.
  • Shiplu Mokaddim
    Shiplu Mokaddim about 12 years
    Great! You saved a lot of time.
  • Developer
    Developer over 10 years
    Thanks a lot for this answer! I've had a similar problem with my Asus laptop and I've tried tons of combinations with rfkill etc. but it was impossible for me to get both soft and hard unblocked at the same time. Weirdly enough this solved it for me! Thanks.
  • hytromo
    hytromo over 10 years
    That solved it for me, not the accepted answer. Please note that I had to do ifconfig wlan0 up after your commands in order to make it work.
  • Tim
    Tim over 8 years
    This saved a load of time!
  • Rakholiya Jenish
    Rakholiya Jenish over 8 years
    HI @fossfreedom thanks for help. I tried doing rfkill list and it shows that both soft and hard block are off and running lshw -class network showed as *network DISABLED for wireless interface as shown at pastebin.com/qVEqF2kr. I also tried sudo modprobe iwl3945 but still no benefit. I have ralink 3290 as my wireless card. Any suggestion what to do?
  • nilsonneto
    nilsonneto over 8 years
    The pastebin says you are using arch-firmware. This answer may not be applicable to how arch does stuff. Suggest asking a question on unix & linux stackexchange.
  • Admin
    Admin over 7 years
    How do you know it's applicable to the OP's hardware?
  • PersianGulf
    PersianGulf over 4 years
    You solve my problem,