User avatar
RDK
Posts: 352
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Connecting a Pi to a PC - continued

Tue May 11, 2021 4:24 pm

@procount
Several years ago I started a thread with the title Connecting a Pi to a PC (viewtopic.php?f=91&t=171746&p=1112062&h ... s#p1099363). I was just reviewing that thread, having now 3+ more years of experience, and would like the revisit one of procount's suggestions, ie using TFTPD32 (or the 64 bit version) as a DHCP server on my Windows 10 Pro laptop.

The goal is to be able to attach a Raspberry Pi nto t he laptop with an ethernet cable and then access it with Putty. My experience says that if I have a monitor attached to the Pi It will shown the address assigned by Windows AND that address seems to be constant for each Pi. But, often a monitor is not available, so the suggestion of using TFTHD as a DHCP server sounds interesting. I think I understand most of the TFTPD configuration BUT I'm not clear on how one goes about BINDing a particular USB ethernet dongle to the server. I obviously do not what to bind the on-board ethernet socket as that would conflict with normal usage.

Can you or someone clarify this issue for me? Thanks....RDK

jbudd
Posts: 1759
Joined: Mon Dec 16, 2013 10:23 am

Re: Connecting a Pi to a PC - continued

Wed May 12, 2021 1:49 am

You can use the ACT or PWR LEDs to signal the IP address of a headless Pi:
Bash script viewtopic.php?f=63&t=279419
or Python https://www.raspberrypi.org/blog/what-t ... p-address/

I suppose you could edit the firstrun.sh file generated by RPi Imager's Advanced Options to save and run one of those scripts.
That script could get the Pi to email it's IP address too.

User avatar
RDK
Posts: 352
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Re: Connecting a Pi to a PC - continued

Wed May 12, 2021 4:32 am

Thanks, I'll look at those links, but e-mail is not an option since it is attached to my laptop which might not itself be online....RDK

User avatar
RDK
Posts: 352
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Re: Connecting a Pi to a PC - continued

Thu May 13, 2021 4:54 am

I've started cataloging the the 169.254 addresses for my "Bakery".
Results:
  • 1. addresses are unique and repeatable over several PC and Pi reboots
    2. PiName.local works, if you know it and can type it without errors ;-(
Still interested in the TFTPD idea.....RDK

absorberet
Posts: 1
Joined: Fri May 07, 2021 2:38 am

Re: Connecting a Pi to a PC - continued

Wed Jun 09, 2021 12:16 am

Hi, I am fresh in raspberry pi. I am using a 3B+. I also have a problem with a captioned. I try to direct connect to a PC with a lan cable using putty, but i cannot find any ip address in my raspberry pi. It is no ip address in both eth0 and wlan0.

User avatar
RDK
Posts: 352
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Re: Connecting a Pi to a PC - continued

Wed Jun 09, 2021 12:28 pm

absorberet....I'm not clear on exactly what you are doing or want to do? The only way I have found to connect from my PC to my Pi is 1) using PuTTY on the PC and 2) knowing the address Windows (I assume you are using Windows?) has assigned to the Pi when it was connected via the Ethernet cable.

As I discussed earlier in this thread, that Pi address will be unique for each Pi and host PC. I determined the Pi address by first connecting the Pi with a monitor and keyboard to the PC with a network/Ethernet cable. After logging on to the Pi, via the keyboard, the

Code: Select all

ifconfig 
command will show a "169.254.x.x" address for the eth0. That is the address you need to use from the PC to connect to the Pi. You may now disconnect from the PC and the keyboard and monitor.

If you now connect the Pi (without monitor and keyboard) to the PC and start PuTTy, you can access the Pi by using the above determined "169.254.x.x" address.

This is the way it is working for me and several Pi's and a Windows 10 laptop....RDK

Return to “Beginners”