User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Oct 29, 2020 3:26 am

.
WIRESHARK ON MY WIFI-TO-WIFI ROUTER:
As a fun test for no particular reason, I ran the Wireshark network traffic analyzer on my WiFi-to-WiFi router.

Wireshark allows me to detect and analyze all the data packets travelling through my router — and any device(s) connected to it.

Getting it to work was easy. Here's what I did!

I began by doing exactly what you see in my infographic at the beginning of my tutorial:

Image

Here are the exact steps I took:

1: Activated my iPad's mobile hotspot (Apple calls it a “Personal Hotspot”).

2: Activated my Raspberry-based router (the toggle switch on the desktop said "Router is On").

3: Connected my iPhone to my router's Access Point.

4: Installed Wireshark by running sudo apt install wireshark in Terminal.

5: During the package installation, a configuration screen automatically appeared. It said "Should non-superusers be able to capture packets?" I accepted the default option and said NO by tapping the Enter key.

6: To launch Wireshark, I simply ran sudo wireshark

7: An interface-selection screen then appeared. I clicked the drop-down box on the right-hand side and unchecked all the boxes except "Wireless". It then correctly showed the two WiFi interfaces that my router creates — OBwlan0 (the Raspberry's on-board WiFi chip) and DGwlan1 (the USB WiFi dongle).

8: I then double-clicked OBwlan0 — because that's my router's Access Point. It's what my iPhone was connected to.

9: I then clicked the green shark fin button in the upper-left corner — "Restart current capture". That cleared out all extraneous data traffic unrelated to what I was about to do.

10: On my iPhone's Safari web browser, I quickly tapped a shortcut to BBC News at https://www.bbc.co.uk/news

And that was that — I sat back and watched all the network traffic flowing in and out of my iPhone — a crazy range of activity triggered by visiting just one website!

The following two screenshots were taken directly from Wireshark in full-screen mode on my WiFi-to-WiFi router — which was running on my Raspberry Pi 4 with the 64-bit beta version of Raspberry Pi OS.

The first image shows Wireshark's interface-selection screen and my router's two interfaces. As mentioned, I opened OBwlan0.

The second image shows that in less than 0.9 seconds, 50 data packets were detected when I used my iPhone to access the BBC News website from the United States — while connected to my Raspberry-based WiFi-to-WiFi router — which in turn was connected to my iPad — which in turn was connected to the internet via a 4G cellular-data network!

WiFi-to-WiFi_Router_Wireshark_Interface_Selection_RPi_Mike.png
WiFi-to-WiFi_Router_Wireshark_Interface_Selection_RPi_Mike.png (25.63 KiB) Viewed 1855 times



WiFi-to-WiFi_Router_Wireshark_Data_Traffic_on_OBwlan0_RPi_Mike.png
WiFi-to-WiFi_Router_Wireshark_Data_Traffic_on_OBwlan0_RPi_Mike.png (123.94 KiB) Viewed 1855 times

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Fri Oct 30, 2020 12:30 am

lewisandclark wrote:
Wed Oct 28, 2020 4:51 pm
Sorry for a poorly worded question. I was actually asking if you had a dedicated link/web page to the instructions as you outlined on the forum..... I like to have a printed hardcopy to make notes as I am still old school. (LOL)

I have written my tutorials exclusively for this website, so this is the only place you’ll find them — other than a random entity grabbing my content and posting it elsewhere.

jiml8
Posts: 91
Joined: Wed Aug 05, 2020 6:27 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Fri Oct 30, 2020 3:37 pm

One of the most common ways cell carriers use to detect tethering is by examining the TTL of incoming packets.

The default TTL on both Android and IOS phones is 64; any packets originating on of those devices will arrive at the cell carrier's network will have TTL of 64 as the packet is incoming.

Linux, Windows, and OSX also use TTL 64 as their default. Therefore any client system that is using the phone as a tether will originate packets with a TTL of 64, and the phone will decrement that TTL to 63, which is what will arrive at the carrier's network...and BANG, you're busted.

Any client that sits behind this device would wind up with packets arriving at the cell carrier with a TTL of 62.

Therefore, this device would enhance its effectiveness by changing the TTL on any outgoing packets to 65.

Changing the TTL of packets originating on the box is easy enough (and this is how I do it on my linux clients when I tether); as root enter "sysctl net.ipv4.ip_default_ttl=65" to do it. But to change the TTL of packets flowing through the box requires using iptables.

The command that will do it should be this one, though I have not tested it personally:

Code: Select all

sudo iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65 
I do not believe this is 100% effective; apparently some carriers use other indicators that I am not aware of. However, reportedly using a VPN as well as this change to TTL will conceal those indicators. An optional VPN connection with this device would therefore also be very useful.

lewisandclark
Posts: 4
Joined: Sun Oct 18, 2020 10:18 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Sat Oct 31, 2020 4:16 am

I will pay closer attention in class. :D Have you played in the WTW system with the Pi Zero W? Would it work as a simple node? Meaning does it have enough hardware/software resources to serve as a client node. Too little processing power?Limited memory? Would the Bash scripts process effectively in a small footprint like the Zero? Thanks

manueldimitri
Posts: 4
Joined: Thu Nov 05, 2020 3:34 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Nov 05, 2020 3:38 pm

Hi RPi_Mike,

Excelent tutorial.

I've been following the tutorial from Ingo user, which they are really good.

I found yours really cool however I still were able to enable it. I'm trying to use it as a wifi repeater to my home internet, which your project should work perfectly fine.

One of the parts I encounter is when upgrading wpa_supplicant. After I upgrade I try to check the version but cannot find it:

pi@raspberrypi:~ $ wpa_supplicant --version
-bash: wpa_supplicant: command not found

Not sure if I'm actually doing something wrong or not.

Any suggestion how to troubleshoot this?

Regards,
Igor Marques

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Fri Nov 06, 2020 2:57 am

manueldimitri wrote:
Thu Nov 05, 2020 3:38 pm
One of the parts I encounter is when upgrading wpa_supplicant. After I upgrade I try to check the version but cannot find it:

pi@raspberrypi:~ $ wpa_supplicant --version
-bash: wpa_supplicant: command not found

Not sure if I'm actually doing something wrong or not.

Any suggestion how to troubleshoot this?

I've been busy watching the insane election here in America — and doing some other things too.

In the near future, I'll have some interesting things to say about TTL.

In the mean time, however, I wanted to quickly jump on here and point out a few things to the last poster:

--version is not a recognized option for wpa_supplicant.

My tutorial clearly states that it's -version with a single dash. If you add an extra dash, as you did, you'll get an "invalid option" error.

Details matter, especially when it comes to computers:

Even 99.999% perfect may not be good enough!

For example, making just one mistake out of 100,000 characters — like a 0 that should have been a 1 — can easily be enough to cause a total failure.

So it does make me wonder about the other ways you may have deviated from my very clear, explicit, fully-tested and verified instructions.

The extra dash doesn't explain your problem, however — because you got a "command not found" error.

Almost certainly, that means you had a failed build of wpa_supplicant.

There's something else that's strange — you say your output is:

-bash: wpa_supplicant: command not found

But on a normal Raspberry Pi OS system, a missing wpa_supplicant would generate this error message:

bash: wpa_supplicant: command not found

See the difference?

Your output begins with yet another inappropriate dash!

So the bottom line is this:

Please carefully re-read my tutorial.

Make sure you pay attention to the basics — like whether or not you have a reliable internet connection — and whether or not you have a truly standard, unmodified system. In particular, I would point you to four different sections of my tutorial that I took the time and effort to write:

SO MIKE — WHAT DO I NEED TO CREATE YOUR WIFI-TO-WIFI ROUTER?

I ATE MY OWN DOG FOOD

WARNING

STEP 2: OPTIONAL BUT STRONGLY RECOMMENDED — BUILD THE LATEST VERSION OF WPA_SUPPLICANT (v2.9)

If, after all that, you still can't get it working, I have only one final bit of advice:

Back up any important data, completely NUKE your system by burning a brand-new copy of Raspberry Pi OS, and re-do my tutorial from the very beginning!

manueldimitri
Posts: 4
Joined: Thu Nov 05, 2020 3:34 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Fri Nov 06, 2020 1:23 pm

Hi RPi_Mike,

Thank you for your feedback.

That election has been crazy lool

No worries about the time. Anyway, I was able to work out it by using your downgrading of wpa_supplicant to version 2.8 and then upgrading again to 2.9 and it worked after it.

Amazing project and works perfectly fine. But I've a request if possible. In addiction to the wifi hotspot I want to be able to share that connection through ethernet cable to a router or a switch. After I enable your Wifi-to-Wifi router I notice the eth0 is not available anymore so I guess you didn't have that option available.

Do you think in adding that in the future? Or you have that already workout and it will be easy simple to added it?

Regards,
Igor Marques

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Nov 12, 2020 5:28 am

manueldimitri wrote:
Fri Nov 06, 2020 1:23 pm
Amazing project and works perfectly fine.

Glad to hear everything works!



manueldimitri wrote:
Fri Nov 06, 2020 1:23 pm
Anyway, I was able to work out it by using your downgrading of wpa_supplicant to version 2.8 and then upgrading again to 2.9 and it worked after it.

I of course have no idea what you may or may not have done at any point.

What other users do with their systems, or how well they have followed my instructions, is a giant BLACK BOX to me.

That's why I put such a huge emphasis on having a "truly standard, unmodified system" — and following my instructions to the letter.

As long as you do that, my tutorial is nearly guaranteed to work.

So just to prevent others from getting the wrong impression about your "solution", it's almost certain that you did NOT have to use my "downgrade script" to revert back to v2.8 of wpa_supplicant.

Instead, when you first ran my v2.9 building script, it's very likely that you simply had a temporary problem with your internet connection — or one of the servers that my building script needs to connect to was temporarily down. So that means v2.9 was probably never built and installed in the first place — so there wouldn't have been anything to "downgrade" from anyway!

So the fact you thought you were doing a downgrade — and then re-ran my upgrade script and everything worked... well, that was almost certainly a coincidence!

Nonetheless, if something initially goes wrong with the v2.9 build, there's nothing wrong with running my "downgrade" to v2.8 until the necessary online resources become available again to build v2.9 — whether or not the "downgrade" is even necessary. It might throw a few harmless error messages — but it won't hurt. And you can be confident that you at least have a working copy of v2.8 until you're able to upgrade to v2.9.



manueldimitri wrote:
Fri Nov 06, 2020 1:23 pm
Amazing project and works perfectly fine. But I've a request if possible. In addiction to the wifi hotspot I want to be able to share that connection through ethernet cable to a router or a switch.

What you're asking for is a rather obscure device that I would describe as a WiFi-to-WiFi-and-Ethernet router!

My tutorial definitely doesn't support that.

But if someone wants to try modifying my script to make that possible, that's fine with me!

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Nov 12, 2020 5:29 am

lewisandclark wrote:
Sat Oct 31, 2020 4:16 am
Have you played in the WTW system with the Pi Zero W? Would it work as a simple node? Meaning does it have enough hardware/software resources to serve as a client node. Too little processing power?Limited memory? Would the Bash scripts process effectively in a small footprint like the Zero? Thanks

The only Raspberries I've ever owned are the "flagship" models. In my case, that would be the Raspberry Pi 3B, 3B+ and 4B.

So those are the only models I've used to test my WiFi-to-WiFi router.

Since the Pi Zero W only has 512 MB of RAM, that would be a very tight squeeze — especially since my tutorial is based exclusively on the desktop version of the operating system.

But some minor modifications of my script could probably get it working on the "Lite" version of Raspberry Pi OS. Basically, you would strip out all the desktop-related items — such as the desktop toggle switch and its related icons.

And, since the Pi Zero W's on-board WiFi only supports the 2.4 GHz spectrum, you would need to change the frequency line in my script to something like 2412 instead of 5180.

Also, I see in the Pi Zero W's specifications that it does not include a standard USB jack — which is what almost all (if not all) USB WiFi dongles require. So you would have to get a "USB OTG cable" to accommodate a standard male USB dongle plug.

On top of all that, for the Pi Zero W, several sites recommend a "powered USB hub" for any USB device with significant power demands. The WiFi dongles I've tried run pretty hot, so it's certainly possible that the Pi Zero W, by itself, would not have sufficient power to operate the dongle — so you might have to get a powered USB hub as well.

Overall, at least to me, it sounds like it's not worth the effort!

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Nov 12, 2020 5:31 am

jiml8 wrote:
Fri Oct 30, 2020 3:37 pm
The default TTL on both Android and iOS phones is 64; any packets originating on of those devices will arrive at the cell carrier's network will have TTL of 64 as the packet is incoming.

Linux, Windows, and OSX also use TTL 64 as their default. Therefore any client system that is using the phone as a tether will originate packets with a TTL of 64, and the phone will decrement that TTL to 63, which is what will arrive at the carrier's network...and BANG, you're busted.

Any client that sits [directly] behind this device [the WiFi-to-WiFi router] would wind up with packets arriving at the cell carrier with a TTL of 62.

BASIC CONFORMITY WITH A TRADITIONAL HOTSPOT IS MY ONLY GOAL:
I created my tutorial with a simple and straightforward goal — to make devices feel "comfortable" by presenting them with a completely normal and traditional hotspot — as opposed to the more specific nature of a "mobile hotspot". There is definitely no intent to "conceal" anything from the carrier.

Because of that, my normalization approach was entirely "device centric" and not "carrier centric". I just wanted the connecting device to see a "normal" WiFi hotspot!

However, I have no objection to expanding the general theme of "normalization" — to make everything behave in conformity with a completely traditional WiFi connection — not only from the standpoint of the device connecting to the WiFi-to-WiFi router, but to the carrier as well.




jiml8 wrote:
Fri Oct 30, 2020 3:37 pm
Therefore, this device [the WiFi-to-WiFi router] would enhance its effectiveness by changing the TTL on any outgoing packets to 65.

TTL NORMALIZATION (TTLN) — NOW ADDED TO MY WIFI-TO-WIFI ROUTER:
Carriers know the mobile hotspot is in use. After all, for billing purposes, carriers are able to monitor the exact hotspot usage — all the way down to the individual byte! This capability is baked into the operating system itself — and as far as I understand it, that information is available to the carrier. For example, on the iPhone, that monitoring is openly displayed and can be seen by anyone under Settings | Cellular | Cellular Data | Personal Hotspot.

As you correctly described, most devices emit packets with a TTL of 64 — which would then be reduced to 63 by any device providing a mobile hotspot in a conventional tethering arrangement.

Therefore, to be true to the principle of basic conformity, it would only make sense to "normalize" the TTL of outgoing packets from the WiFi-to-WiFi router to 64 instead of 65.

I say this because the entire purpose of genuine normalization is not to be "sneaky" — but simply to create a connection that behaves in a completely traditional fashion from start to finish.

Since the carrier knows you're using the hotspot anyway, an outgoing TTL of 64 from the WiFi-to-WiFi router would be the most "normal" — because that's what the outgoing TTL from ANY device that's connected to a mobile hotspot would normally be!

I have therefore incorporated a modified version of your suggestion into my WiFi-to-WiFi router installation script by adding the following line to the stanza that deals with iptables — I call it the "TTL Normalization" line:

ExecStartPost=/sbin/iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64

I thoroughly tested this added line by using my own tutorial to create TWO separate WiFi-to-WiFi routers — Router A and Router B.

I used two routers in the connection chain simply to make the TTL behavior more obvious — to see if it really was subtracting "1" from the TTL value at each hop — and to clearly see the effects of TTL Normalization (TTLN).

My testing methodology was simple:

At different times, I included and dis-included the above TTL Normalization line in Router B — just to see what effect it would have as I switched that capability off and on.

To generate some data, I ran a standard ping from each device up and down the connection chain — with this command line:

ping -i 5 8.8.8.8

Note to other readers: The ping command only displays the TTLs for the incoming IP packets that deliver the response message — it does NOT show the TTLs of your outgoing packets. So don't let that confuse you!

I then monitored the TTL of the outgoing packets — at each point in the connection chain — with this command line:

sudo tcpdump -vvnni any 'icmp[icmptype] == 8'

(For those who wish to try this experiment, you'll first have to run "sudo apt install tcpdump".)

Sure enough, it works perfectly!

Because of these good results, I have now made TTL Normalization (TTLN) the default behavior of my tutorial's installation script. That means all outgoing packets — once they leave my WiFi-to-WiFi router — will automatically have a TTL of 64 — no matter how far down the connection chain they originate! It will therefore arrive at the carrier with a TTL of 63 — just like any conventionally-tethered device.

The results of my testing — and indeed the behavior of my newly-updated WiFi-to-WiFi router — are fully illustrated in my "before and after" infographic. Outgoing TTL values are depicted in white:
TTL_Normalization_Before_and_After_RPi_Mike.png
TTL_Normalization_Before_and_After_RPi_Mike.png (72.75 KiB) Viewed 1489 times

Rudolf
Posts: 168
Joined: Mon Nov 09, 2020 1:44 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Nov 12, 2020 9:54 am

What I did not understand in the project -with the hardware function of the Pi it is possible to connect to a WiFi and act as an access point in one go, so why the second WiFi hardware?

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Sat Nov 14, 2020 7:22 am

Rudolf wrote:
Thu Nov 12, 2020 9:54 am
with the hardware function of the Pi it is possible to connect to a WiFi and act as an access point in one go, so why the second WiFi hardware?
Router_Comparison_RPi_Mike.jpg
Router_Comparison_RPi_Mike.jpg (249.89 KiB) Viewed 1414 times

Your question inspired me to make the above graphic.

On at least a few levels, there's no question that mopeds and SUVs are the exact same thing!

After all, they both have engines and tires — and in theory, they can both get you from point A to point B "in one go".

If you need to pick up a loaf of bread at a local store that's only a few miles away, either vehicle can do the job.

But on many other levels — indeed, the vast majority of levels — they're not at all the same. Try getting 50 items at the local store — or driving 500 miles — and you'll quickly discover just how different those vehicles really are.

This of course is just a rough analogy on the topic of routers; the main purpose of my analogy is to give you a sense of how I look at the logic of your question.

I definitely see it ON LEVELS. And on the vast majority of levels, I simply don't agree with your hidden premise — because it wrongly suggests that I didn't really need to do the massive amount of work I did to create a dongle-based solution. Because after all, according to you, it can all be done "in one go" without any dongle at all!

During the research phase of my tutorial, I of course encountered reports of people forcing a single WiFi device — the Raspberry's built-in WiFi chip — to act as BOTH an internet client AND an access point (AP) — all at the same time.

Although it's possible to use a single-chip solution for a WiFi-to-WiFi router, the overall consensus is that it just doesn't work that well — assuming you can even get it to work at all.

One of the fundamental limitations of a single-chip solution is that you're forcing the Raspberry's built-in WiFi chip to perform two very different functions simultaneously — connecting to the internet AND serving as an access point at the same time.

One of the consequences of constraining all that activity to the same chip is that it's forced to use the same channel for BOTH the client and the AP. That, in turn, can substantially degrade its performance and reliability.

But don't take my word for it. A user by the name of SurferTim is arguably the leading networking expert on these forums and he clearly has a similar perspective.

By using two physically independent WiFi devices — the Raspberry’s on-board WiFi chip AND a USB WiFi dongle — my solution facilitates the use of two completely separate channels. But it does even more than that — because it also allows two entirely different portions of the spectrum to be used at the same time! For example, my solution allows the AP to operate within the 5 GHz spectrum while the client operates in the 2.4 GHz spectrum. That completely avoids any signal conflict.

My solution is very robust and efficient — and the only "added" requirement is a widely available and inexpensive $10 dongle.

And don't forget — my solution does everything without the complication of even a single extra piece of software, such as hostapd or dnsmasq.

But to fully evaluate the logic of your question, one can't limit the analysis to the simple perspective of another solution being "technically possible".

Instead, you also need to take a "systems approach" and consider the totality of my tutorial AND my highly-automated script — and how rapidly and effortlessly it switches a Raspberry back and forth between normal WiFi mode and WiFi-to-WiFi router mode. Only then can you meaningfully compare my solution to another solution.

Because it's not just a simple matter of "CAN it be done by an advanced user that has several hours or days to figure it all out" — it's also a matter of HOW it's done — and how QUICKLY and EASILY and RELIABLY it's done.

Your narrow focus on "hardware" overlooks the fact that I developed an extremely convenient and completely automated solution — a solution that's instantly turned off and on through the simple flip of a toggle switch.

I remember remarking once to a systems engineer that the Boeing 747, given its staggering size and complexity, must be an extremely well-engineered machine for it to have such a strong safety record after millions and millions of flights. Although he didn't disagree with me, he pointed out that my view was also very incomplete — because I was failing to consider the equally-impressive work the Boeing engineers had done in making the aircraft easy to service and maintain — and writing the maintenance manuals in such a clear, step-by-step manner that safety was virtually guaranteed.

manueldimitri
Posts: 4
Joined: Thu Nov 05, 2020 3:34 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Mon Nov 23, 2020 1:53 pm

Hi RPi_Mike,

Hope everything ok.

Well, I did manage to work out the way of changing your script to add the ethernet interface, as for a Wifi-to-Wifi-and-Ethernet router. However, I don't want to post it in this topic without your authorization, at the end this topic is about a Wifi-to-Wifi router and not a Wifi-to-Wifi-and-Ethernet router.

Everything seems to be working in terms of forwarding the internet from the main router through the raspberry and to the devices in the ethernet or the wifi hotspot provided by the RPi. However, I encounter a problem in terms of reaching the networks (done a few ping tests through the network). So, the LAN network it can only reach the LAN network and not the wifi. In the meantime, the wifi network can get any of the networks (LAN, RPi wifi and the wifi from the main router in the house).

Well, I'm still looking into this. But if you don't mind of me adding this stuff in this topic I will explain my setup, and might give your 50cents to made it work properly. If not I keep working on it. Hopefully I can get to a fix.

Regards,
Igor Marques

manueldimitri
Posts: 4
Joined: Thu Nov 05, 2020 3:34 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Mon Nov 23, 2020 4:28 pm

Hi RPi_Mike,

I sorted out this. I had PN connected in my computer connected through ethernet. After I disconnected it it worked perfectly fine.

Anyway, thanks for this project. Working amazingly.

Now time to configure a few more things I'm interested.

Regards,
Igor Marques

User avatar
RPi_Mike
Posts: 232
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Wed Nov 25, 2020 8:17 am

manueldimitri wrote:
Mon Nov 23, 2020 4:28 pm
Anyway, thanks for this project. Working amazingly.

I'm glad you're still enjoying my project!




manueldimitri wrote:
Mon Nov 23, 2020 4:28 pm
I sorted out this. I had PN connected in my computer connected through ethernet. After I disconnected it it worked perfectly fine.

I honestly have no idea what "PN" means.

I Googled those letters and it might mean Part Number (which would obviously not make any sense in this context). Or maybe it's a reference to a Pseudo Noise generator that apparently can enhance the range of optically-based Ethernet networks. The only other reference I could find to "PN" is an "Industrial Ethernet" technology called PROFINET — which apparently some people informally refer to as "PN".

Whatever the obscure meaning of "PN" might be, it's certainly a reminder of my explicit instructions — that my solution is only designed to work on a truly standard, unmodified, completely "normal" Raspberry. So having some kind of "PN" technology attached to your Raspberry would definitely not qualify. There's only one piece of attached hardware that I mention in my tutorial — and that's a simple USB WiFi dongle!

So although I'm glad to hear that disconnecting your "PN" allowed everything to work, I can't say I'm surprised by your technical difficulties.




manueldimitri wrote:
Mon Nov 23, 2020 1:53 pm
Well, I did manage to work out the way of changing your script to add the ethernet interface, as for a Wifi-to-Wifi-and-Ethernet router. However, I don't want to post it in this topic without your authorization, at the end this topic is about a Wifi-to-Wifi router and not a Wifi-to-Wifi-and-Ethernet router.

It's not an area of interest to me — nor is it something I wish to do any development work on. But if you have figured out a way to modify the installation script of my WiFi-to-WiFi router to create a WiFi-to-WiFi-and-Ethernet router, I have no objection to you sharing your results with the rest of the community!

However, BEFORE you post anything about it on this thread, all I would ask of you is this:

Just as I have done with my tutorial, please thoroughly test your method on a clean, unmodified, freshly-burned copy of Raspberry Pi OS with Desktop — preferably on a Raspberry Pi 4, since that's the current flagship model.

Also, if you are going to claim an Ethernet capability, please make sure you're testing it with a "normal" Ethernet connection — the kind that millions of regular people use in their homes and offices. That would certainly NOT include an "industrial" variant of Ethernet that most people have never heard of. If that's what you're doing, that's fine — but please be clear about that if that's the case.

Obviously, if that is what you're doing, it would be nice if you could ALSO test your method with a "normal" Ethernet connection as well — because that would be useful to a much larger audience.

Finally, please keep in mind that if you were "tinkering" with your system and eventually got everything to work, you can never know for sure exactly what combination of things may be responsible for your success.

So the only way to prove your method truly works is to write everything down in a clear, specific list of steps — and then "eat your own dog food" by pretending to be a Linux novice and “mindlessly” following your own instructions on a brand-new, untouched operating system.

If your instructions are truly clear and complete, almost anyone — even people who don’t really understand Linux — should be able to replicate your findings.

That's the "gold standard" of testing and validation — and it's what I always do before I publish anything.

When you post your method, please make it easy to understand by simply showing what lines you changed / added / deleted in my code.

For example, based on the input of user "jiml8", I recently added "TTL Normalization" to my installation script. So, just to use that as a random example, here's how I would document that change in plain English — by showing a simple “before and after” of the block of code that was modified:

ORIGINAL CODE:
ExecStartPre=/sbin/iptables -t nat -A POSTROUTING -o DGwlan1 -j MASQUERADE
ExecStopPost=-/sbin/iptables -t nat -D POSTROUTING -o DGwlan1 -j MASQUERADE

NEW CODE:
ExecStartPre=/sbin/iptables -t nat -A POSTROUTING -o DGwlan1 -j MASQUERADE
ExecStartPost=/sbin/iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64
ExecStopPost=-/sbin/iptables -t nat -D POSTROUTING -o DGwlan1 -j MASQUERADE


Thanks for your strong interest in my project — and thanks for any well-tested and clearly-explained contribution you or anyone else wish to make!

kelroar
Posts: 1
Joined: Tue Feb 02, 2021 10:00 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Thu Feb 04, 2021 1:53 am

Hello. Firstly thanks this amazing guide. Finally I was able to share my mobile internet with my children devices. Now, before your tutorial I was able to get internet from my offices ethernet network which I cant do anymore. Any hint on what may been happens? Thanks!

Revolox
Posts: 1
Joined: Sat Mar 13, 2021 2:31 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Sat Mar 13, 2021 2:40 pm

Hey!!

I’m completely new to this raspberry world and I have a couple of questions.

Currently I’m using a Wi-Fi connection from a “public” network, like the ones on university.
This network only allows me to connect 5 devices and I it doesn’t allow me to connect smart devices because I cannot insert the log in details for them to connect.

I’m looking for a solution, where I can repeat the wifi signal and make it look like my own Wi-Fi network.

Before I invest on this equipment I would like to know if your project will work on this.

I don’t know if this made any sense, sorry if it is to confusing.

Thank you!

MariusPi
Posts: 1
Joined: Mon May 10, 2021 12:07 pm

Re: TUTORIAL: Mobile Hotspot via Raspberry Pi (WiFi-to-WiFi Router)

Mon May 10, 2021 12:25 pm

Revolox wrote:
Sat Mar 13, 2021 2:40 pm
Hey!!

I’m completely new to this raspberry world and I have a couple of questions.

Currently I’m using a Wi-Fi connection from a “public” network, like the ones on university.
This network only allows me to connect 5 devices and I it doesn’t allow me to connect smart devices because I cannot insert the log in details for them to connect.

I’m looking for a solution, where I can repeat the wifi signal and make it look like my own Wi-Fi network.

Before I invest on this equipment I would like to know if your project will work on this.

I don’t know if this made any sense, sorry if it is to confusing.

Thank you!

Hello There,

I had the same problem as I am in Hospital and they are using a captive portal to use the public Wifi, however this a hindranceas my work laptop uses a VPN solution which doesn't allow to log on through the website.

The following (the interface connecting to the 'public' network) is how I have modified it in order for me to connect through to work.

Code: Select all

echo 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=BE

network={
ssid=\"A Hospital Public\"
key_mgmt=NONE
}' | sudo tee /etc/wpa_supplicant/wpa_supplicant-DGwlan1.conf > /dev/null

sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant-DGwlan1.conf

I hope this helps.

Now I would like to know, if anyone can advise me, How to configure a VPN client on the Wifi router to the VPN server back home for this device?

Return to “Networking and servers”