Go to advanced search

by Bosse_B
Sat Oct 02, 2021 3:22 pm
Forum: General discussion
Topic: Rpi4 crashed but I don't know why...
Replies: 14
Views: 538

Re: Rpi4 crashed but I don't know why...

Have a look in the system logs: /var/log/syslog Here is the interesting part surrounding the transition from Oct 1 to Oct 2: Oct 2 02:15:36 rpi4-asa systemd[1]: Started Manage, Install and Generate Color Profiles. Oct 2 02:15:37 rpi4-asa colord[722]: failed to get session [pid 339]: No data availab...
by Bosse_B
Sat Oct 02, 2021 2:37 pm
Forum: General discussion
Topic: Rpi4 crashed but I don't know why...
Replies: 14
Views: 538

Re: Rpi4 crashed but I don't know why...

Just as an aside, you may wish to look at enabling the system watchdog service ..... it may help you in the future. https://diode.io/raspberry%20pi/running-forever-with-the-raspberry-pi-hardware-watchdog-20202/ Thanks, I did not think about the watchdog before, but it seems like it could be a neces...
by Bosse_B
Sat Oct 02, 2021 10:33 am
Forum: General discussion
Topic: Rpi4 crashed but I don't know why...
Replies: 14
Views: 538

Rpi4 crashed but I don't know why...

I have an RPi4 which I prepared as a backup server so it has a 2TB drive attached. This was done in Sept 2019 but was not deployed due to Covid-19. $ cat /etc/rpi-issue Raspberry Pi reference 2019-09-26 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 80d486687ea77d31fc3fc13cf3a2f8b464e...
by Bosse_B
Fri Sep 24, 2021 6:35 am
Forum: Other programming languages
Topic: How to extract an url from a page source in a script
Replies: 6
Views: 1221

Re: How to extract an url from a page source in a script

Update for future reference:
This script does no longer work as written since the target page changed from http: to https:
So if anyone finds this in the future:
Be sure to use the correct start of the URL!
by Bosse_B
Thu Sep 23, 2021 4:55 pm
Forum: General discussion
Topic: How to control which interface is used for Internet access?
Replies: 3
Views: 282

Re: How to control which interface is used for Internet access?

At the end of /etc/dhcpcd.conf: interface <4G dongle interface name> metric 100 Ok, I see this situation by the route command (before using your suggested edit): $ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default router.asus.com 0.0.0.0 UG 202 0 0 eth0 de...
by Bosse_B
Thu Sep 23, 2021 1:22 pm
Forum: General discussion
Topic: How to control which interface is used for Internet access?
Replies: 3
Views: 282

How to control which interface is used for Internet access?

I am developing a system on an RPi4, which will finally be deployed on a remote location using mobile 4G broadband with a USB connected modem. While developing the RPi is connected via eth0 to the LAN (which also has an Internet gateway of course) as well as using the 4G modem. So it has two ways to...
by Bosse_B
Thu Sep 23, 2021 9:39 am
Forum: General discussion
Topic: How best to duplicate RPi for customers?
Replies: 3
Views: 318

Re: How best to duplicate RPi for customers?

Well, what I imagined was the following for production: 1) Get the latest NonGUI RasPiOS image from here and write it to the SDcard 2) Start up the RPi with this image, which is then the latest OS. 3) Use the "installer" for our stuff on the RPi to get the things we need loaded. This inclu...
by Bosse_B
Thu Sep 23, 2021 7:20 am
Forum: General discussion
Topic: How best to duplicate RPi for customers?
Replies: 3
Views: 318

How best to duplicate RPi for customers?

I am developing a customized service for the RPi3/4 devices. It is used as a controller for data monitoring equipment attached to the Rpi via RS232 and digital I/O. These connections sit on a custom PCB that plugs into the 40-pin connector. The board also holds an RTC clock circuit and an EEPROM for...
by Bosse_B
Wed Sep 01, 2021 1:30 pm
Forum: Other programming languages
Topic: How to read 2 URL entries from a file
Replies: 10
Views: 1156

