3.5 touch screen

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

Reply to
Datalus
Loading thread data ...

On a sunny day (Thu, 21 Jun 2018 11:20:52 +1200) it happened snipped-for-privacy@f120.n23.z1.binkp.net (Datalus) wrote in :

Cannot you just ssh to it from a normal PC with a big monitor? ssh -Y pi@IP_ADDRESS sudo su -

You need to know the pie's ip address of course. ifconfig will tell you on the small monitor. Best is to give it a fixed IP address anyways.

Reply to
Jan Panteltje

Perhaps, but don?t fix the ip address on the client, leave it on dhcp and use your router to assign a fixed address. 99.3% of routers currently on the market can do that.

Reply to
A. Dumas

I'm not sure what you are saying? There are HDMI connected screens that have touch:

formatting link

you could always use that. :)-- Torfinn Ingolfsen, Norway

Reply to
Torfinn Ingolfsen

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.
Reply to
ray carter

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.

Reply to
Jan Panteltje

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.

Reply to
A. Dumas

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 ;-)

Reply to
Jan Panteltje

- No way to know waht IP addres the servers are on. Tpday.

Knowing its name don't help by and large since it wont be broadcast anywhere.

--
?Progress is precisely that which rules and regulations did not foresee,? 

  ? Ludwig von Mises
Reply to
The Natural Philosopher

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.

Reply to
Jan Panteltje

And what guarantee is there that its IP adress will stay te same next time it reboots a DHCP request?

I know where my servers are becuse they areon fixed IP addreesses so hostr tables work - I could even set up DNS on te network...

DHCP is for client only machines - the smart phone the desktop and the laptop. And vistors.

--
Those who want slavery should have the grace to name it by its proper  
name. They must face the full meaning of that which they are advocating  
or condoning; the full, exact, specific meaning of collectivism, of its  
logical implications, of the principles upon which it is based, and of  
the ultimate consequences to which these principles will lead. They must  
face it, then decide whether this is what they want or not. 

Ayn Rand.
Reply to
The Natural Philosopher

On a sunny day (Sat, 23 Jun 2018 17:16:07 +0100) it happened The Natural Philosopher wrote in :

There is a howto online how to configure a raspi with a fixed IP address, but basically (almost verbatim copy):

DHCP for eth0 is enabled in the file /etc/network/interfaces. Here is what it looks like by default on a Raspberry Pi under the official version of Raspbian: auto lo

iface lo inet loopback iface eth0 inet dhcp

allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp

(Note: there is no actual wlan0 interface unless you attach a wireless USB network adapter. The entries that refer to wlan0 are there for when you do ;-) ).

Instead of the line:

iface eth0 inet dhcp

you need lines like this:

iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254

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 8.8.8.8 nameserver 8.8.4.4

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 :-)

Reply to
Jan Panteltje

The hostname and IP address can be made static.

The hostname is in /etc/hostname

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.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Can't you just use geoip?

(untested) $ apt-get install geoip-bin geoip-database

then use geoiplookup to find the country for an IP.

--
Dave
Reply to
Dave

On a sunny day (Sat, 23 Jun 2018 20:18:00 +0100) it happened Dave wrote in :

Probably, but sometimes I like to write code :-)

Reply to
Jan Panteltje

Because the client?s MAC address won?t change and you?ve configured your DHCP server (in your modem config interface) to assign a fixed IP address to it. Outside the dynamic DHCP range, obviously.

Reply to
A. Dumas

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.

Reply to
A. Dumas

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.
Reply to
Alister

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: ...

202.70.136.130 - - [23/Jun/2018:15:57:26 +0000] "GET /typo3/phpmyadmin/index.php HTTP/1.1" 404 542 "-" "Mozilla/5.0" 202.70.136.130 - - [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.

We will see.

Reply to
Jan Panteltje

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.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.