1

I am going to be staying in a hotel in the future, and I need to be able to use Ethernet devices there. The hotel provides free WiFi, however it has no way of providing Ethernet.

I have the idea of connecting to the free WiFi using a Raspberry Pi, and then pushing the internet connection out of the Ethernet port on the Pi.

This website seems to explain what I need to do, as does this post.

Everything seems fine here, apart from the bind addresses for the WiFi adapter. I don't know what IP addresses will be available on the WiFi network, and although I could put in a random ip address like 192.168.0.239, I don't know what range the network runs on either. It could be X.X.X.X, for example:

  • 192.168.0.X
  • 192.168.42.X
  • 10.0.2.X
  • 10.0.0.X

How can I make this set-up work without knowing any of the DHCP information beforehand?

Thank you for any responses.

  • 1
    I have this exact setup in my dorm room. You don't need to worry about DHCP. Follow [this link](http://raspberrypi.stackexchange.com/a/39240/24224). – Aloha Mar 22 '17 at 08:29
  • @pandalion98 This still seems to require the exact IP address of the router with the internet connection, which I cannot get. – DevelopedLogic Mar 25 '17 at 08:39
  • You can get the IP address of a router fairly easily. In Windows, you can use CMD and type in 'ipconfig'. I'm positive there's ways to do this on pretty much every platform, just don't know which one(s) you have access to. –  Apr 01 '17 at 02:52
  • @CMalasadas I guess this would work, yes. I have access to the Pi, and a windows laptop. – DevelopedLogic Apr 01 '17 at 04:56
  • You could probably do it on the RPi, I'll do some research and post an answer soon. –  Apr 01 '17 at 11:52
  • Use something like this, works really well, and continues working when you want to play with your pi: https://www.amazon.co.uk/TP-Link-Support-Hotspot-Extender-TL-WR802N/dp/B00TQEX8BO/ref=sr_1_2?ie=UTF8&qid=1496332312&sr=8-2&keywords=nano+router – DisappointedByUnaccountableMod Jun 01 '17 at 15:53
  • @barny Something like that is good, however I can't connect an antenna to it – DevelopedLogic Jun 01 '17 at 15:55
  • You didn't say you needed an external antenna. The TP-Link doesn't need an external antenna, everything is in the plastic box. – DisappointedByUnaccountableMod Jun 01 '17 at 15:57
  • This is why I would like to do it on a raspberry pi, so I can get a USB adapter which has an antenna port. I need an antenna as the wifi I am trying to reach needs me to be rather close, and I can put an antenna near it but not a box which needs power and such. – DevelopedLogic Jun 01 '17 at 15:59
  • OK, if you had provided some of that context I wouldn't have wasted my and your time commenting. – DisappointedByUnaccountableMod Jun 01 '17 at 16:06
  • Keep in mind that some hotels might have networks that require accepting terms of use via browser befor being connected. – Mark Jul 05 '17 at 05:44
  • @Mark The hotel I'm going to does not. It's a small family run one with a basic network setup. I have considered NAT between wifi and Ethernet, but haven't managed to actually get it to work. – DevelopedLogic Jul 05 '17 at 06:10
  • You *do not* need to know the IP your wifi adapter will be assigned. You *do* need to know the wifi ssid and passphrase (if any) used by the hotel wifi. Once you're connected, set up a routed connection between your LAN and wifi network as described in the link. For all of that, wifi adapters on the RPi tend to be pretty poor, or expensive. I found a travel router simpler and performs better (see https://www.amazon.com/GL-iNet-GL-AR300M16-Ext-Pre-installed-Performance-Programmable/dp/B07794JRC5/ref=lp_13180420011_1_10?srs=13180420011&ie=UTF8&qid=1513871240&sr=8-10 for a dual-antenna variant). – bobstro Dec 21 '17 at 15:49

3 Answers3

1

Although it can be done with a Raspberry Pi I'd like to offer the D-Link N300 as an alternative solution. It is a range extender with in-built ethernet. I have this device and it works well for the low cost.

Andy Anderson
  • 608
  • 4
  • 11
0

To find your IP address on RPi, do the following:

In the command line, type:

ping google.com

Then press CTRL-C to stop. This is making sure you have a successful connection.

Now, type:

ip addr

And you should see something like this:

pi@raspberrypi ~ $ ip addr
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether b8:27:eb:8e:b7:42 brd ff:ff:ff:ff:ff:ff
  inet 192.168.1.17/24 brd 192.168.1.255 scope global eth0  
pi@raspberrypi ~ $

Your IP address is directly after the second inet (which is below link/ether). In this case, your IP would be 192.168.1.17.

0

If you want to know the raspberry ip ,all you need to do is: On the Pi

ip a

Or from another device you need an app based on nmap or nmap itself and scan the network,for instance,if the subnet is 192.168.1.xxx , you can type

nmap -F 192.168.1.0/24

and finally,to setup an access point this page may help you.

abaddon s
  • 1
  • 1
  • The link describes setting up a wireless access point on a wired network. The question is about going the other way round. – nekomatic May 14 '19 at 12:40