Re: How to read 2 URL entries from a file

What about showing input file? It was a two-liner when I started this discussion: https://www.livenewsmag.com/msnbc-news-live-stream https://1420543146.rsc.cdn77.org/dkPdtdfSlSon4W5lH1RqJQ==,1630519575/LS-ATL-54548-10/tracks-v1a1/mono.m3u8 But I replaced the newline on the first line by a space and...
by Bosse_B
Wed Sep 01, 2021 9:12 am
Forum: Other programming languages
Topic: How to read 2 URL entries from a file
Replies: 10
Views: 1156

Re: How to read 2 URL entries from a file

I don't understand all of this and most google hits turns up loops where a file ie being processed on each iteration for a new line. Not what I want.

So I gave up and put both URL:s on the same line with a space in between.
Then the command
read -r var1 var2 < filename
actually works..
by Bosse_B
Wed Sep 01, 2021 7:56 am
Forum: Other programming languages
Topic: How to read 2 URL entries from a file
Replies: 10
Views: 1156

How to read 2 URL entries from a file

I am struggling with a script that needs to read two URL entries from a text file for processing. I can read a single variable from a file containing a single URL using: #!/bin/bash URLFILE="$HOME/test/url_file.txt" read VIDEOURL < $URLFILE But when I try this to read two URL:s it just rea...
by Bosse_B
Sat Aug 14, 2021 3:58 pm
Forum: General discussion
Topic: KODI on RPi4, how to launch a shellscript from menu
Replies: 0
Views: 136

KODI on RPi4, how to launch a shellscript from menu

I am using an RPi4 as a media center running Kodi 18. As part of the media handling I need to update a "streams" subdirectory in my media drive with new strm files from the media server. These strm files serve to tell Kodi to play videos via the internet I have on my Ubuntu server at anoth...
by Bosse_B
Sun Aug 08, 2021 5:13 am
Forum: Other programming languages
Topic: How to extract an url from a page source in a script
Replies: 6
Views: 1221

Re: How to extract an url from a page source in a script

FINISHING UP Just to complete the thread after the reference webpage re-appeared: I could now test the script on the real page and the extraction command actually worked also on that page! So here is the final script to get the wanted Youtube URL from the page: #!/bin/bash baseurl=http://referencep...
by Bosse_B
Thu Aug 05, 2021 10:28 am
Forum: Other programming languages
Topic: How to extract an url from a page source in a script
Replies: 6
Views: 1221

Re: How to extract an url from a page source in a script

Thanks for your suggestions! However, when I tried to check operations today with your changes nothing worked! Turns out that overnight the reference webpage has disappeared! Now waiting for it to re-emerge. I will try to create a test page with the same content on my own website to test the script ...
by Bosse_B
Wed Aug 04, 2021 11:29 pm
Forum: Other programming languages
Topic: How to extract an url from a page source in a script
Replies: 6
Views: 1221

Re: How to extract an url from a page source in a script

Thanks for the suggestions. The token to find in the file has to be https://youtu.be/ because this is the the text preceding the item I need to extract. There are lots of href= etc in the webpage but only the token above is followed by the string I need. The link present in the webpage looks like th...
by Bosse_B
Wed Aug 04, 2021 8:29 pm
Forum: Other programming languages
Topic: How to extract an url from a page source in a script
Replies: 6
Views: 1221

How to extract an url from a page source in a script

I have an RPi4 box running a few scripts which depend on a webpage for which the URL changes at irregular intervals. The current URL for the webpage is contained on a different webpage as a link to the wanted page. When the wanted page changes this is reflected in the second webpage. So now I would ...
by Bosse_B
Mon Jul 05, 2021 7:50 pm
Forum: General discussion
Topic: Testing network - how to control which interface is used?
Replies: 6
Views: 494

Re: Testing network - how to control which interface is used?

