glenngrass
Posts: 10
Joined: Wed Mar 27, 2013 3:22 pm

Using Pi in headless mode without Router

Wed Mar 27, 2013 3:32 pm

Hi!
I'm new to this forum and please pardon me if I'm doing anything not appropriate.

Here is my situation.
I got a new Pi for a present. However I have no HDMI monitor/ TV and I don't have a router. I connect to the Internet on my Ubuntu 12.10 using a Vodafone modem.

Is there any way I can use my Pi headless over SSH? (By connecting the Pi and my laptop over Ethernet crossover cable?)

Thanks.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1665
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 3:39 pm

Hi yes, this should be doable. You can also get onto the Pi terminal using a serial port if you wanted to. I would suggest to just give the ethernet adapter on Ubuntu and the Raspberry Pi fixed IP addresses and then you should be good to go.

See here for more info;
http://www.howtoforge.com/linux-basics- ... -on-ubuntu

Something like;
10.0.0.1 for Ubuntu
10.0.0.2 for the Pi
Subnet mask of 255.255.255.0 for both

You may need to edit the /etc/network/interfaces file on the Pi SD card Linux partition by putting it into an SD card reader on your main PC first though, or you could run a DHCP server on your Ubuntu machine too.

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 3:40 pm

yes you don't need a x cable any NIC lead should work
setup a dhcp server on your ubuntu
and plug them in...
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

glenngrass
Posts: 10
Joined: Wed Mar 27, 2013 3:22 pm

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 3:44 pm

RaTTuS wrote:yes you don't need a x cable any NIC lead should work
setup a dhcp server on your ubuntu
and plug them in...
Thank you very much for your quick reply.
However can you please give me a link where this process is given with detailed instructions. It will be a great help.. And what is an "NIC lead"?

glenngrass
Posts: 10
Joined: Wed Mar 27, 2013 3:22 pm

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 3:49 pm

Davespice wrote:Hi yes, this should be doable. You can also get onto the Pi terminal using a serial port if you wanted to. I would suggest to just give the ethernet adapter on Ubuntu and the Raspberry Pi fixed IP addresses and then you should be good to go.

See here for more info;
http://www.howtoforge.com/linux-basics- ... -on-ubuntu

Something like;
10.0.0.1 for Ubuntu
10.0.0.2 for the Pi
Subnet mask of 255.255.255.0 for both

You may need to edit the /etc/network/interfaces file on the Pi SD card Linux partition by putting it into an SD card reader on your main PC first though, or you could run a DHCP server on your Ubuntu machine too.
Thank you very much Davespice!
I will try both methods..

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 4:00 pm

Note that there are two separate, but related issues here.

1) How to connect to the Pi via SSH.

2) How to get the Pi to "see" the Internet (i.e., by going "through" your main machine).

The first is pretty straightforward; the second less do. Get the first one sorted, then we can work on the later.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

glenngrass
Posts: 10
Joined: Wed Mar 27, 2013 3:22 pm

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 4:09 pm

Joe Schmoe wrote:Note that there are two separate, but related issues here.

1) How to connect to the Pi via SSH.

2) How to get the Pi to "see" the Internet (i.e., by going "through" your main machine).

The first is pretty straightforward; the second less do. Get the first one sorted, then we can work on the later.
Wow. I never thought the 2nd step is even possible in my situation. Thank you very much. And I will reply again once I sort out the 1st step. :)

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Using Pi in headless mode without Router

Wed Mar 27, 2013 4:17 pm

A NIC lead is a
Network Interface Connect ..
i.e. a network cable
any will do - crossover or straight it does not matter
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

newgandharva
Posts: 4
Joined: Sat May 25, 2013 4:20 am

Re: Using Pi in headless mode without Router

Sat May 25, 2013 4:39 am

Joe Schmoe wrote:Note that there are two separate, but related issues here.

1) How to connect to the Pi via SSH.

2) How to get the Pi to "see" the Internet (i.e., by going "through" your main machine).

The first is pretty straightforward; the second less do. Get the first one sorted, then we can work on the later.
Hi Joe,

First of all thanks for all the posts you have posted so far in other threads, they are of great help!

Can you please tell me how to tackle the second issue if I have a headless setup having static IP addresses allocated to Pi and my laptop? (and no DHCP server setup on the laptop)
I am having problems in getting the Pi to "see" the wifi connection which is running on my laptop. If any other thread(s) have discussed the same issue, it will be a great help for me if you guide me to them.

Thanks in advance.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Using Pi in headless mode without Router

Sat May 25, 2013 4:21 pm

There are basically two ways to do it:

1) ICS (Internet Connection Sharing)
2) Bridging

The first is easy - and should "just work", provided you can find it in the labryinth that is the Windows "ncpa.cpl" applet.

The second more so.

Anyway, short on time at the moment. Hopefully others can fill in details for you.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

newgandharva
Posts: 4
Joined: Sat May 25, 2013 4:20 am

Re: Using Pi in headless mode without Router

Sat May 25, 2013 6:35 pm

Thanks for the reply Joe. I will search on the net for keywords you mentioned.

One more thing, as i totally forgot to mention, I am using Ubuntu 12.04 on the laptop and "wheezy" on the Pi. It'll be great help to me if you could guide me on this whenever you've some
free time.

Thanks again.
Cheers.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Using Pi in headless mode without Router

Sat May 25, 2013 9:04 pm

newgandharva wrote:Thanks for the reply Joe. I will search on the net for keywords you mentioned.

One more thing, as i totally forgot to mention, I am using Ubuntu 12.04 on the laptop and "wheezy" on the Pi. It'll be great help to me if you could guide me on this whenever you've some
free time.

Thanks again.
Cheers.
Oh, OK. That's good (that you are running Linux). Somehow, I had gotten the impression that you were using Windows - and, of course, everything is much harder under Windows.

You can ignore what I said about ICS (that is a Windows thing).

And, yes, when I get a chance, I'll post the scripts I use on the Pi to implement a "wireless bridge". That is, a use case where the Pi receives the wireless signal and converts it to ethernet for a downstream client. You should be able to use the same scripts on your Ubuntu box.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

newgandharva
Posts: 4
Joined: Sat May 25, 2013 4:20 am

Re: Using Pi in headless mode without Router

Sun May 26, 2013 11:30 am

Thanks Joe. I hope you will get some time to post the scripts soon. Eagerly waiting for that. :)

newgandharva
Posts: 4
Joined: Sat May 25, 2013 4:20 am

Re: Using Pi in headless mode without Router

Sun May 26, 2013 1:30 pm

Also, one of the major problem is, i cannot use my wifi connection when i am connected to the Pi through ethernet connection (i tried it both the ways, static IP allocations and DHCP).
If making the wifi available on Pi solves this one too, then I wont be left with any problems.

Return to “Beginners”