Hi everyone I'm trying to figure out how I can have my cake and eat it to, I have a 3.5 inch touch screen and i had it working but I cant use the hdmi when i hookup the monitor. Id like to be able to use both. I'm trying to make my Pi mobile but to do updates Id like to use my 19" monitor. Once having the 3.5 screen I cant get back into the hdmi I had to reload the pi there must be a way to have both! Any Idea's. I'm not a programmer so I need a programmer to help tried a bunch of changes in config.txt but didn't work. Thanks Sam
From what you've said, I gather you have a 3.5 that plugs onto the gpio pins. It would seem to me that your best choices would be to use one hdmi display and the pi 7 inch DPI touch monitor; try to hookup to the composite video output (which limits resolution); or replace your current
3.5 with a small hdmi (I have a 5" hdmi touch screen) and use an hdmi splitter or swap hdmi units.
On a sunny day (22 Jun 2018 19:49:51 GMT) it happened A. Dumas wrote in :
For some, that is possibly the best solution, yes, I have a bunch of computers, sensors, including some raspis, on the LAN. The LAN is on 24/7 while the cable modem ('router') is not. Things are restarted, connected, disconnected all the time. You can give the computers names in /etc/hosts:
192.168.178.154 camera4 ...
and from that moment on refer to it by name: ~# ping camera4 PING camera4 (192.168.178.154) 56(84) bytes of data.
64 bytes from camera4 (192.168.178.154): icmp_req=1 ttl=255 time=0.738 ms
There are other reasons for fixed IP addresses too, some are hard-coded in the sensors (internet of things) and can only be changed via some serial config program, UDP based sensors. If you let a router assign the addresses then chances are for a conflict. Fixed IP address are also much more convenient in testing and debugging.
And also in the router (cable modem in my case) port forwarding is specified, for example port 80 to the web server raspi, to some other system for ssh, etc etc. and that needs a fixed address specified. And then there is MAC based filtering only allowing some MACs on the Wifi. There are probably more reasons but it is still early Saturday morning ... :-)
Last night I wrote a new version of ip_to_country, need to see if I can make it faster using successive approximation in the very very long IP list. But it does work, finds most countries (all so far). If people need it I can put what I have now on the website, ask here. Work in progress.
I guess that can be a valid reason. For most people the LAN would crumble anyway when the modem/router shuts down, I think (direct cables to modem/router, wifi from modem/router).
Ah that's tricky. What I would do is make sure the DHCP range of my modem/router lies outside the range used by the sensors.
Well, that's just it. Using fixed IPs depends on good administration or perfect memory. Apparently you have either or both, so it works for you!
Those things also work perfectly well with fixed addresses assigned by DHCP. Maybe we misunderstood each other? Because I didn't mean completely free DHCP, but fixing the client address in the DHCP server aka. the modem/router, letting the DHCP server always assign a certain address to a certain host using the client's MAC address, or even their mDNS/bonjour/zeroconf name but that mostly turns out evil. And add a free DHCP range for devices that don't need a fixed address, e.g. your phone. All the modem/routers I used in the last 10(?) years could do this. That way you are guaranteed of:
- no conflicts
- a one-time setup
- a central administration Now you only have to know the device's name. And yeah, your first argument probably stands, for you.
On a sunny day (Sat, 23 Jun 2018 11:10:32 +0200) it happened "A. Dumas" wrote in :
hehe yes, may be a matter of taste? (automatic gear versus manual gear sort of thing?). As things get more complicated here, 2 fully loaded 8 port switches, not via the cable modem / router, power over ethernet for some sensors, and I have an electronics background, numbers.. need to know :-) Wrote the UDP stacks too in asm for the sensors, on my site too. WiFi was hacked some years ago, so that is now normally off, cable modem has a phone connector no need for WiFi, do not like smartphones anyway, have a normal ancient Nokia (cannot be hacked other than with an axe) but the MAC filtering should make it safer now. There are ethernet connectors where I would use laptops. And then there are a few RTL_SDR sticks in use for radio like things, ham radio, AIS, airplane traffic, wireless sensor receive and forwarding via UDP.. It is not the normal pie on a router situation... For those, sure, but even then as soon as you really want to do something with the Pie you will want a fixed IP address, in my experience that is. Maybe I am the F1 driver type ;-)
On a sunny day (Sat, 23 Jun 2018 16:43:24 +0100) it happened The Natural Philosopher wrote in :
It won't be broadcast, but it is in my /etc/hosts at my workstation, and if needed easily copied to other things / computers. I do most things with raspies via ssh from one big PC anyways. One raspi has an analog output that is fed to a security recorder that I can then see via ethernet on the main PC.. There is an other reason for fixed IPs on that machine, do not know if you are familiar with 'snort', I use if for traffic monitoring. As a hundred different things communicate with the main station, say if I want just to see the thing my browser does, but not all the packets from cameras (that is a LOT of traffic, or raspies), there is a script like this: snort -i eth0 -v -d not host camera4 and not camera6 and not 192.168.178.1 and not 192.168.178.84 and not 192.168.178.79 and not 192.168.178.82
I just type trace-net3 There are a thousand more commands / scripts. ha, I just finished ip_to_country C code that uses successive approximation, even on a fully loaded raspi it finds a country from an IP in a split second! A linear search in the same database takes several seconds. Now it is more useful in a real time script to kill bad actors.
The above example assigns the address 192.168.1.1 to eth0 with a subnet mask of 255.255.255.0, and sets the default gateway to 192.168.1.254.
Edit the file /etc/network/interfaces like this: The second thing you need to do is check that you have a valid DNS server listed in /etc/resolv.conf.
Edit this file using your text editor and add your DNS server if it is not already there. If you are using a broadband router, add the address of your router as the DNS server. ------------------
I specified the google nameservers in /etc/resolv.conf: nameserver 22.214.171.124 nameserver 126.96.36.199
You could use your IPSs too.
Yes, but for example the desktop, laptops here are not client only. In fact I had the webserver running on one of the early (Linux) eeePCs many many earth orbits ago. It is (in my eeepc) now just a boot option (yes different kernel too). Same for this machine I am typing on, just point port 80 to it and same server, this is a big one, in fact the one where I edit / create the website. Raspi is cheaper as server, and allows me to mess around with the big one without having that backup raspi server going offline. Some other raspies are online 24/7 never go offline normally: root@raspberrypi:~/compile/pantel/xgpspc# uptime 20:00:21 up 38 days, 12:28, 9 users, load average: 2.58, 2.82, 2.85 Not everything here is visible from the internet unless I want to ;-)
It is all very simple, really. Once you have dunnit :-)
The IP address is generally part of the ethernet or wifi port configuration. File names and locations may vary between Linux distros and versions:
- debian/Raspbian define the IP address,netmask and network gateway in /etc/network/interfaces
- Fedora (so also CentOS and RHEL) put it in /etc/sysconfig/network-scripts in a file whose name starts with ifcfg- and is followed by a system-defined name for the ethernet port
- I can't comment about wifi because I don't use it.
Once those are set on each host on your network, you can either distribute copies of /etc/hosts as Jan does, or you can run a local recursive DNS on any host on your network that runs 24/7. Either bind or unbound will do the job: I use bind. Any RPi model should be powerful enough to provide a DNS service for even a complex home or small office network. Doing it this way with standard Linux software means you don't have to fight with whatever proprietary DHCP system is on your router.
On RPi, avahi-daemon is installed & enabled by default. (Also called zeroconf or bonjour.) Windows and macOS have it. Not sure about other Linux distros but I figure recent popular ones like Ubuntu desktop also have it. So that covers a lot of setups.
i simply disabled DHCP on my router & rung my own DHCP server instead (in my case this is needed as I have a number of devices that require specific option that the Router DHCP server does not).
I use DNSmasq on a Fedora file server but this could easily be handled by a PI fixed IP addresses are normally allocated by MAC address but there is a range off addresses outside the normal DHCP scope that can be assigned manually when more appropriate
I'm sorry, but my karma just ran over your dogma.
On a sunny day (Sat, 23 Jun 2018 18:36:00 +0000 (UTC)) it happened Martin Gregorie wrote in :
Indeed, before I hosted my website with godaddy, I had the name server running here too (bind), and sendmail. That is a bit more difficult to configure. I think the new nameservers use some encryption protocol? It is on the todo list, if US imposes more trade tariffs towards Europe, then I will sanction back by moving the domain registration to for example Panama and run the whole thing including nameserver here again, on raspberries. This (raspi webserver) was a first step in that direction. It was hit again: ...
188.8.131.52 - - [23/Jun/2018:15:57:26 +0000] "GET /typo3/phpmyadmin/index.php HTTP/1.1" 404 542 "-" "Mozilla/5.0"
184.108.40.206 - - [23/Jun/2018:15:57:27 +0000] "GET /phpma/index.php HTTP/1.1" 404 531 "-" "Mozilla/5.0" ... It _is_ some more work. I have payed godaddy for a year, still plenty time to make a test domain and switch over at the right moment. Will let them know why too.
I think unbound may be a bit easier to set up than bind - there's an O'Reilly book about bind and I was very glad to have a copy.
As for sendmail - personally I wouldn't touch it with a bargepole. Postfix is very stable and a lot easier to configure. It has a good website, a helpful mailing list and a sensible, though large set of configuration parameters that, unlike the sendmail configuration are easy to read and understand. I have Postfix running on all my computers except the RPi, with my one 24/7 system acting as master - the others only use Postfix to send logwatch reports, etc to the master, which also runs Dovecot as its local delivery agent.
You're thinking of DNSSEC, which is meant to prevent DNS MITM and spoofing attacks, but isn't needed on a private LAN. All that matters is that your local DNS is running in recursive mode and is configured to pass requests it can't answer to your ISP's nameservers, Google, etc. That's the recursive part.
Don't configure it as a forwarding nameserver, especially if you're running anything like Spamassassin. It uses the DNS protocol to talk to DBSBL (blacklist) and DNSWL (whitelist) servers which have query limits. If you run your DNS as a forwarder your queries get aggregated with those from everybody else who forwards to the same nameserver and are probably blocked as a result. DNSBLs and DNSWLs usually have a query limit suitable for personal and small business use and require a subscription if your use exceeds the free limit.
Don't forget that your domain name host can be totally separate from your mail and webhosts. Mine is: I configure my domain name account so it redirects both mail and web requests to whoever is providing my mail delivery and webhosting services - usually my ISP. This means that I can switch ISP and webhost with minimal effort and without needing to tell anybody else about the switch.