WlanMaker

Problems and successes with specific brands/models of networking hardware.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

WlanMaker

#1 Post by rcrsn51 »

Project moved here.

This project will run in some Puppies. Get the package "hostapd" from the PPM. Click-install the wlanmaker .deb package.

------------------------
Last edited by rcrsn51 on Sun 13 Oct 2019, 09:23, edited 25 times in total.

stemsee

#2 Post by stemsee »

Code: Select all

#!/bin/sh
dep=`which routermaker`
wifid=`rfkill list | grep 'phy1'`

if [ -z "$wifid" ]; then
		yaf-splash -text "Initiate or install 2nd wifi card."
		if [[ -z "$dep" ]]; then
			yaf-splash -text "Install routermaker first"
		fi
	exit 1
else
	hotspot=$(yad --width 280 --title "Input name for hotspot" --entry)
	mimi=$(yad --width 280 --title "Input 8 charachter password" --entry)
	srcdev=$(yad --width 300 --title "Share internet from wlan0 usb0 eth0?" --entry)
	destdev=$(yad --width 300 --title "Share internet with wlan1/2, eth1/2?" --entry)
        newip=$(yad --width 300 --title "New IP subnet: 193.168.32.1" --entry)
         
	routermaker "$srcdev" "$destdev" "$hotspot" "$mimi" "$newip" &
fi

stemsee

#3 Post by stemsee »

When I create a hotspot either with or without shared internet i.e. wlanmaker or routermaker, no ip address is provided, which means I must assign a static ip address on the connecting device. This means I have to know the ip address of the hotspot.

Any idea why it is not providing an ip address through dhcp?

cheers

stemsee

#4 Post by stemsee »

Trying to share internet results in this message
Attachments
capture25474.jpg
(10.29 KiB) Downloaded 2442 times

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#5 Post by rcrsn51 »

One of RouterMaker's jobs is to provide IP addresses for its clients by running a DHCP server. RouterMaker uses dnsmasq and WlanMaker uses udhcpd. In each case, there is a config file in /etc. These files are essential and are part of the RouterMaker PET.

In the documentation, the default IP range is stated as 192.168.100.10-250. Your screenie suggests a conflict with this range.

You have been using RouterMaker for months. Has this always been a problem or is it recent?

stemsee

#6 Post by stemsee »

It is recent. Actually since I have been using usb0 my android phone which connects to btwifi and shares internet to my laptop over usb. Then I have wlan0 (mini pcie) and wlan1 (realtek ath9 usb dongle) with which I wish to share.

After some research I came up with these lines which I added to my yad gui script and now usb0 is sharing with wlan1.

Without these lines, just using routermaker does not accept usb0 only usb but no sharing.

so my entire script now is this.

Code: Select all

#!/bin/sh
if [ "$1" = reset ]; then
rm -f $HOME/.hotspot
fi
rmhotspot=$(yad --width 400 --title "Reset hotspot settings? 'y' or 'n'" --entry)
	if [[ -z "$rmhotspot" ]]; then
	exit 0
	fi
	if [[ "$rmhotspot" = y ]]; then
	rm -f $HOME/.hotspot	
if [[ ! -f $HOME/.hotspot ]]; then
	hotspot=$(yad --width 400 --title "Input name for hotspot" --entry)
	if [[ -z "$hotspot" ]]; then
	exit 0
	fi
	mimi=$(yad --width 400 --title "Input 8 charachter password" --entry)
	if [[ -z "$mimi" ]]; then
	exit 0
	fi
	srcdev=$(yad --width 420 --title "Share internet from wlan0 usb0 eth0?" --entry)
	if [[ -z "$srcdev" ]]; then
	exit 0
	fi
	destdev=$(yad --width 420 --title "Share internet with wlan1/2, eth1/2?" --entry)
	if [[ -z "$destdev" ]]; then
	exit 0
	fi
	newip=$(yad --width 420 --title "New IP subnet: 193.178.1.23" --entry)
	if [[ -z "$newip" ]]; then
	exit 0
	fi
	
	echo "hotspot=$hotspot
mimi=$mimi
srcdev=$srcdev
destdev=$destdev
newip=$newip" > $HOME/.hotspot
	fi
elif [[ "$rmhotspot" = n ]]; then
	. $HOME/.hotspot
fi

choice=$(yad --width=400 --title "Hotspot 'with' or 'without' internet access?" --entry)
case $choice in
with)
	routermaker "$srcdev" "$destdev" "$hotspot" "$mimi" "$newip" &
	echo 1 > /proc/sys/net/ipv4/ip_forward
	/sbin/iptables -t nat -A POSTROUTING -o "$srcdev" -j MASQUERADE
	/sbin/iptables -A FORWARD -i "$srcdev" -o "$destdev" -m state
	#/sbin/iptables -A FORWARD -i "$srcdev" -o "$destdev" -j ACCEPT
;;
without)
	wlanmaker "$destdev" "$hotspot" "$mimi" &
;;
esac

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#7 Post by Atle »

And this... Is really great work:-)

I am a really really nobody when it comes to code and understanding of such. But a do know what is possible and what can become fun and very useful.

With this, can i configure and remaster one of these strip down versions of Slacko and add a webserver with lets say Joomla and all that comes with, like chess, chat, fileserver and what not?

Could this be the "carrier" of nothing but a webserver that people can connect to and also... maybe gameserver? :-)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

RouterMaker/WlanMaker are experimental and largely untested. They just provide the backbone for a network using a Puppy machine instead of a physical router. What you connect to the network and what actually works is up to you.

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#9 Post by Atle »

As good as a answer can get...

