rlancaste wrote: Astronerd,
The adding of a static IP is an optional item. It asks you when the script runs whether you want to set that up or not. Did you choose to create one? Some people might like to do that, and some might not, so I purposely made it ask you during the script.
The reason that I added that feature is because when you are in the middle of the field and there is no wifi, no router, and no internet, you can directly connect your computer to the PI with just a simple ethernet cable. Since there is no DHCP, the PI would not get an IP address unless it is self assigned. Your laptop also gets a self assigned IP address. These two addresses have to be in the same range in order to talk over the ethernet cable. For mine, they both must be 169.254.0.xxx since that is what my computer does by default. This is very important because it is my backup method of connecting to my PI if something goes wrong with wifi. I also tend to use that to connect to it at first in order to connect it to a wifi network when I bring my pi someplace. So I added this to make sure that the pi keeps that address fixed and running on ethernet for when I need to plug in my cable. In previous versions of the script, I had put it into cmdline.txt, but I found that sometimes after awhile, it would drop that connection. Also it sometimes caused the PI to delay startup because it was waiting for the network. In the new version, I put it in as a virtual network so that it shouldn't prevent ethernet from working with DHCP if you connect it to a router, but it will still keep the static IP running in the field if you need to connect to your laptop. At least this is my reasoning, have you found that this isn't true anymore?
As to your second point, for the resolution. When no HDMI device is connected to the Pi with its default settings, it will get a resolution that is crazy over VNC, something like 800 x 600, which isn't 4k, nor is it HD resolution. In the file config.txt, there are several settings that you can change that will allow you to get the resolution that you like. hdmi_group, hdmi_mode, and dtoverlay=vc4-fkms-v3d. Please read my comments in this file github.com/rlancaste/AstroPi3/blob/maste...upAstroRaspbianPi.sh for more information. Note that whatever you set will give the PI a fixed resolution. The settings that I chose will give you a headless resolution of 1440x900 because I found that to be nice on my monitor. If you want to change that to have a higher resolution, you can chose one of the other modes like maybe hdmi_mode=80? You can find all the modes here: elinux.org/RPiconfig . Or you could enter the exact screen resolution that you want by entering framebuffer_width and framebuffer_height instead. Note that if you don't find my solution to work at all, you can also disable that part of the script entirely if you like, but from what I have seen, you won't like the resolution you get.
stash wrote: "But, firstly my point is that the rpi can connect direct to another PC with Ethernet cable without the need for a static ip, just plug the cable between and it works straight away"
This only works if either a DHCP server is available somewhere on your network , you have a static address defined in the Wired Ethernet settings or you have connected via the Ethernet(wired) before and the lease time provided by DHCP that you originally connected to hasn't expired - the latter should fail but I have noticed this does work sometimes.
This is standard networking, be it Windows or Linux