Linux Mint 11 won't connect to Windows 7 Wireless Ad Hoc

6,445

Probably the most common cause for not being able to connect to an ad-hoc network is the capabilities of network driver (or of the card itself). To check if your card+driver configuration does support such connection, follow these steps:

  1. Open up a terminal.

  2. Check, what is the name of your wireless interface by running iwconfig (if you see a message like "not found" or "permission denied", run sudo iwconfig). You will see a list of interfaces, among which at least one will have a longer description (instead of "no wireless extensions.") This is the wireless interface associated with your wifi card. I'll assume from now on that it is called wlan0 - replace that with your interface name.

  3. Run iwconfig wlan0 mode ad-hoc. If you see no error message, the card almost certainly can work in ad-hoc mode with your current driver. To verify that, run iwconfig wlan0 and you should see Mode: Ad-Hoc in the second line of the description. If there were no errors, but you don't see 'Ad-Hoc', then probably something is forcing the card back to Managed mode. I'll get into this later, if necessary.


Once you assured yourself that the card can be used in Ad-Hoc mode, there can be two general reasons why the computer fails to connect:

  • The graphical configuration tool does not set up the connection properly,

or

  • The configuration of that connection from the Windows-7 machine does not allow your connection or disconnects for whatever reason.

It can also be both or neither of course as well. To determine if the cause is on the GUI side, I'd suggest you to try a more generic way of connecting. So first run sudo service network-manager stop to make sure the GUI will not interfere. Next, use iwlist wlan0 scan to get a list of available wireless networks - this is mainly to find what encryption settings your ad-hoc network uses. Also, it lets you easily copy-paste the necessary information about that connection. Using this information, follow the steps described here to connect. You can skip the part about setting channel. Most probably, the network uses other encryption method than WEP, so you should substitute the last step before "Activation" with encryption settings described further in the article.

Share:
6,445

Related videos on Youtube

Lucas
Author by

Lucas

Updated on September 18, 2022

Comments

  • Lucas
    Lucas over 1 year

    I have been using Linux Mint 11 for the past few days on a 2GB USB pen drive to test it out

    My problem is to do with connecting to a Windows 7 wireless ad hoc network.

    The reason for setting up a wireless ad hoc network in windows 7 is because to connect to the internet we have to use a Softbank 3G mobile USB dongle (Sorry I don't know the proper word for it), but we only have one of them, so our other laptops/devices need to use the main laptop, which is running Windows 7, as a kind of internet access point.

    I have setup the the windows 7 wireless ad hoc network and devices like the iPod touch connect to the network and can use the internet without any problem.

    But the laptop which is running Linux Mint 11 from a USB pen drive (The HDD is dead) can't connect.

    I can see the ad hoc connection in the wireless connections menu and I can click on it and provide a password, but it always fails to connect asking for the password each time it fails.

    Does anybody know what the problem could be? Is there any solution to this?

  • Lucas
    Lucas over 12 years
    Thank you for your answer. I followed your steps and can confirm that none of the commands in terminal yielded any errors. wlan0 is the interface name. It says it is IEEE 802.11bgn. And it let me change the mode to ad-hoc without any problems too. Even after trying to connect to the ad-hoc wireless connection I checked again and it had not switched back to Managed mode. So I can still see the connection but when I type in my password (It's definitely correct) for the connection it still always fails to connect. If you have any other suggestions from here it would be very much appreciated!
  • rozcietrzewiacz
    rozcietrzewiacz over 12 years
    Did you try the command-line method I suggested above?
  • Lucas
    Lucas over 12 years
    Sorry, I didn't notice you had updated your answer. I will try this as soon as possible and comment about the outcome - thank you very much for your time; it's appreciated!
  • rozcietrzewiacz
    rozcietrzewiacz over 12 years
    You can either setup your network system-wide (making use of init scripts) and disable the GUI or use the settings you've just verified to fix NetworkManager's settings. The latter you can try to figure out yourself - if you have trouble or it does not work, I'll try to help on chat today in the evening (I'm at work now), since requires a bit more interaction.
  • Lucas
    Lucas over 12 years
    It's ok, I figured out how to put it all into an sh file. Once again thank you for all of your help!