Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 8:41 am

Hi guys,

I just bought a Raspberry pi 3b+ and I wonder if I can use it through the display of my laptop.
I would like to use wifi only, and my laptop's OS is windows.
What do you think ?

It seems quite easy to have acces to the rapsberry by wifi of course. But I need to use it from the very first time by wifi. In this condition how can I make the Raspberry say "hello I am here, please feel free to manipulate me by wifi from your laptop :) "

Thank you in advance,

See you,

RM

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

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 9:10 am

Welcome to the Raspberry Pi forums.

Yes, both parts of what you hope for are possible. And documented.

To avoid confusion by referring you to inappropriate documentation, can you say whether your RPi and your Windows laptop are to be connected to the same shared network, or are you seeking to establish a closed point-to-point link between the two devices?

User avatar
HawaiianPi
Posts: 2438
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Use laptop (windows OS) display by Wifi

Mon Apr 16, 2018 9:19 am

If your Raspberry Pi and Windows PC are both connected to your local network (router), then you can use VNC remote desktop on your laptop by installing the RealVNC Viewer software. The VNC server on the Pi will have to be enabled first, but that can be done over an SSH connection. SSH is disabled by default, but it can easily be enabled when you are preparing your SD card. For this headless setup you will want to use a Raspbian Stretch with Desktop image and not NOOBS (because NOOBS is intended to be used with a keyboard, mouse and monitor).

This is the procedure I use for setting up headless boot with SSH and wireless network. It works with Raspbian Jessie or Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3B(+) & Pi Zero W, or a Raspbian compatible USB WiFi dongle on other models. Everything is done before you boot, and can be done on a Windows or Mac computer which only has access to the small FAT32 "boot" partition of a Raspbian imaged SD card.
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. Install Etcher and use it to write the Raspbian image to your SD card.
    • You don't need to extract the image or format the card prior to writing.
    • Just run Etcher, choose the Raspbian .zip you downloaded, pick your SD card and write.
    • If you have trouble, verify the SHA256 checksum of the download.
  4. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the card (labelled "boot").
    • If you get a message telling you the card must be formatted, cancel it.
  5. On that small FAT32 partition, create a file with the name ssh (or ssh.txt). It can be empty, the contents don't matter.
  6. To connect to a wireless network, create another file on the card called wpa_supplicant.conf, which has the following inside:

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=US
    
    network={
         ssid="Your network name/SSID"
         psk="Your WPA/WPA2 security key"
         key_mgmt=WPA-PSK
    }
    • Edit country=, ssid= and psk= with your information and save the file.
    • Use the 2 letter country abbreviation in CAPS.
    • Use a pure text editor, not a word processor, to edit the wpa_supplicant.conf file.
  7. Make sure that both files are in the main directory of the small FAT32 partition, not in any folder.
  8. Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file. If it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network. Give your Pi some time to boot and connect to your network (the first boot always takes longer), then you should be able to SSH into the Pi and configure it how you like.

If you have a Zeroconf network service installed (Apple's iTunes, Bonjour or Quicktime install Zeroconf), you can SSH into [email protected] (provided you don't have any other Pi computers on your network with the same default hostname). Otherwise you must SSH into your Pi's IP address, which you can find by logging into your router and checking the list of connected clients, or using a network scanner app (like Fing for smartphones) to find your Pi on your network.

To login using SSH from Windows, you can use an app called PuTTY, which looks like this.
Image

In the Host Name (or IP address) field, enter either, make sure SSH is selected (it should be by default) and click on Open.

If you have done everything correctly, a terminal window will open and you should see a password request. Although, if it's the first time you've connected to your Pi, you may have to answer "yes" to a security question, and then you'll get the password prompt. After login you'll get a warning about having SSH enabled with the default password, so type passwd[Enter] and enter a new password (twice). And now you can do whatever you need to configure your little Raspberry Pi computer.

Code: Select all

sudo raspi-config
Will bring up the Raspbian configuration utility, and you can enable the VNC server under interfaces. If you have more than one Raspberry Pi computer on your network it's also a good idea to change the hostnames to something unique so that they can easily be identified.

