Problem sharing internet over ad-hoc wireless connection

I have a dual-boot desktop machine with Windows XP x64 and OpenSUSE 11.1 with KDE4. The machine has access to the internet through a cable modem which works flawlessly in both Windows and Linux. I have also installed a MSI PC54G PCI wireless card for purpose of sharing the internet connection over wireless with a single other computer running on Windows XP. This wireless card is recognized and supported by both Windows and SUSE. iwconfig says:

wlan0     IEEE 802.11bg  ESSID:"mrezica"
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: Not-Associated
          Tx-Power=27 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:6475-646B-6F
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

I managed to set up an ad-hoc connection in my Windows XP x64 and share the internet connection in 10 minutes. So far so good.

I also want to set a similar connection sharing in SUSE. First, I went into YaST’s Network Settings and set up the wireless card in the following way:
Dynamic Address, DHCP+Zeroconf, DHCP both version 4 and 6

Operating Mode: Ad-Hoc
Network name: mrezica (same as in Windows)
Authentication Mode: WEP - Shared Key
Encryption Key: (same as in Windows)

When I finished the setup I checked the other machine but it didn’t connect.

I tried to start the NetworkManager but it says “Network Manager is not running”. Strangely, this is KDE3 NetworkManager. Is there no KDE4 version?

Next, I tried “ifup wlan0” in the terminal. It gives the following output:

wlan0     name: BCM4306 802.11b/g Wireless LAN Controller
Starting DHCP4+DHCP6 client on wlan0. . . . . . .
    wlan0     DHCP4 client NOT running
    wlan0     DHCP6 client NOT running
Starting autoip on wlan0... . failed
interface wlan0 is not up

Ok, I guess this card should have static IP. So, I tried giving it 192.168.0.1 with subnet mask 255.255.0.0. The result of ifup was only “interface wlan0 is not up”

I have no idea where to go from here. I remember sharing a connection with Windows XP machine in an earlier version of SUSE years ago but I have no idea how I did it. I remember that SUSE machine was acting as AP at that time (with the same wireless card), but now I need Ad-Hoc because I can’t get the software AP utility to work in x64 Windows.

Please help. Where should I go from here?

sudo /etc/init.d/network restart

output?
If it doesn’t work, check out

sudo /sbin/ifconfig wlan0 up

Try using wpa_supplicant firstly to connect ad-hoc and then…

sudo /sbin/dhclient wlan0

Do remember however that resolv.conf isn’t updated sometimes (bug) but there should be a different file /etc/resolv.conf.* which you would replace instead of the broken resolv just in case you jump over that problem.

That’ll help you to diagnose directly the problem I hope.

If your wireless card uses mac80211, then you should be able to use
hostapd to set up your system as an AP. The guts of what you need to
do are in a posting of mine at http://tinyurl.com/cgcpj6. It works
with boty i386 and x86_64 architectures.

Doesn’t work. Output:

Shutting down network interfaces:
    eth0      device: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
    eth0                                                                                                                                                                 done
    pan0
              No configuration found for pan0
              Nevertheless the interface will be shut down.
bridge-utils not installed
    pan0                                                                                                                                                                 done
    wlan0     name: BCM4306 802.11b/g Wireless LAN Controller
    wlan0                                                                                                                                                                done
Shutting down service network  .  .  .  .  .  .  .  .  .                                                                                                                 done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
    eth0      device: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
    eth0      Starting DHCP4+DHCP6 client. . . . . . . .
    eth0      IP address: 95.180.18.169/22
    eth0      DHCP6 continues in background
    eth0                                                                                                                                                                 done
    pan0
              No configuration found for pan0
    pan0                                                                                                                                                                 unused
    wlan0     name: BCM4306 802.11b/g Wireless LAN Controller
    wlan0     IP address: 192.168.0.1/16
interface wlan0 is not up
    wlan0                                                                                                                                                                done
Setting up service network  .  .  .  .  .  .  .  .  .  .                                                                                                                 done
SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
SuSEfirewall2: using default zone 'ext' for interface pan0
SuSEfirewall2: using default zone 'ext' for interface wlan0
SuSEfirewall2: using default zone 'ext' for interface wmaster0
SuSEfirewall2: batch committing...
SuSEfirewall2: Firewall rules successfully set

Doesn’t work. Output:

SIOCSIFFLAGS: No such file or directory

Hmmm, I used wpa_supplicant with wpa_gui before, but I think the wpa_supplicant was started at boot time back then. How do I start wpa_supplicant for use with wpa_gui in command line? I tried “wpa_supplicant -B -iwlan0” but it only displays the help message.

Speaking of WPA, my wireless card is set up to use WEP because I can’t find compatible WPA between the two cards. My PCI card on the Linux desktop machine can be set to WPA-EAP and WPA-PSK in YaST. My USB card on Windows laptop machine can be set to WPA-None with TKIP and AES encryption in the manufacturer utility. Can those four make a compatible pair?

There is no other resolv.conf file in my /etc. The contents of my resolv.conf, after the comments, are:

nameserver 95.180.0.18
nameserver 95.180.1.2

I guess these are nameservers for my internet connection.

Sadly, I have to work in ad-hoc network because I can’t get a software AP in x64 windows. I have two wireless cards and none of those has a manufacturer driver or utility for x64. I also tried Pctel SoftAP but it doesn’t seem to be able to work with Windows’ x64 driver for Broadcomm chipsets.

My goal is to have internet connection sharing in both OSs without having to change settings on the other machine when I switch the OS.