Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
Hi Terry, > https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=234636 I've just read that. If you've TCP/IP to each Pi then I'd ditch the idea of a physical screen, no matter how small, and use your laptop's, etc. > I've been using SSH and Filezilla; the former to log into the Pi and > the latter to download results and log files from them. It works > well, but leaves one hole in the information available to us; what > happens at boot-up and what logging messages are visible on the > console in real time? By console, is the kernel's ring buffer of messages good enough? Displayed by dmesg(1), you can look at what was placed in it on booting, once networking is going and you can log in, with `dmesg -Hx'. That will pipe to less and you might need to type `-R' to show the colours, depending on your settings. dmesg also has `-w' to wait for new logging in the ring buffer, so a bit like `tail -f' that follows a file. > to someone who suggested using a USB to Serial Adaptor connected to > the Pi's UART. That's been my repeated suggestion over the years. :-) The network has the advantage of remote access, and connecting to multiple Pis at once. On the other hand, it requires more to be working. > The idea of using the USB to Serial Adaptor seemed to be the way > forward, so I bought one. However, this doesn't allow me to see the > boot messages or the logging, because I have to log into the Pi > anyway, which is exactly what I do with SSH! You need to set up your installation to log to the serial port and not run `getty' on it so no login prompt is displayed. The former is common on Pis if they want to use that port to talk to another device. -- Cheers, Ralph. -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
On Wednesday, 13 March 2019 13:55:25 GMT Ralph Corderoy wrote: > I've just read that. If you've TCP/IP to each Pi then I'd ditch the > idea of a physical screen, no matter how small, and use your laptop's, > etc. Yes. That's what we've been doing for the past two years or more, but only with SSH and FTP. > By console, is the kernel's ring buffer of messages good enough? > Displayed by dmesg(1), you can look at what was placed in it on booting, > once networking is going and you can log in, with `dmesg -Hx'. That > will pipe to less and you might need to type `-R' to show the colours, > depending on your settings. > > dmesg also has `-w' to wait for new logging in the ring buffer, so a bit > like `tail -f' that follows a file. That's useful to know, but see below. > You need to set up your installation to log to the serial port and not > run `getty' on it so no login prompt is displayed. The former is common > on Pis if they want to use that port to talk to another device. I've been looking into my use of the serial port and have realised that it wasn't as bad as I thought it was. If I can solve one remaining problem, I think it will do what I want it to. When I first started playing with this, I wasn't sure what serial comms package to use to access the screen messages. After searching through quite a few pages and what packages were available on this machine, settled on PuTTY. This was the cause of my confusion, because all it did was put up loads of unprintable chars before it stopped. If I then hit CR a few times, i was able to log in. Today, I looked into this again and tried a few other packages; CuteCom and moserial initially. CuteCom seems to work, but I don't really like the layout. I never really got moserial to work so I looked around again and discovered minicom. This gives me all of the boot messages and does so in a standard Linux console format, so it is familiar territory. The only trouble was that it was not seeing keyboard entry, but that was fixed by turning off hardware Flow Control. So the only thing left is to turn off getty. I had a rummage around on line and found lots of old pages that talked about disabling it in initab, which no longer exists on Raspbian Stretch. I then found references to issuing: sudo systemctl disable serial-getty@ttyAMA0.service but it doesn't seem to work, I still get the login prompt. Any ideas? If I can stop the login prompt from coming up, it may well do everything I need. -- Terry Coles -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
Hi Terry, > sudo systemctl disable serial-getty@ttyAMA0.service > > but it doesn't seem to work, I still get the login prompt. It's hard to say because the systemd units configured will be specific to Debian, or even Raspbian, and I think the names of the serial ports, e.g. ttyAMA0, have changed between models because they nicked the SoC's real UART for talking to Bluetooth, or something, and substituted bit-banging in its place that has flaky timing depending on CPU-speed changes. There the rumours I've heard, anyway, I'm out of touch with Pi stuff. `disable' stops it starting on booting rather than stopping it now. `mask' blocks it from starting either manually, or as a dependency of something else that's starting. `systemctl | grep getty' will show the systemd units, etc., involved in your system. And http://0pointer.de/blog/projects/serial-console.html suggests your simplest bet would be to alter the kernel's parameters so systemd doesn't want to start a getty. -- Cheers, Ralph. -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
On Wednesday, 13 March 2019 17:15:20 GMT Ralph Corderoy wrote: > It's hard to say because the systemd units configured will be specific > to Debian, or even Raspbian, and I think the names of the serial ports, > e.g. ttyAMA0, have changed between models because they nicked the SoC's > real UART for talking to Bluetooth, or something, and substituted > bit-banging in its place that has flaky timing depending on CPU-speed > changes. There the rumours I've heard, anyway, I'm out of touch with Pi > stuff. Hmmm. I'm testing this with a Pi 3, but the target systems are all Pi Zeros. > `disable' stops it starting on booting rather than stopping it now. > `mask' blocks it from starting either manually, or as a dependency of > something else that's starting. That's what I thought. > `systemctl | grep getty' will show the systemd units, etc., involved in > your system. And http://0pointer.de/blog/projects/serial-console.html > suggests your simplest bet would be to alter the kernel's parameters so > systemd doesn't want to start a getty. That gave me: pi@raspberrypi:~$ systemctl | grep getty serial-getty@ttyS0.serviceloaded active running Serial Getty on ttyS0 system-serial\x2dgetty.slice loaded active active system-serial\x2dgetty.slice getty.target loaded active activeLogin Prompts I tried disabling 'serial-getty@ttyS0.service' but that didn't seem to work; if I stop the service, it is definitely gone, but a reboot brings it back. even after a disable I'm not sure what getty.target is doing, but it doesn't appear to be a service anyway. So still wondering. -- Terry Coles -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
Hi Terry, > > `disable' stops it starting on booting rather than stopping it now. > > `mask' blocks it from starting either manually, or as a dependency > > of something else that's starting. ... > $ systemctl | grep getty > serial-getty@ttyS0.serviceloaded active running Serial Getty on ttyS0 > > > system-serial\x2dgetty.slice loaded active active > system-serial\x2dgetty.slice > > getty.target loaded active activeLogin Prompts > > I tried disabling 'serial-getty@ttyS0.service' but that didn't seem to > work; if I stop the service, it is definitely gone, but a reboot > brings it back. even after a disable That suggests it's a dependency of something else, probably getty.target. See `mask' above. > I'm not sure what getty.target is doing, but it doesn't appear to be a > service anyway. No, it's a target. :-) systemd.target(5). > So still wondering. If mask doesn't work, there's... > > And http://0pointer.de/blog/projects/serial-console.html > > suggests your simplest bet would be to alter the kernel's parameters so > > systemd doesn't want to start a getty. BTW, this was an occasion where no blank lines followed. > Terry Coles > -- > Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 -- Cheers, Ralph. -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
On Wednesday, 13 March 2019 16:25:10 GMT Terry Coles wrote: > So the only thing left is to turn off getty. I had a rummage around on line > and found lots of old pages that talked about disabling it in initab, which > no longer exists on Raspbian Stretch. I then found references to issuing: I have now resolved the use of this device and it turns out that it is not necessary to disable getty to achieve what I want to do. I did spend quite a bit of time yesterday trying to turn off getty and finally achieved it by using mask. That stopped the login prompt alright, but it also stopped me interacting with the Pi through minicom ;-( I went to bed a little bit despondent... However, this morning I realised that the thing I hadn't tried was to create a program to run automatically on boot up of the Pi, run minicom and then and login in the normal way. Lo and behold, there was my executing program! So I don't need to disable getty, I just need to do things properly! I can even start minicom when the Pi has been running for some time and I can still see what is being written to the screen as my program executes; just what I needed! Thanks for all help. -- Terry Coles -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
Hi Terry, On Thu, 14 Mar 2019 13:27:44 +, Terry Coles wrote: > However, this morning I realised that the thing I hadn't tried was > to create a program to run automatically on boot up of the Pi, run > minicom and then and login in the normal way. Lo and behold, > there was my executing program! > > So I don't need to disable getty, I just need to do things properly! > I can even start minicom when the Pi has been running for some > time and I can still see what is being written to the screen as my > program executes; just what I needed! Could you elaborate on what was involved to 'do things properly'? I don't think I understand what enabled you to see the output from your program after logging in. I would not expect the output of a running program to appear on a terminal without some specific configuration or incantations to tell it to do that, especially if you want it to only show up after logging in on the terminal. This might be a mistaken assumption on my part. How does getty trigger this program that started on boot to output on the terminal after you log in? Patrick -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
On Thursday, 14 March 2019 16:42:53 GMT Patrick Wigmore wrote: > Could you elaborate on what was involved to 'do things properly'? Well. In the context of what you're asking, I can't tell you any more than I have already. although I now realise that I wasn't doing quite what I thought I was doing. On the Pi, I opened the Raspberry Pi Configuration tool and enabled the Serial Port. This enabled the Serial Console. The Pi had previously been configured to Auto-login to the Pi User's account. This means that if I attached a normal monitor and keyboard to the Pi, I can view the boot messages as they come up and then the program that I have set up to start at boot up ends. When I view the process using the serial port, exactly the same thing happens, but the program doesn't start until I've logged in. > I don't think I understand what enabled you to see the output from > your program after logging in. Ah. I'm not sure that I fully understood myself what was going on. See below. > I would not expect the output of a running program to appear on a > terminal without some specific configuration or incantations to tell > it to do that, especially if you want it to only show up after logging > in on the terminal. This might be a mistaken assumption on my part. No. I don't think you are mistaken. Your scepticism made me think about what I had just done. In fact, what is happening is that I have set the program to start in .bashrc, so in reality, it is a new instance of the program that starts when I log in via the serial port; the version started at boot up is still running and not visible to me. I just modified the program so I could see that (it was a bit noddy). > How does getty trigger this program that started on boot to output on > the terminal after you log in? See above. So the news isn't as good as I thought, but restarting the software when I log in through the serial port isn't going to be a show stopper. I would probably have to stop the all instances and then restart it to get a true picture of what is going on. Alternatively I can disable Auto-Login and catch the first instance. I'll get the information I need, but I will have to work a bit harder and I won't see the messages that were being written just prior to the login. Maybe that miniature HDMI screen isn't such a bad idea ;-) -- Terry Coles -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk
Re: [Dorset] Slightly Off-Topic - Reasonable Miniature HDMI Monitor
On 11/03/2019 12:15, Terry Coles wrote: This is another question that I asked on the Raspberry Pi Forums, since it relates mainly to the performance of miniature monitors when used with the Pi. Here is the original post: https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=234636 To re-iterate, we will eventually have around 15 Pis running at the Wimborne Model Town; all running headless and all related in some way to the management of water in the model River System. I've been using SSH and Filezilla; the former to log into the Pi and the latter to download results and log files from them. It works well, but leaves one hole in the information available to us; what happens at boot-up and what logging messages are visible on the console in real time? It would be useful to us to be able to see these whilst observing the behaviour of the River System itself, so I thought that maybe a small HDMI monitor would be useful and save me having to lug my old VGA monitor to some obscure corner of the site. The responses have been a bit mixed; ranging from people simply doing a Google for small 'HDMI Monitor' (presumably believing that I didn't actually know how to do that :-) ) to someone who suggested using a USB to Serial Adaptor connected to the Pi's UART. As far as the monitor suggestions are concerned, I haven't seen anyone who appears to have actually tried one of the recommended monitors, which was really the point of my question. So does anyone here have any experience of using a 7" to 12" HDMI Monitor with a Raspberry Pi and if so, would they recommend it? (It must be HDMI, since that is the only interface conveniently available.) The idea of using the USB to Serial Adaptor seemed to be the way forward, so I bought one. However, this doesn't allow me to see the boot messages or the logging, because I have to log into the Pi anyway, which is exactly what I do with SSH! Obviously when I log in subsequent to the program starting, I'm not given access to the boot messages, because they've already happened and I'm logging into a different session to the one which is running our code anyway. Is there a way to view the information that I need during boot-time, without connecting a monitor? Just discovered this: https://www.youtube.com/watch?v=yOHws0qBBmI&t=628s Peter -- Next meeting: BEC, Bournemouth, Tuesday, 2019-04-02 20:00 Check to whom you are replying Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/ New thread, don't hijack: mailto:dorset@mailman.lug.org.uk