I download and install Slacko 6.3 32 bits and 64 bits and hope to be able to test.

PS... Should this not be promoted also under software/networking?

I looks like a hit to me :-)

atle

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#10 Post by Atle »

So... Slacko 6.3-64 worked like a dream. Meanwhile Slacko6.3-32 was not success.

It reports back /usr/bin/wlanmaker: line 36 hostapd: command not found

And then I have tested on the same machine that worked with the 64 slacko.

I can not say why it is like this, but there is no entry in that folder named wlanmaker that i found in the 64 bits versions same folder.

So as it looks to me somethings goes wrong during installation on slacko 6.3-32.

But lets assume one gets over that? Maybe my installation pet file was broken somehow or something ill figure out when double checking.

When i get this or that version up and going and when a guest wants to visit my wlan, then how can it become auto that they end up at the hosts localhost? If they put in google.com they still get sent to my welcome page.

I am at a mobile network currently and not so keen on downloading large files like 5.7 and _LAMP etc, but that will be my first thing to do when back in civilization.

I really really LOVE this neat program. It does JUST what I have been looking for for years. You can even trace back request from me about this on hostapd mailing list about 5 years ago...

So you just made my YEAR :-)

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#11 Post by Atle »

As for the "Windows will show limited network" as there is no internet...

Huuhm... Now i have not used Windows in many years, but when them winfolks log on to the wlan at lets say McDonalds, do they then get that message? Because they just needs to accept some user terms and the they are on the internet. Would be fun to know if anyone is out there and can check that one in or out..

Now I assume I got a similar system to McDonald, where the guest gets routed to a default page. will that "limited net" still show up?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

I'm glad that you are pleased with WlanMaker. Unfortunately, your report doesn't make much sense.
So... Slacko 6.3-64 worked like a dream.
The hostapd package that you downloaded from Debian is 32-bit. It would NEVER work in a 64-bit Puppy. [Edit] Unless you are running a 32-bit compatibility pack. This is untested.
Meanwhile Slacko6.3-32 was not success.It reports back /usr/bin/wlanmaker: line 36 hostapd: command not found
If you installed the Debian package correctly in Puppy, you would NOT get that message.
I can not say why it is like this, but there is no entry in that folder named wlanmaker that i found in the 64 bits versions same folder.
Both hostapd and the wlanmaker script are installed into /usr/sbin. I think that you need a clean install of your Puppy.
When i get this or that version up and going and when a guest wants to visit my wlan, then how can it become auto that they end up at the hosts localhost? If they put in google.com they still get sent to my welcome page.
A WlanMaker network has NO connection to the Internet. Users cannot reach google.com. They will access your web server through its IP address, like

Code: Select all

http://192.168.100.1

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#13 Post by Atle »

Hi there...

I can believe my report does not make much sense.

Its for sure i had the 32 bits lib installed due to trying skype. So for sure that is the reason it came out so nice in Slacko 6.3 64.

But on the other hand, all i did was installing the pet provided. maybe first the file i downloaded by PM, was also with hostapd included?

Cause i am quite sure i did install the hostapd file, but i could have done it due to "lots of impatience"...

Never the less the others "tests" was done without and I need to redo them all. And I am sorry i made this mistake. Not my wish to be a timewaster...


atle

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#14 Post by rcrsn51 »

If your 32-bit Puppy already had an install of RouterMaker, you need to:

1. Either uninstall it or do a clean install of Puppy.
2. Install the Debian package of hostapd as described in the notes.
3. Install the WlanMaker PET.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#15 Post by watchdog »

What might it be done in order to share internet in slacko 6.3.0 or tahr 6.0.5? Using the precise hostapd which recognizes the Ralink RT73USB dongle (module rt73usb).

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

watchdog wrote:What might it be done in order to share internet in slacko 6.3.0 or tahr 6.0.5?
WlanMaker is NOT an Internet sharing tool. It does NOT provide Internet access to client computers.
There are other Puppy projects that can provide Internet sharing.
Using the precise hostapd which recognizes the Ralink RT73USB dongle (module rt73usb).
I don't have one of these. It may or may not be capable of switching to an access point. But you could test it yourself in WlanMaker and report.

Or are you stating that rt73usb CAN work as an AP?

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#17 Post by watchdog »

rcrsn51 wrote: I don't have one of these. It may or may not be capable of switching to an access point. But you could test it yourself in WlanMaker and report.

Or are you stating that rt73usb CAN work as an AP?
Yes, it does work as access point, I think. But I was not able to share the eth0 internet connection. I have success only in slacko 5.6. I'm a newbie about networking and I don't know much about LANs: the access point works in slacko 6.3.0 or tahr 6.0.5 as I can connect a wifi tablet (I read "connected") but there is not internet connection. I think shareinternet 2.2.4 or 2.2.6 needs some updates for recent puppies.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#18 Post by rcrsn51 »

The problem that you are describing suggests that the kernel is at fault. It must be built with certain modules that provide internet sharing. They are part of iptables.

You should ask in the Slacko 630 or Tahrpup 605 threads.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#19 Post by watchdog »

Many thanks for the explanation. I'll stick with slacko 5.6 for the wifi hotspot job. No need to compile a new kernel for slacko 6.3.0. When I have time I'll try to switch kernels.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#20 Post by watchdog »

I have solved the sharing internet problem making a wifi hotspot switching in tahr 6.0.5 32 bit to the fatdog's 3.18.7 kernel which has full 32-64 bit support. Not tried wlanmaker but the SFR's HowTo worked for me.

http://www.murga-linux.com/puppy/viewtopic.php?t=87584

Post Reply