Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Oct 2014, 11:25
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
My own WiFi AP: works with pfix-ram, but not with a savefile
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Mon 22 Jul 2013, 10:05    Post subject:  My own WiFi AP: works with pfix-ram, but not with a savefile  

Preface: I'm nearly a total ignorant if it comes for networking, so sorry for my 'non-tech', and perhaps confusing, language of describing the stuff.

Ok, here's the background.
I have Slacko-5.5-PAE installed on my, let's name it, Host-Box (Toshiba laptop).
It's connected to the internet via eth0.
I want to share this connection through WiFi with my second laptop (Acer netbook, a.k.a. Client-Box), on which is Slacko-5.5-PAE as well.

Scenario A:
1. Boot my Host-Box using pfix=ram; eth0 connection gets automatically configured.
2. Install ShareIntenet-2.2.4.pet
3. Install hostapd.pet
4. Create my custom /etc/hostapd.conf:
Code:
interface=wlan0
driver=nl80211
ssid=NetLink
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=SomePassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

(btw, in original there was wpa=3, but it didn't work at all)
5. Launch hostapd using:
Code:
ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0
hostapd /etc/hostapd.conf

6. Launch ShareInternet

After that I'm perfectly able to connect my Client-Box via WiFi and use internet.

Scenario B:
1-6. (same as 1-6 in Scenario A)
7. Create savefile and reboot
8. Launch hostapd & Shareinternet

Scenario C:
1. Boot my Host-Box with pfix=ram; eth0 connection gets automatically configured
2. Create savefile and reboot
3. (same as 2-6 in Scenario A)

In B & C cases Client-Box can't connect to Host-Box.
Hostapd's output is only:
Quote:
./set_ap
Configuration file: /etc/hostapd.conf
Using interface wlan0 with hwaddr 70:xx:xx:xx:xx:xx and ssid "NetLink"

and nothing more, whereas in Scenario A, as soon as I launch SNS in Client-Box and select access point + password, additional data starts to flow (authentication) and after a while all's up and running.
It's probably something with authentication indeed, because Wicd (Parted Magic live launched on Client-Box) fails just at 'Authentication' stage...

Any ideas why is that happening and how to fix it?
If some additional info is needed, just let me know.

TIA & Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Mon 22 Jul 2013, 13:49; edited 2 times in total
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Mon 22 Jul 2013, 12:29    Post subject:  

Update.

Trials & errors led me to this:
If I reload my wireless module on Host-Box every time before I launch hostapd, it works at last with a savefile!
Code:
# rmmod rtl8192se
# modprobe rtl8192se
# ./set_ap
Configuration file: /etc/hostapd.conf
Using interface wlan0 with hwaddr 70:xx:xx:xx:xx:xx and ssid "NetLink"
wlan0: STA 64:xx:xx:xx:xx:xx IEEE 802.11: authenticated
wlan0: STA 64:xx:xx:xx:xx:xx IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED 64:xx:xx:xx:xx:xx
wlan0: STA 64:xx:xx:xx:xx:xx RADIUS: starting accounting session 51ED5CD4-00000000
wlan0: STA 64:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
...

But it's rather drastic method, which I don't understand (remember: me=network_noob), so:
1. Why I need to reload that module?
2. Is there any simpler/better way (instead of reloading) to get the same result?

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 22 Jul 2013, 13:16    Post subject:  

I am a network zero too, but rc.sysinit tries to figure out which of a half dozen network scripts it would use . If that used one sets some incompatible default settings , I guess you would need to reset them . rmmod the driver is one possibility I think .
Good look while figuring it out .

BTW I think you should rather have posted in the hardware or programming section, since you are not a beginner anymore .

Posting from FF in WinVista since IE7 crashed several times , and happily playing around with the cygwin shell .
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Mon 22 Jul 2013, 13:48    Post subject:  

Thanks for the reply, Karl!

I'll take a look what's going on in rc.sysinit.
There must be a way to make it working!

Quote:
BTW I think you should rather have posted in the hardware or programming section, since you are not a beginner anymore .

In subject of network I'm the eternal beginner (welcome to the club, btw Smile ).
But let Flash decide where to put this thread...

Oh, and module reloading turned out to be unreliable - works only sometimes, after few trials. Crying or Very sad

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Mon 22 Jul 2013, 17:10    Post subject:  

The monstrosity below is my newest workaround.
We'll see for how long it will be working properly...
Code:
#!/bin/bash

rmmod rtl8192se
sleep 1
modprobe rtl8192se
sleep 1

ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0
hostapd /etc/hostapd.conf & PID=$!

sleep 5
kill $PID

rmmod rtl8192se
sleep 1
modprobe rtl8192se
sleep 1

ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0
hostapd /etc/hostapd.conf

+ launch ShareInternet.

Yuk, it's sooo ugly! Rolling Eyes

Still, any better solution (and explanation for what am I doing and why am I doing it wrong?) is welcomed. Wink

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mahaju


Joined: 11 Oct 2010
Posts: 493
Location: between the keyboard and the chair

PostPosted: Tue 15 Oct 2013, 20:23    Post subject:  

Hi
I am having problems starting Puppy Slacko with the GUI
(Please see my post here: http://www.murga-linux.com/puppy/viewtopic.php?t=89332 )
I can do puppy pfix = nox, ram and reach the command prompt. What I was trying to know is, if I can some how install the .pet's and replace the hoastapd.conf file entirely from this command prompt and never open the GUI, is it still possible to follow your tutorial and get the Internet sharing to work?
(Also, if you know how to solve my Puppy startup problem, please do help. Some definitive answers would be helpful, as I need to remotely instruct others on how to do this and there's not many different things that I can try)
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Wed 16 Oct 2013, 05:15    Post subject:  

Hey Mahaju

Never tried, but I think so.
Here's a script for installing .pets from command line:
http://www.murga-linux.com/puppy/viewtopic.php?p=526682#526682
Then you can replace the original hostapd.conf with your custom one:
Code:
mv -f /path/to/your/hostapd.conf /etc/hostapd.conf

and launch hostapd + shareinternet (/root/my-roxapps/shareInternet/AppRun).
I suppose that will be all...

As for your main problem - it's a shot in the dark, but since you can move mouse cursor and things beneath do respond, perhaps part of the problem are mouse/touchpad buttons, not working for some reason..? See if you can use keyboard (enter).

HTH
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8344

PostPosted: Wed 16 Oct 2013, 07:08    Post subject:  

Basic internet sharing would be

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

ppp0 set to whichever interface has the internet so could be eth0, wlan0 etc.

On another thread a user found puppy would not enable 2 network interfaces from a configured set up ...ie after a reboot... wondered if this was related to this problem.... its all a bit of a mystery that would be better if more was understood about it.

mike
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2258

PostPosted: Wed 16 Oct 2013, 09:33    Post subject:  

The init routines which do the setup for puppy do not really allow for overriding things. Removing the kernel module for the interface shuts it down -which allows you to then set things up manually.

I don't understand why you need to start and kill it before re-starting it. You should be able to simply 'ifconfig down wlan0' and then set it back up the way you need it. If you want it to always do that, then maybe puppy lets you put code in rc.local which will be run at the end of 'normal'(sic) startup. Even if you do need to use rmmod, I don't see anything wrong with that -it's not gonna take forever. Any bit of half-sane setup code you come up with will run much faster than the rc.sysinit routines. The madness of rc.sysinit is the inflexibility -the inability to arbitrarily turn off/on particular bits of startup...
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Wed 16 Oct 2013, 13:59    Post subject:  

Hey Mike & Amigo

I was trying lots of random things (IIRC "wlan0 down'n'up" & setting up the firewall manually were among them either) before I've ended up with the above.

Well, I'm afraid that my inborn resistance for absorbing any knowledge regarding networking prevents proper diagnosis of that weird behavior and resolving it in some better manner...

Fortunately, so far my workaround still works, so if it works - better don't touch. Wink

Thanks &
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8344

PostPosted: Wed 16 Oct 2013, 15:18    Post subject:  

Quote:
Well, I'm afraid that my inborn resistance for absorbing any knowledge regarding networking


I have the same problem with business software Very Happy

mike
Back to top
View user's profile Send private message 
mahaju


Joined: 11 Oct 2010
Posts: 493
Location: between the keyboard and the chair

PostPosted: Fri 18 Oct 2013, 14:13    Post subject:  

Hi
I was trying to get this to run on a Samsung Sens NC 108 notebook
The GUI problem was fixed but I now have another problem
I followd all your instructions and it works on my Compaq 620 laptop
But in the Sens notebook, after I give the command
Code:
hostapd /etc/hostapd.conf

I get this error:
Code:

configuration file /etc/hostapd.conf
'ine 2: invaid/unknown driver ' nl80211
'ine 4: unknown hw_mode ' g
'ine 11: invalid key_mgmt '
'.ne 12: invalid cipher '
4 errors found in configuration file '/etc/hostapd.conf'

THe hostapd webage at http://wireless.kernel.org/en/users/Documentation/hostapd says

Quote:
If that config errors out with something like:

hostapd $ sudo hostapd ./hostapd-minimal.conf
Configuration file: ./hostapd-minimal.conf
Line 2: invalid/unknown driver 'nl80211'
1 errors found in configuration file './hostapd-minimal.conf'

that means that your distro is not shipping hostapd with nl80211 driver support and you'll need to follow the building instructions that follow. If it works, you can skip down to the configuring hostapd section. If not, continue on.

which is weird, since it's the same dot pet being installed in both the computer. If the nl80211 drivers are installed on my computer by the .pet, why aren't they installed on the notebook?

Again, if I click on the .pet to install hostapd again, and execute the hostapd command in the terminal again, I now get a different error:
Code:

configuration file: /etc/hostapd.conf
nl80211: 'nl80211' Generic Netlink not found
failed to initialize driver 'nl80211'


Is there any way to fix this?
Thanks
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1078

PostPosted: Sat 19 Oct 2013, 11:37    Post subject:  

Hmm, I just checked and hostapd.pet does not come with any drivers actually.
As far as I know/guess the relevant kernel drivers are mac80211 & cfg80211 + /usr/lib/libnl-something stuff. They're OOTB in Slacko.
Perhaps that notebook's WiFi card doesn't support this functionality..?

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2367
Location: Heart of Texas

PostPosted: Sat 19 Oct 2013, 14:37    Post subject:  

Cool <posted so I can find this later> I'm trying to get my Mele1000 (FatDogARMa3) to do this as well, my wireless router takes more watts to run and can't do nice computer like things.
Back to top
View user's profile Send private message 
mahaju


Joined: 11 Oct 2010
Posts: 493
Location: between the keyboard and the chair

PostPosted: Sun 20 Oct 2013, 05:14    Post subject:  

SFR wrote:
Hmm, I just checked and hostapd.pet does not come with any drivers actually.
As far as I know/guess the relevant kernel drivers are mac80211 & cfg80211 + /usr/lib/libnl-something stuff. They're OOTB in Slacko.
Perhaps that notebook's WiFi card doesn't support this functionality..?

Greetings!


So is there any way I can find out whether the wifi card supports internet sharing or not?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0988s ][ Queries: 11 (0.0044s) ][ GZIP on ]