A Linux computer can be used as wifi access point ("hotspot") using the hostapd application, now attached.
At Feb 2013 I have compiled hostapd under Slacko 5.4. This package might work with other Puppy versions and their modern kernels, but it's likely to fail with older Puppy versions (such as Lucid 5.1/5.2.x) since older kernels don't have "nl80211" wifi support.

First have a think about:
- what you want your Access Point to be known as - this is the SSID.
- whether you want WPA or WPA2 encryption, or no encryption.
- if encryption, what passphrase. Then you should convert your chosen ASCII passphrase into its true 64 digit hex value, using this command -

Code:

wpa_passphrase <ssid> <passphrase>

All of these parameters then need to be entered into the configuration file; /etc/hostapd.conf
I have pre-configured this file for the SSID of "Puppy_Hotspot", using WPA2 encryption, with the PSK passphrase "woof1234".
so there's no need to change anything - you can just use my settings if you wish.
But it's worth opening /etc/hostapd.conf in Geany just to see what I'm talking about. You will see that I have commented out the PSK password (woof1234) and used the full passphrase hex value, calculated as explained earlier.
Note the relevant value for WPA2 encryption: "wpa_pairwise=CCMP"
If you want to use the older WPA encryption, you will need: "wpa_pairwise=TKIP" and "wpa=0"
And if you want no encryption, you will need to comment out the line "wpa=.."

Now connect your Puppy computer's ethernet interface to some form of modem/router. This will be the internet connection that you are about to share via your wifi interface.

I will assume your ethernet interface is "eth0" and your wifi interface is "wlan0".
If in doubt, run this command to check -

Code:

ifconfig

If you have previously set up your ethernet interface with Puppy's Network Wizard, these settings must be killed. First bring down the ethernet interface -

Code:

ifconfig eth0 down

Now you must kill the dhcpcd daemon - THIS IS VERY IMPORTANT.
Go to Menu > System > System Status and Config > Pprocess process manager
and somewhere in the list of processes you should see "dhcpcd -d -l eth0"
Select it, and press "End process"
Now you need to remove the stale dhcpcd run file with this command -

Note that your Puppy computer is now seen on the LAN by its bridged interface: br0.
Now in theory it's optional to give the Puppy computer an IP address for its bridged interface,
but in practice I found this is essential. So do this -

Code:

rm -f /var/run/dhcpcd-br0.*
dhcpcd -t 30 -h puppypc -d br0

I found that this may take 15 seconds or so! dhcpcd seems to struggle with a "br0" interface.
Various code will run by, and eventually you should see "...forking to background".

Now you're finally ready to run the hostapd daemon

Code:

hostapd /etc/hostapd.conf -dd

The last two lines you see will be
"wlan0: Setup of interface done.
l2_packet_receive - recvfrom: Network is down"
Don't worry, this means success.

Any wifi client (running on any operating system) should now be able to connect to your Puppy access point.

THE GOOD NEWS IS THAT I HAVE CREATED A SCRIPT WITH ALL THESE COMMANDS!
The script is installed at /usr/bin and it's called "Wifi-AP-launch.sh"
Obviously you can run this script from an rxvt terminal, but better still, I have created a desktop launch-script called "Wifi-AP-launch". With ROX, go to /usr/bin and drag the icon for "Wifi-AP-launch" (not Wifi-AP-launch.sh") onto the desktop. This is ready to go, but it has a generic icon. To give it a nice icon, right-click it, select File 'Wifi-AP-launch' > Set Icon...
and this will present a window. Use ROX to drag /usr/local/lib/X11/pixmaps/Wifi-AP-48.png into the window.
Done!Last edited by tempestuous on Sun 21 Sep 2014, 07:22; edited 1 time in total

Once configured as explained in the first post, your Puppy computer is now a wifi access point, but it's not a router.
You need to be aware that the network configuration is reliant upon the external modem or router that's connected to the ethernet port of the Puppy computer.
The modem/router will, for example, typically assign Puppy's "br0" interface an IP address of 192.168.0.2.
Then when a wifi client connects to Puppy, it's effectively looking through Puppy to the modem/router, which will most likely assign it an IP address of 192.168.0.3.

Now if you want Puppy to act as a server, that's OK, the client can access Puppy at 192.168.0.2, but Puppy is a network peer, not a network server. Puppy is dependent upon the external router for its IP address, and the various services that you run on Puppy will need to be configured for this IP address ... and the IP address can obviously change.

If you want to run server applications on your Puppy wifi access point, it would be optimal if Puppy was configured as a full network server, and the good news is that this is certainly possible. In this scenario, Puppy takes an external IP address from the modem on its ethernet interface as before, but Puppy also has its own LAN, with a different range of IP addresses, starting, for example, from 10.0.0.1.
Now Puppy's internal IP address is fixed, and the wifi clients can always access Puppy at the same address.

The bad news is that I don't know how to set this up.
I know that some of our forum regulars are experts in networking, and they would need to weigh in with the right information.Last edited by tempestuous on Sun 21 Sep 2014, 07:24; edited 1 time in total

I have a Atheros AR5BXB63 listed as AR242x/AR542x that uses ath5k driver.

Did not succeed with the non PAE Slacko that has a slightly older kernel then the PAE version, so the one with a more new kernel is downloaded now.

Found some useful information about Hostapd that might be useful in order to understand Hostapd

My aim is to have a working laptop with hostapd hooked to the webserver and then install Joomla 3.0. A out of the box solution:-) Offered as a download for other happy puppy campers...

