denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Connect Pi 3 B to laptop

Tue Aug 14, 2018 8:56 pm

Dear people,

I am completely new here and am desperate for help.

It is my first time using a raspberry pi.

I have a project for my bachelors degree and am using a raspberry for a mobile application. The raspberry should be accessible through a laptop in order to troubleshoot on the go.

I installed Raspbian with etcher and everything is set just like in any other tutorial.

I have watched youtube tutorials for the past 4 or so hours doing everything step by step. But nothing works for me.

I am trying to connect my Raspberry to my Laptop via ethernet cable and powering it up via micro USB laptop to PI.

I have watched this one
https://www.youtube.com/watch?v=AJ7skYS5bjI

this one:
https://www.youtube.com/watch?v=QF-eFEqB8w8&t=239s

and dozens of others, browsed this forum, tried everything... NOTHING WORKS!

I have so many programs on the laptop now and not one can detect the raspberry.

Under internet connections it says unidentified network and no internet access.

I have fiddled with IPs and everything and nothing worked until now, so I am begging for guided help for an absolute newb.

kraligor
Posts: 8
Joined: Tue Aug 14, 2018 3:44 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 7:36 am

Does it have to be connected directly to your Laptop? The easiest way is to plug it into a LAN/WLAN with DHCP.

denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 8:20 am

For setup not necessarily. But later on yes, as it must all be mobile. The PI will be the brain of a robot i'm building.

kraligor
Posts: 8
Joined: Tue Aug 14, 2018 3:44 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 8:42 am

Then I'd suggest you connect it with your network first, so you can at least set an IP address and don't have to mess around with Windows-based DHCP servers or IP scanners.

denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 8:45 am

So I need a keyboard, mouse and screen, thrn connect the PI via ethernet to the router...?

kraligor
Posts: 8
Joined: Tue Aug 14, 2018 3:44 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 8:55 am

Not at all. The easiest way, if you have access to your router, is the following:
1. Mount the SD card with Raspbian in your computer, add an empty file "ssh" in the Boot partition.
2. Make sure DHCP is enabled on your router
3. Connect your RPi with the router, boot it up
4. Check the router DHCP overview for your RPi's IP address (also, consider assigning a static IP, so you don't have to check every time)
5. Connect to the RPi via PuTTY, or another SSH client

B.Goode
Posts: 6540
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:05 am

Non-technical aside:
I have watched youtube tutorials for the past 4 or so hours doing everything step by step. But nothing works for me.
tried everything... NOTHING WORKS!
For someone studying at bachelor's degree level a report of Nothing Works is surprising. An indication of what steps you took and what the results were would be more productive. (And it may be an 'age' thing, but watching YT videos to try to see where you might have gone wrong is not one of my hobbies.)


An alternative:

Why do you need direct Ethernet? That seems limiting for a mobile robot?

Does your laptop have a WiFi adaptor? (Or could you cheaply add one?)

Because a simple and more flexible solution would be to configure your RPi 3 - which has a built-in wi-fi interface - as a WiFi access point (hotspot) and then use the WiFi client on the laptop to associate with that access point and hence log in to the RPi and use it remotely.

Raspberry Pi Foundation documentation here:

https://www.raspberrypi.org/documentati ... s-point.md

https://www.raspberrypi.org/documentati ... te-access/



And also to note -
I am trying to connect my Raspberry to my Laptop via ethernet cable and powering it up via micro USB laptop to PI.
You may find that the usb port on the laptop cannot reliably provide sufficient power to run the RPi3B.

mattmiller
Posts: 1954
Joined: Thu Feb 05, 2015 11:25 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:07 am

So I need a keyboard, mouse and screen, thrn connect the PI via ethernet to the router...?
Luckily no :)
You can prepare a Pi in advance to connect to your local WiFi

I suggest you follow viewtopic.php?p=1124559#p1124559 to get you Pi connected to your WiFi network

Once you have got that working, we can move on to connecting via ethernet cable to your laptop
You may find that the usb port on the laptop cannot reliably provide sufficient power to run the RPi3B.
This is going to be a problem - you are probably going to have to use a separate 5V power supply as a Pi3B can consume more power than a laptop USB port can supply

denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:11 am

Those "files" that one must create, those are simple .txt, folders, or something else?

denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:12 am

