How to put wireless into adhoc mode?

  • Thread starter Thread starter Guest
  • Start date Start date
Hmm, it still doesn't work for me.

Here is my adhoc.sh script:

Code:
/etc/rc.d/init.d/NetworkManager stop
ifconfig ath0 down
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
iwconfig ath0 channel 6
iwconfig ath0 essid JoikuSpot_N95
ifconfig ath0 up
dhclient ath0

The settings in the Joiku software correspond to those above. I turned off encryption and GPS as suggested.

When I start Joiku on the N95 mobile, it claims to connect successfully to the web. First, the Joiku screen shows only the MAC address of the mobile phone. Then, after running the
Code:
ifconfig ath0 up
line of the script,
I can also see the laptop's MAC address on the phone display. The only thing which doesn't seem to work is the dhclient. I get the same error messages as my predecessors in this thread:

wifi0: unknown hardware address type 801

I'm stuck with this for a couple of days now, any help highly appreciated.
 
That error message appears to me too but dhcp and everything works perfectly and I can connect with the exact procedure I mentioned earlier.
 
how to put aa1 in ad hoc mode so other wifi device can connect to it?

What i mean by that is i want to connect my iphone to it and in MAC OR WIN you can just create an ad hoc connection and you mechine will be broadcasting that and any wifi device can connect....

But in aa1 (linux) the networkmanager doesnt have that option at all . is there an better manager to do this task or any other way to do this ?

Many thanks for any advice
 
I have tried all the above steps and managed to connect with wmwifirouter once when it was broadcasting on channel 6.
Since then I tried to connect (it is now broadcasting on channel 11) and although I changed the script to channel 11, it won't let me browse the internet.
Funny enough, I can ping the wmwifirouter.
I can also ping web.de for example and get an IP address for it, so there must be some connection to resolve the name to an IP, but then it times out. 100% packet loss.
Same in my browser. Connection times out.

Any ideas?

I live off grid far away from any broadband and use my MDA Touch for web browsing via GPRS, which is a pain on the 320x240 screen and no keyboard..... I was hoping o use the AA1 for web browsing via the wmwifirouter. Worked well for one day but not since then. I have since upgraded to the web'n'walk plan, so it's not costing me a pound a day but 7.50 a month. Could it be that T-Mobile restricts something???

Stefan
 
I have since used channel 6 again and there is no difference. Also, a friend came round with his xp laptop and managed to connect and browse the internet with my wmwifirouter, so the problem lies with the aa1.
Any ideas anybody?
Please.

Stefan
 
I am yet to try the script. I have one concern. Once the script has been run and you are in ad-hoc mode, how do you revert back to AP mode? Does a reboot do it?
 
Hi all,
sorry to bring this thread back but I'm completely stuck. I've installed WMWifirouter on to my HTC620 smartphone, and I know it's working because I can see and connect to it using an iphone.

On the Aspire One I've followed the instructions given by Carbrinus after typing su and then entering my pasword. In terminal all seems right, no errors, NetworkManager stops and restarts. I then switch off the wifi on the aspire as instructed, switch back on and all that happens is it reconnects to my home network.

When I go into NetworkManager / new / wlan / access point - select, it shows my home router + several neighboring wireless points but not the WMWifiRouter. WMWifiRouter is running on the smartphone and is seen by the iphone.

Can anyone point out what I'm doing wrong???

I consider myself an advanced Windoze user but am a complete novice with Linux. I've only had the Aspire One for less than a week and love it, but really really want to be able to connect through the phone when out and about.

Many thank

John
 
did u guys ever make AA1 with linpus to connect to an ad-hoc connection when encryption is on ? if yes please give me the procedure...currently I run the script and I am getting the same errors as others previously shown:

wifi0: unknown hardware address type 801
/sbin/dhclient-script: configuration for ath0 not found. Continuing with defaults.
/etc/sysconfig/network-scripts/network-functions: line 78: ath0: No such file or directory
wifi0: unknown hardware address type 801

...etc

I tried removing the battery, rebooting, running the script or line by line running the commands...it reaches the last command: 'dhclient ath0' and I get the errors...

Thanks in advance :)
 
Hello everybody. I'm following the instructions very carefully and I can't get the one connected with the WMWifiRouter in my PPC...
I paste below what I get from the terminal. Any help, clue or suggestion will be very welcome...
Thanks for reading and sorry for the bad english.
B.

[user@localhost home]$ su
Password:
[root@localhost home]#
[root@localhost home]# /etc/rc.d/init.d/NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
[root@localhost home]# ifconfig ath0 down
[root@localhost home]# wlanconfig ath0 destroy
[root@localhost home]# wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
ath0
[root@localhost home]# iwconfig ath0 channel 11
[root@localhost home]# iwconfig ath0 essid isidro
[root@localhost home]# ifconfig ath0 up
[root@localhost home]# dhclient ath0
Internet Systems Consortium DHCP Client V3.0.6-Fedora
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wifi0: unknown hardware address type 801
/sbin/dhclient-script: configuration for ath0 not found. Continuing with defaults.
/etc/sysconfig/network-scripts/network-functions: line 78: ath0: No such file or directory
wifi0: unknown hardware address type 801
Listening on LPF/ath0/00:22:69:0b:2f:c1
Sending on LPF/ath0/00:22:69:0b:2f:c1
Sending on Socket/fallback
DHCPREQUEST on ath0 to 255.255.255.255 port 67
DHCPACK from 192.168.3.1
/sbin/dhclient-script: configuration for ath0 not found. Continuing with defaults.
/etc/sysconfig/network-scripts/network-functions: line 78: ath0: No such file or directory
bound to 192.168.3.224 -- renewal in 41272 seconds.
[root@localhost home]#
 