******************************
Update I

With the Slacko PAE version and a never kernel it WORKED...
Yet I must still figure out why the hostapd does not give out a IP adress.
That... I think... I will find out soon...
*****************************
*****************************
Update II

I uninstalled the Bridge pet and all of a sudden the signal came good as it was reported as a low signal. I guess i am not going to bridge and does not need that. I google a little around to see if others have made similar, a webserver that you connect to with hostapd, but have not found any good information. But... the good news is that its not supposed to be finished today, but soon it needs to work..

Might also be the android phone i use for testing the connection...
*******************************

I have already installed both the dot pets mentioned at the beginning of the post
Also, please see here for my attempts at trying to make this work in Lucid Puppy 5.1.1 (which did not work, by the way, which is the reason I tried this on Slacko 5.6)
http://www.murga-linux.com/puppy/viewtopic.php?t=88751

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

Posted: Sat 14 Sep 2013, 23:35 Post subject:

It was slacko-5.6-PAE I downloaded from here:
http://distro.ibiblio.org/puppylinux/puppy-5.6/
Do I need to download the non PAE version again?
By the way, I could not get it to work on Windows 7 Home Professional installed in this laptop's harddrive either
Is there any way I check whether my hardware supports this feature or not?

I think I'd better follow the instructions on the link you provided because I don't want to download Slacko 5.6 non PAE just to find out it doesn't work
I don't mind the puppy version as long as I can get the feature
By the way, I will need to do this again later in another notebook computer (Not laptop). It's less than a year old so I am guessing the hardware itself will support this feature
What I want to know is, ff I make sure that I can get this feature to work on my laptop, can I also be fairly certain that it will work on the other notebook?

I think I'd better follow the instructions on the link you provided because I don't want to download Slacko 5.6 non PAE just to find out it doesn't work

Unfortunately, in this case Slacko-5.6-PAE (not Slacko-5.5-PAE) also lacks at least one of needed modules, it's ipt_MASQUERADE.ko.
Sorry, but I don't think you'll get it to work on the PAE version, unless you compile the missing modules yourself (I tried, I failed, I switched to NON-PAE).
BTW, Mick already knows about this issue and hopefully next release will be fixed.

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

Posted: Sun 15 Sep 2013, 06:44 Post subject:

I've got the NON PAE version runinng (in fact I'm using it right now )
Anyway, like I said, I don't mind the puppy version as long as I can get it to share the laptop's ethernet connection through Wifi
I will post my updates here soon
thank you for your help

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

Posted: Sun 15 Sep 2013, 07:22 Post subject:

WOW it's working
Thanks a lot ^___^
the good thing is I can use the Internet both on the computer and the tablet now
Thank you soooo much
Just want to make sure about one thing though
To change the name of the network that the tablet sees in the Wifi list, I have to change

Code:

ssid=NetLink

and to change the password, I have to change

Code:

wpa_passphrase=SomePassword

Is this all that I need to do? (I just want to make sure, as I have no idea what is happenning behind the scenes, or how do I trouble shoot it if something goes wrong
I am actually confused about this part of the original post

Quote:

if encryption, what passphrase. Then you should convert your chosen ASCII passphrase into its true 64 digit hex value, using this command -
Code:
wpa_passphrase <ssid> <passphrase>

Do I need to worry about this if I use wpa_passphrase=SomePassword in the conf file?

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