mattmiller wrote:
Wed Aug 15, 2018 9:07 am
So I need a keyboard, mouse and screen, thrn connect the PI via ethernet to the router...?
Luckily no :)
You can prepare a Pi in advance to connect to your local WiFi

I suggest you follow viewtopic.php?p=1124559#p1124559 to get you Pi connected to your WiFi network

Once you have got that working, we can move on to connecting via ethernet cable to your laptop
You may find that the usb port on the laptop cannot reliably provide sufficient power to run the RPi3B.
This is going to be a problem - you are probably going to have to use a separate 5V power supply as a Pi3B can consume more power than a laptop USB port can supply
Can I use a simple phone charger adaptor with a micro USB cable?

B.Goode
Posts: 6540
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:15 am

denislipovec wrote:
Wed Aug 15, 2018 9:11 am
Those "files" that one must create, those are simple .txt, folders, or something else?
See the documentation already referenced:

From - https://www.raspberrypi.org/documentati ... /README.md
3. Enable SSH on a headless Raspberry Pi (add file to SD card on another machine)
For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.

If you have loaded Raspbian onto a blank SD card, you will have two partitions. The first one, which is the smaller one, is the boot partition. Place the file into this one.

DirkS
Posts: 9221
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:19 am

denislipovec wrote:
Wed Aug 15, 2018 9:11 am
Those "files" that one must create, those are simple .txt, folders, or something else?
I think the instructions in various places (which you clearly did not even have a look at) are actually clear enough, but to humour you
1. They are real files, so they are not 'files'
2 They are text files, but not .txt files (i.e. they don't have the extension .txt)

kraligor
Posts: 8
Joined: Tue Aug 14, 2018 3:44 pm

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:30 am

denislipovec wrote:
Wed Aug 15, 2018 9:12 am
mattmiller wrote:
Wed Aug 15, 2018 9:07 am
So I need a keyboard, mouse and screen, thrn connect the PI via ethernet to the router...?
Luckily no :)
You can prepare a Pi in advance to connect to your local WiFi

I suggest you follow viewtopic.php?p=1124559#p1124559 to get you Pi connected to your WiFi network

Once you have got that working, we can move on to connecting via ethernet cable to your laptop
You may find that the usb port on the laptop cannot reliably provide sufficient power to run the RPi3B.
This is going to be a problem - you are probably going to have to use a separate 5V power supply as a Pi3B can consume more power than a laptop USB port can supply
Can I use a simple phone charger adaptor with a micro USB cable?
The recommended power for a RPi3B is 2.5A. A USB 3 port on a computer should be able to provide that. Even a USB 2 port might be enough for a barebone RPi, but I wouldn't take chances. Better invest that $10 for a decent PSU and don't have your computer's USB controller burn out.

B.Goode
Posts: 6540
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Connect Pi 3 B to laptop

Wed Aug 15, 2018 9:55 am

denislipovec wrote:
Wed Aug 15, 2018 9:12 am


Can I use a simple phone charger adaptor with a micro USB cable?


Another reference to existing Raspberry Pi Foundation documentation:
https://www.raspberrypi.org/help/faqs/#topPower

A "simple phone charger adaptor with a micro USB cable" might work.

But it must not be deficient in any of these respects -
It must provide a stable 5 volts supply under all load conditions;
It must be capable of providing the current requirement of the RPi - see the faq;
The microUSB cable must be of a quality that does not degrade either of the previous properties - short and thick is preferable to long and thin.

denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Re: Connect Pi 3 B to laptop

Fri Aug 17, 2018 1:14 pm

I did it, my Pi is up and running with all the internet access and working wifi :) I have access to the PI desktop via SSH from my laptop, so the main problem got fixed.

Now I have the next problem.

I want to live stream from the RPi camera on my Android. The RPi camera is working and I can make a video in the command line.

I SSH-ed the raspberry to my android too, but I can not view the camera on my phone. I also tried the apps in the android store but they will not connect to my camera.

I tried RaspiCam: https://play.google.com/store/apps/deta ... iremotecam

and it says it is connected, but I get no image from the camera. I tap on camera and it says:

android.os.NetworkOnMainThreadException

denislipovec
Posts: 7
Joined: Tue Aug 14, 2018 8:49 pm

Re: Connect Pi 3 B to laptop

Fri Aug 17, 2018 4:09 pm

Got it up and running with stream to my phone. The latency is VERY bad though. But hey :) At least I can see through my Pi now.

Return to “Troubleshooting”