sw3ex
Posts: 1
Joined: Sat Mar 29, 2014 5:04 pm

Using MacBook as monitor, internet connection, etc for RPi

Mon Mar 31, 2014 12:04 pm

Hi,
I recently bought a Raspberry Pi but I don't have a monitor, wifi dongle or USB keyboard. I would really like to get it running while having to buy as little as possible extra stuff.
What I do have is a displayport to hdmi adapter and a hdmi cable. And all the basic stuff like power supply, UTP cable, sd card.
The (obvious) question is if somebody can help me to achieve using my computer as I/O devices for the raspberry.
I've tried forwarding the x server (so through the network cable and without the hdmi output) but it seemed some modules were missing. I tried sharing my computers internet connection through the Ethernet but then I couldn't ssh into the device anymore.

cesgon
Posts: 6
Joined: Tue Apr 01, 2014 11:15 pm

Re: Using MacBook as monitor, internet connection, etc for R

Mon Apr 28, 2014 12:43 pm

you're having the same issue as me.

I can ssh from my macbook but once I share my internet (From wifi to ethernet) connection so I can access internet from the Pi, I lose the connection and can no longer ssh.

Have you solve this issue?

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Using MacBook as monitor, internet connection, etc for R

Mon Apr 28, 2014 4:03 pm

Sorry I'm not sure how Mac's Internet Connection Sharing works, but it may be that it's changing either IP addressing or routing on that connection.

1) If you can connect the Pi and the Mac to the same router, turn off ICS and let the router do its job. (You can use wireless for one and wired for the other. That still counts.)
If that's not possible, which I'll assume is the case since you're asking...
2) See if the Mac can ping the Pi on the IP that it had before turning on ICS. If you can ping it, perhaps the Mac put up a firewall? Otherwise... I'm not sure what could cause it to refuse SSH.
3) If you can't ping it, the Pi has either changed IPs, or there's some other config issue. I'd have to check Mac ICS troubleshooting guides online to figure out why this is happening.

User avatar
cyrano
Posts: 714
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium

Re: Using MacBook as monitor, internet connection, etc for R

Mon Apr 28, 2014 5:29 pm

Switch on Internet sharing FIRST. Let your Mac give an ip to the RPi. Connect to SSH from your Mac after that. Has worked for me every time...

cesgon
Posts: 6
Joined: Tue Apr 01, 2014 11:15 pm

Re: Using MacBook as monitor, internet connection, etc for R

Tue Apr 29, 2014 5:17 am

Hey cyrano,

thanks mate, how can I know what's the IP assigned to the Pi?

Without having nmap. !! or nmap is the only way?

Cheers.

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Using MacBook as monitor, internet connection, etc for R

Tue Apr 29, 2014 7:40 am

ifconfig -a
Will show it on the RPi

I've also got a bit of code that will speak the address.

I've also got a bit of code to display it on a 8x8 LED matrix or on a 16x2 LCD

If you have a windows machine install Fing on it. Fing will scan your network. There's also a very pretty version of Fing for android.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

cesgon
Posts: 6
Joined: Tue Apr 01, 2014 11:15 pm

Re: Using MacBook as monitor, internet connection, etc for R

Tue Apr 29, 2014 11:20 am

cyrano wrote:Switch on Internet sharing FIRST. Let your Mac give an ip to the RPi. Connect to SSH from your Mac after that. Has worked for me every time...
Hey cyrano,

thanks mate, how can I know what's the IP assigned to the Pi?

Without having nmap. !! or nmap is the only way?

Cheers.

cesgon
Posts: 6
Joined: Tue Apr 01, 2014 11:15 pm

Re: Using MacBook as monitor, internet connection, etc for R

Tue Apr 29, 2014 11:23 am

Dougie

in order to perform ifconfig -a I need to be logged on the Pi. If the Mac automatically assigns an IP how can I know what IP?

By knowing the IP I could connect via ssh.

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Using MacBook as monitor, internet connection, etc for R

Tue Apr 29, 2014 11:35 am

Use Fing. It's a tool that runs on Windows, Android, i{Phone,Pad,Pod} or Mac.
http://www.overlooksoft.com/download

If you have another Linux (including another RPi) use nmap. (There is a version of Fing for Linux, but it's pointless.)

There's a lot to be said for running with a TV, keyboard (& mouse) for the initial set-up. Starting out headless isn't a beginner's task (without some assistance) http://www.raspberrypi.org/forums/viewt ... 66&t=50310

Or you can do it the hard way

Code: Select all

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.10.%i | FIND /i "Reply">>c:\ipaddresses.txt
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
cyrano
Posts: 714
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium

Re: Using MacBook as monitor, internet connection, etc for R

Wed Apr 30, 2014 1:17 am

As Dougie says, fing is great.

Even simpler is ping X.X.X.255 (replace X with your local network settings) from the Mac terminal and look at the replies. But that's not as easy, or as reliable. Some routers don't pass broadcast ping. And it doesn't work on Windows.

cesgon
Posts: 6
Joined: Tue Apr 01, 2014 11:15 pm

Re: Using MacBook as monitor, internet connection, etc for R

Wed Apr 30, 2014 2:54 pm

Thanks you both. I'll try and give you update :)

Cheers

Return to “Beginners”