Turns out that speedtest has a command argument to set the interface: $ speedtest --interface=eth1 Speedtest by Ookla Server: Netprotect - Stockholm (id = 37647) ISP: Hi3G Access AB Latency: 65.86 ms (26.45 ms jitter) Download: 0.58 Mbps (data used: 712.4 kB) Upload: 0.32 Mbps (data used: 279.0 kB) ...
by Bosse_B
Mon Jul 05, 2021 7:30 pm
Forum: General discussion
Topic: NTFS drive mounted via USB - all files are executable!
Replies: 9
Views: 451

Re: NTFS drive mounted via USB - all files are executable!

The way that the file system is mounted does not change the actual permissions (or lack there of) for any files written to the NTFS volume. All you are doing is effectively overlaying a permission set for the duration of the particular mount. As already noted, if you want the actual files to have p...
by Bosse_B
Mon Jul 05, 2021 1:30 pm
Forum: General discussion
Topic: NTFS drive mounted via USB - all files are executable!
Replies: 9
Views: 451

Re: NTFS drive mounted via USB - all files are executable!

For future reference you might find this worth a read: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=302752&p=1815316#p1815316 I maintain a "Linux-notes" document in md format on my PC disk where I put all of the intricate solutions to various problems on Linux. It has s...
by Bosse_B
Mon Jul 05, 2021 9:23 am
Forum: General discussion
Topic: NTFS drive mounted via USB - all files are executable!
Replies: 9
Views: 451

Re: NTFS drive mounted via USB - all files are executable!

Sorry, I don't know anything about ntfs issues, and didn't even know that mount had fmask and dmask options. But... don't forget that there are 3 different execute bits - one for each of user, group and others. To turn off all three, you might want to use fmask=111. (Which was the suggestion in the...
by Bosse_B
Mon Jul 05, 2021 5:41 am
Forum: General discussion
Topic: NTFS drive mounted via USB - all files are executable!
Replies: 9
Views: 451

NTFS drive mounted via USB - all files are executable!

I must be doing something stupid when mounting an USB drive which is formatted as ntfs... The drive is a 1TB disk containing various items including videos and images and they all show up as executable! What can I do to fix this so they are NOT executable? This is on RPi2 and RPi3 and the file listi...
by Bosse_B
Sat Jul 03, 2021 7:23 pm
Forum: General discussion
Topic: Testing network - how to control which interface is used?
Replies: 6
Views: 494

Re: Testing network - how to control which interface is used?

I searched for speedtest for armhf and found a page where it could be downloaded . There they had instructions for how to uninstall speedtest-cli since it interfered with the new speedtest version. This version is downloadable as a tgz file and contains an executable binary. I used wget on my RPi to...
by Bosse_B
Fri Jul 02, 2021 1:47 pm
Forum: General discussion
Topic: Testing network - how to control which interface is used?
Replies: 6
Views: 494

Testing network - how to control which interface is used?

I want to test a mobile broadband modem connected to an RPi4 unit. I have trouble figuring out how to do this, though... Here are the basics: - Device is an RPi4 with Pi-OS Lite running headless - It is connected by eth0 to my local LAN - I access it via ssh from my Windows PC using PuTTY on the loc...
by Bosse_B
Wed Jun 09, 2021 11:58 am
Forum: General discussion
Topic: How to use 4G mobile network on RPi3/RPi4?
Replies: 14
Views: 940

Re: How to use 4G mobile network on RPi3/RPi4?

If you plugged in the modem after boot, then the only lines in the dmesg output related to the modem will be the 5-15 last lines. OK, so I will reboot again and THEN plug in the modem. Interestingly after I pulled out the modem I checked ifconfig and now the extra eth1 is gone... Now I have done th...
by Bosse_B
Wed Jun 09, 2021 11:45 am
Forum: General discussion
Topic: How to use 4G mobile network on RPi3/RPi4?
Replies: 14
Views: 940

Re: How to use 4G mobile network on RPi3/RPi4?

If the device is not correctly recognized by the kernel then plug in the modem after Pi boot, and then run the command "dmesg" and look at the last lines. If you post them here, we might be of some help. I rebooted with the modem attached and here is what I get now: $ lsusb Bus 002 Device...

Go to advanced search