Note:
If you have attempted this and failed, then unplugged power to turn off your Pi, you should start over with a freshly imaged card. Improperly powering down the Pi can cause SSH key generation to fail, which will prevent SSH logins (even if everything else is correct).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 12:46 pm

Thanks a lot for your answers.

I have a RPi 3b+ and Windows 7 64.
I am looking for a direct link beyween the two devices as I have no local network here.

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

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 1:20 pm

Raspomain wrote:
Mon Apr 16, 2018 12:46 pm
Thanks a lot for your answers.

I have a RPi 3b+ and Windows 7 64.
I am looking for a direct link beyween the two devices as I have no local network here.

With apologies for an unhelpfully positive first answer, a direct connection via WiFi being set up 'headlessly' sounds "challenging". Doing it via an ethernet cable is relatively trivial.

I can conceive how it might be done if you have the ability to configure the WiFi network interface of your Windows machine as a wireless hotspot (access point). But that is outside the scope of a Raspberry Pi forum.

Once you have that there are ways of configuring your RPi to take advantage of it.

Off-hand I can't see how to get the alternative implementation, with the RPi acting as an access point, into place without first being able to access it to configure it.
Last edited by B.Goode on Mon Apr 16, 2018 2:38 pm, edited 1 time in total.

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 1:40 pm

Actually, I can configure my computer as an hotspot wifi, it is not a big deal.
But once this network is created, how can I create a link bewteen PC and RPi ? The tough part is I cannot have acces to the RPi. All I can do is adding some configuration files to the SD card I would say ...

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 1:47 pm

Raspomain wrote:
Mon Apr 16, 2018 1:40 pm
All I can do is adding some configuration files to the SD card
you have been told already here -4-5-6-

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 1:48 pm

KLL wrote:
Mon Apr 16, 2018 1:47 pm
Raspomain wrote:
Mon Apr 16, 2018 1:40 pm
All I can do is adding some configuration files to the SD card
you have been told already here -4-5-6-
My bad !
Thank you, I will let you know if it worked :)

Have a good day,

RM

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 3:13 pm

That's strange : I tried two times and still fail : "host does not exist".
I created a wifi network. I checked with my smartphone and I can connect without any trouble.
How can I ensure RPi is correctly connected to the network ?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 4:22 pm

Raspomain wrote:
Mon Apr 16, 2018 3:13 pm
How can I ensure RPi is correctly connected to the network ?
mobile app FING
find device: raspberrypi
or maker: Raspberry Pi
and the new RPI_IP you need for login.

did you set "ssid" and "psk" correctly in wpa_supplicant.conf?

is the green LED blinking?

can you check if the 2 files you put on the SD card have been removed? OK
( that would make clear that RASPBIAN did BOOT )

but there are sometimes problems for RPI 3B+ and the new RASPBIAN OS and the boot with WIFI only...
so ONLY way: use ethernet cable and UPDATE UPGRADE

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 4:27 pm

KLL wrote:
Mon Apr 16, 2018 4:22 pm
Raspomain wrote:
Mon Apr 16, 2018 3:13 pm
How can I ensure RPi is correctly connected to the network ?
mobile app FING
find device: raspberrypi
or maker: Raspberry Pi
and the new RPI_IP you need for login.

did you set "ssid" and "psk" correctly in wpa_supplicant.conf?

is the green LED blinking?

can you check if the 2 files you put on the SD card have been removed? OK
( that would make clear that RASPBIAN did BOOT )
The green led is blinking at the begining (when I plug the power charger) then it stops blinking.
The two files have been deleted.

I tried to find the raspberry with "advanced ip scanner" with no success ...

And I verified many times SSID and PSK : there is no error 100% sure.

Edit : FING doesn't find any raspberry devices. It seems my RPi doesn't want to connect on the network. Yet I hecked my config file : everything is OK...

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 4:43 pm

sorry, i think you need a ethernet network connection and a HDMI TV... ( just for 15min update)
go some other place...

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 4:50 pm

I think so ...
But I would like to understand why !
I mean I use the last version of Raspian, my RPi3b+ is brand new, my SD Card as well. It should work.