here is the script i made for when i need to use ad-hoc

Code:
#!/bin/sh
#[email protected]
#

# The stop function
stop() {
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode managed
    ifconfig ath0 up
}

# The start function
start() {
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode monitor
    ifconfig ath0 up
}


# Main if statment to see what user wants
if [ "$1" = "start" ]; then
    start
elif [ "$1" = "stop" ]; then
    stop
else
    echo "usage = monitor start / stop"
fi
[user@localhost sh]$ cat adhoc
#!/bin/sh
#[email protected]
#

# The stop function
stop() {
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode managed
    ifconfig ath0 up
}

# The start function
start() {
    ifconfig ath0 down
    wlanconfig ath0 destroy
    wlanconfig ath0 create wlandev wifi0 wlanmode ad-hoc
    ifconfig ath0 up
}


# Main if statment to see what user wants
if [ "$1" = "start" ]; then
    start
elif [ "$1" = "stop" ]; then
    stop
else
    echo "usage = adhoc start / stop"
fi

save as adhoc (no file type)
Code:
chmod 755 adhoc && sudo cp adhoc /usr/bin/
log inn as su and start or stop adhoc
Code:
su
enter password
adhoc start
or
adhoc stop
 
Thanks a lot maxtors, but i still get an error...
[user@localhost ~]$ chmod 755 adhoc && sudo cp adhoc /usr/bin/
[user@localhost ~]$ su
Password:
[root@localhost user]# start adhoc
bash: start: command not found
[root@localhost user]# adhoc start
ath0
/usr/bin/adhoc: line 31: [user@localhost: command not found
ath0
[root@localhost user]# adhoc stop
ath0
/usr/bin/adhoc: line 31: [user@localhost: command not found
ath0
[root@localhost user]#

Any idea?
 
maxtor inadvertently copied his script twice into the code box.

Everything after line 30 is a repeat of earlier code, together with (at line 31) the command prompt and the command he entered to copy the text over in the first place!

Just type
Code:
mousepad adhoc
into a terminal, then delete everything from
Code:
[user@localhost sh]$ cat adhoc
onward, (including that line). Save the file and try again!
 
Ok, dumb Windows only user question time. :?

What do I use to create the script? In Windows for example I'd use something like notepad?

Likewise, when I've created the script - where do I save it?

The chmod 755 adhoc && sudo cp adhoc /usr/bin/ part - should that be part of the script or is it a command I should be running somewhere? if so, where and how (in a Terminal?)

Sorry if the questions are dumb, I'm 3rd level support in a Windows Environment but Linux is new to me and I'd like to learn more (hence not just reloading my One with Windows).

Thanks in advance guys :mrgreen:
 
capricorn1 said:
Ok, dumb Windows only user question time. :?
What do I use to create the script? In Windows for example I'd use something like notepad?

Mousepad. It's not in the standrad Linpus desktop menus, but you can run it by doing ALT-F2 and typing 'mousepad' in the dialog box.

Likewise, when I've created the script - where do I save it?
You can save it wherever you like, to start with!

The chmod 755 adhoc && sudo cp adhoc /usr/bin/ part - should that be part of the script or is it a command I should be running somewhere? if so, where and how (in a Terminal?)
Those lines are not part of the script - they are Terminal commands which affect the script.

The first one changes its 'mode' (hence 'chmod') to make it executable (Linux won't execute a file unless it's been made executable - that's one of the things which makes it much harder to make a virus work in Linux - not only does the user have to download it, but they also have to explicitly make it executable before it will run. Just clicking on a download link won't run anything!).

The second one copies the script into the directory /usr/bin. This is where many executable files 'live' - they are "user" rather than main system files (so usr), and originally most of them were binaries (so bin). These three letter directory names are a very historic throwback and no longer at all necessary, but Unix/Linux people are used to them so they survive for certain purposes!

The reason for putting the script there is that /usr/bin is part of the path Linux automatically uses to find programs, so if it's in /usr/bin you can start the program by just typing 'adhoc'.

Sorry if the questions are dumb, I'm 3rd level support in a Windows Environment but Linux is new to me and I'd like to learn more (hence not just reloading my One with Windows).
Hope this helps. It might be worth checking your local library to see if they have a book on using Linux - even if it's a bit old it will give you a lot of the basic concepts which don't change.

Your questions aren't dumb at all - Linux is not the same as Windows, and it's better to ask questions than expect things to work the same way when they won't!
 
Hey!

I got that script working now but my A110 + Linpus wont find any wireless connections when i start adhoc.

What what should i do?

When I start adhoc, A110 closes my connection to my home wlan. And then I start my Joikuspot premium and go to wlan connection manager, but connection manager wont find any connections. I have tried to chance channelnumber to 1,6, 11 and automatic, but it still wont find my Nokia N81 connection.

Help me please :roll:
 
Anyone found a solution that works for everyone yet? I;ve tried it a dozen of times now, but the scripts so far dont seem to work with my A1 and Nokia N82. And im not the only one who doesnt seem to get it to work.

If anyone has a suggestion, it would be highly appreciated.

Greetz..
 
Back
Top