User avatar
davidcoton
Posts: 3002
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 4:53 pm

It might help if you posted your wpa-supplicant file (remove ssid and password). Use code tags when posting.
"Thanks for saving my life." See https://www.raspberrypi.org/forums/viewtopic.php?p=1327656#p1327656
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 4:57 pm

davidcoton wrote:
Mon Apr 16, 2018 4:53 pm
It might help if you posted your wpa-supplicant file (remove ssid and password). Use code tags when posting.
My wpa_supplicant.conf file :

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
    ssid=Raspomain
    psk=RaspomainTest
    key_mgmt=WPA-PSK
}
I let SSID and PSK as it is just a temporary network for the occasion ...

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 5:07 pm

Raspomain wrote:
Mon Apr 16, 2018 4:57 pm
davidcoton wrote:
Mon Apr 16, 2018 4:53 pm
It might help if you posted your wpa-supplicant file (remove ssid and password). Use code tags when posting.
My wpa_supplicant.conf file :

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
    ssid=Raspomain
    psk=RaspomainTest
    key_mgmt=WPA-PSK
}
I let SSID and PSK as it is just a temporary network for the occasion ...
sorry i never checked if possible,
but we use

Code: Select all

   ssid="Raspomain"
   psk="RaspomainTest"

and there is a good reason for this: because instead of text password could use hash: by NO " "

Code: Select all

network={
    ssid="YOUR_SSID"
    #psk="YOUR_PASSWORD"
    psk=6a24edf1592aec4465271b7dcd204601b6e78df3186ce1a62a31f40ae9630702
    key_mgmt=WPA-PSK
}

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 5:13 pm

KLL wrote:
Mon Apr 16, 2018 5:07 pm
Raspomain wrote:
Mon Apr 16, 2018 4:57 pm
davidcoton wrote:
Mon Apr 16, 2018 4:53 pm
It might help if you posted your wpa-supplicant file (remove ssid and password). Use code tags when posting.
My wpa_supplicant.conf file :

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
    ssid=Raspomain
    psk=RaspomainTest
    key_mgmt=WPA-PSK
}
I let SSID and PSK as it is just a temporary network for the occasion ...
sorry i never checked if possible,
but we use

Code: Select all

   ssid="Raspomain"
   psk="RaspomainTest"
No way ... I feel ashamed ... I forgot " ". Well actually I never took it into consideration
Thanks a lot, now it works properly ... :? :?

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

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 6:05 pm

Pleased to know that you have a working solution for your needs.

Out of curiosity: you wrote -
Actually, I can configure my [Windows] computer as an hotspot wifi, it is not a big deal.
Is that using a built-in configuration option in Windows, or does it require a third-party package?

Raspomain
Posts: 21
Joined: Mon Apr 16, 2018 8:31 am

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 6:21 pm

B.Goode wrote:
Mon Apr 16, 2018 6:05 pm
Pleased to know that you have a working solution for your needs.

Out of curiosity: you wrote -
Actually, I can configure my [Windows] computer as an hotspot wifi, it is not a big deal.
Is that using a built-in configuration option in Windows, or does it require a third-party package?
I create it from windows, no need anything more than native windows 7 to 10 (I never tried before 7).

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

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 6:27 pm

Thank you.

It hadn't occured to me that it might be possible. Now I do an Internet search with that in mind I see lots of tutorials. Good to have had the pointer...

It might be a possible solution for other users with no other network infrastructure: I am starting to see lots of entry level Windows laptops with no cabled Ethernet, only WiFi.

User avatar
HawaiianPi
Posts: 2438
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Use laptop (windows OS) display to work on Raspberry OS by Wifi

Mon Apr 16, 2018 11:08 pm

Raspomain wrote:
Mon Apr 16, 2018 12:46 pm
Thanks a lot for your answers.

I have a RPi 3b+ and Windows 7 64.
I am looking for a direct link beyween the two devices as I have no local network here.
How do you connect to the Internet?

If you connect through a wireless router or ISP supplied wireless gateway (router+modem), then you have a local network.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Beginners”

Who is online

Users browsing this forum: Google [Bot] and 45 guests