Go to advanced search

by Bosse_B
Tue Jun 30, 2020 6:40 pm
Forum: General discussion
Topic: How to display markdown document with rendering on RPi4?
Replies: 5
Views: 288

Re: How to display markdown document with rendering on RPi4?

OK, solved! I went to the extension author's homepage and found this: Installing on Linux Firefox on Linux may not know how to handle markdown files by default (see #2). A workaround for this is to add a new MIME type for markdown file extensions. Add the following XML to ~/.local/share/mime/package...
by Bosse_B
Tue Jun 30, 2020 6:21 pm
Forum: General discussion
Topic: How to display markdown document with rendering on RPi4?
Replies: 5
Views: 288

Re: How to display markdown document with rendering on RPi4?

Thanks for the suggestions! Regarding markdown I see it displayed properly on Github (the readme files there are usually md). We also use Visual SVN as the subversion server and in its browsing interface (a bit more decorated than Apache Svn's built-in) whenever one reaches a folder with a readme fi...
by Bosse_B
Tue Jun 30, 2020 8:39 am
Forum: General discussion
Topic: How to display markdown document with rendering on RPi4?
Replies: 5
Views: 288

How to display markdown document with rendering on RPi4?

I am keeping development notes in readme.md files and on Windows (using Firefox) I can easily read these with the formatting shown by opening the file using FireFox. I have installed the addon "Markdown viewer webext" into Firefox. Now I am moving development onto the RPi4 itself and it would be ver...
by Bosse_B
Mon Jun 22, 2020 4:11 pm
Forum: Raspberry Pi OS
Topic: Trying to create a systemd service application...
Replies: 3
Views: 231

Re: Trying to create a systemd service application...

For example, I run Firefox as a systemd service. That is a bit weird, does it display a window or is it completely hidden? But it raises another question: If I run a GUI application (one with a main form) as a systemd service, does it then act differently than a simple command line program does? Fo...
by Bosse_B
Sun Jun 21, 2020 1:31 pm
Forum: Raspberry Pi OS
Topic: Trying to create a systemd service application...
Replies: 3
Views: 231

Trying to create a systemd service application...

I want to create a program for RPi, which will mimic an existing program I wrote for Windows back around 2004. That program was a service application created using Delphi7 (object pascal language). But I want to create a clone of it for RPi4 Linux, and the most problematic part is the interface to t...
by Bosse_B
Mon Jun 15, 2020 9:19 pm
Forum: General discussion
Topic: Command not working from script but on command line - why?
Replies: 5
Views: 229

Re: Command not working from script but on command line - why?

RonR wrote:
Mon Jun 15, 2020 9:07 pm
Try instead:

Code: Select all

echo "Command to execute: $COMMAND"
eval $COMMAND
THANKS A MILLION!
That did work!

What is happening when using eval rather than just the command?
by Bosse_B
Mon Jun 15, 2020 9:15 pm
Forum: General discussion
Topic: Command not working from script but on command line - why?
Replies: 5
Views: 229

Re: Command not working from script but on command line - why?

I don't know about this particular case, but problems like that often come down to making sure that the environmental variables, especially PATH are set properly. Also...are you sure you need quotes around the command line arguments? As a test, I would suggest echoing your variables to see if they ...
by Bosse_B
Mon Jun 15, 2020 8:03 pm
Forum: General discussion
Topic: Command not working from script but on command line - why?
Replies: 5
Views: 229

Command not working from script but on command line - why?

System: RPi4 running Raspbian Buster fully updated. ffmpeg is version: 4.1.4-1+rpt7~deb10u1 I have created a script to automate a video cropping function executed via ffmpeg. In principle the script looks like this with error catching removed: #!/bin/bash CROP="$1" SOURCEFILE="$2" TARGETFILE="$3" CO...
by Bosse_B
Fri May 01, 2020 10:28 pm
Forum: General discussion
Topic: Proprietary add-on board, how to detect its presence?
Replies: 5
Views: 251

Re: Proprietary add-on board, how to detect its presence?

Thanks! I can use a clarification on the settings file format: When setting up the GPIO map in the eeprom_settings.txt file, what do I do with pins used for: - The serial port (GPIO14/15) - The I2C bus (GPIO2/3) Either I do not remove the comment on those lines or I set the pins as OUTPUT/INPUT as n...
by Bosse_B
Fri May 01, 2020 7:21 pm
Forum: General discussion
Topic: Proprietary add-on board, how to detect its presence?
Replies: 5
Views: 251

Re: Proprietary add-on board, how to detect its presence?

You've already got the HAT EEPROM which does this. Look in /proc/device-tree/hat/ ls -la /proc/device-tree/hat/ ls: cannot access '/proc/device-tree/hat/': No such file or directory Using HAT was the plan, but I am not sure what to put into it in order to get it working. The RPi HAT specification i...
by Bosse_B
Fri May 01, 2020 4:23 pm
Forum: General discussion
Topic: Proprietary add-on board, how to detect its presence?
Replies: 5
Views: 251

Proprietary add-on board, how to detect its presence?

We have designed a proprietary PC board to plug into the 40-pin connector. The board contains the following subsystems: 1) An I2C bus where we have connected the following devices - An EEPROM for storage of config data - An AWS encryption chip - An RTC circuit with battery to keep accurate time in t...
by Bosse_B
Mon Apr 27, 2020 1:31 pm
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

Re: How to detect individual USB-RS232 device tty number?

A little extreme, but shows the problem... When designing a system that is supposed to be deployed by other people I prefer to be able to write instructions along the line: 1) Attach the USB cable from the switchbox to the upper left USB connector 2) Attach the USB serial interface from the instrume...
by Bosse_B
Mon Apr 27, 2020 12:09 pm
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

Re: How to detect individual USB-RS232 device tty number?

I do not see that Raspbian "out of the box" creates a device other than the ttyUSBx where x designates the order of detection of the USB device. The underlying devices are always called ttyUSB N , but those symlinks you showed are perfectly valid ways to open the device, and the symlinks automatica...
by Bosse_B
Mon Apr 27, 2020 10:06 am
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

Re: How to detect individual USB-RS232 device tty number?

lrwxrwxrwx 1 root root 13 Apr 27 07:07 usb-FTDI_US232R_FTFK085Y-if00-port0 -> ../../ttyUSB1 lrwxrwxrwx 1 root root 13 Apr 27 07:07 usb-FTDI_US232R_FTFK0869-if00-port0 -> ../../ttyUSB0 So if I can read this S/N in my code then I could presumably identify the adapter that belongs to a specific connec...
by Bosse_B
Mon Apr 27, 2020 10:00 am
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

Re: How to detect individual USB-RS232 device tty number?

Thanks again! I think the last suggestion, which I have now tested makes best sense at least for this project. I put this into the file /etc/udev/rules.d/99-usb-serial.rules: SUBSYSTEM=="tty",ENV{ID_PATH}=="platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1:1.0",SYMLINK+="ttyUSB001" SUBSYSTEM=="tty",...
by Bosse_B
Mon Apr 27, 2020 7:05 am
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

Re: How to detect individual USB-RS232 device tty number?

So if I can read this S/N in my code then I could presumably identify the adapter that belongs to a specific connection.... It would be really good to be able to open the port based on the serial number instead of the ttyUSBx name. The proper way to do this is to use udev rules and let Linux sort i...
by Bosse_B
Mon Apr 27, 2020 5:16 am
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

Re: How to detect individual USB-RS232 device tty number?

OK, first, lsusb -t does not do the trick: $ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Dri...
by Bosse_B
Sun Apr 26, 2020 9:46 pm
Forum: General discussion
Topic: How to detect individual USB-RS232 device tty number?
Replies: 16
Views: 715

How to detect individual USB-RS232 device tty number?

I am planning a conversion from Windows to Raspbian of a software control program. It uses two serial ports to handle external equipment and I was planning to use a pair of USB-RS232 converters. The two channels have completely different use and are connected to different boxes. Now when looking at ...
by Bosse_B
Sat Apr 18, 2020 4:09 pm
Forum: General discussion
Topic: How to configure VNC server to run without local login?
Replies: 7
Views: 372

Re: How to configure VNC server to run without local login?

I just wonder how to make the vnc server start and run properly if there is no local user logged in on the unit (a headless machine)? Maybe what I wrote in post #10 of this thread will help you Thanks for the link to the other discussion. It seems a lot like what I have done meanwhile using informa...
by Bosse_B
Sat Apr 18, 2020 3:59 pm
Forum: General discussion
Topic: How to configure VNC server to run without local login?
Replies: 7
Views: 372

Re: How to configure VNC server to run without local login?

I only have one monitor and it is connected to my Windows 10 PC. Then I also have a bunch of RPi units ranging from 2-3-4 and on these I can easily work from my PC using the VNC windows. It would be nice to be able to centralize handling of all of these. I run all of my RPis headless from first boo...
by Bosse_B
Sat Apr 18, 2020 1:31 pm
Forum: General discussion
Topic: How to configure VNC server to run without local login?
Replies: 7
Views: 372

Re: How to configure VNC server to run without local login?

I think the difference between raspbian and ubuntu is that by default when the raspbian desktop is started the user pi is automatically logged in Not really, when my RPi units start up they sit on the login screen forever since there is no keyboard or monitor attached (headless). But on the RPi uni...
by Bosse_B
Sat Apr 18, 2020 6:55 am
Forum: General discussion
Topic: How to configure VNC server to run without local login?
Replies: 7
Views: 372

How to configure VNC server to run without local login?

I just wonder how to make the vnc server start and run properly if there is no local user logged in on the unit (a headless machine)? On Raspbian it seems to work fine, but I have now tried to make the same work on a Ubuntu 18.04 installation and there it won't work unless I log in locally first. I ...
by Bosse_B
Thu Apr 16, 2020 5:25 pm
Forum: General discussion
Topic: Scripting woes, cannot parse inut values properly..
Replies: 28
Views: 957

Re: Scripting woes, cannot parse inut values properly..

The last argument to the getopts call is optional and if missing getopts reverts to use the full command line arguments as given by $@. But this seems not to work inside a function , ... Seems like if inside a function it is unable to get the input arguments from the command line! But reading these...
by Bosse_B
Thu Apr 16, 2020 5:20 pm
Forum: General discussion
Topic: Scripting woes, cannot parse inut values properly..
Replies: 28
Views: 957

Re: Scripting woes, cannot parse inut values properly..

My question is really when are quotes needed, accepted or forbidden? For example in connection with getopts it seems like putting quotes around is forbidden, but the code above works both ways. So sometimes needed and sometimes not or forbidden, what is the rule here? I'm not clear what you mean by...
by Bosse_B
Thu Apr 16, 2020 3:11 pm
Forum: General discussion
Topic: Scripting woes, cannot parse inut values properly..
Replies: 28
Views: 957

Re: Scripting woes, cannot parse inut values properly..

I have a general scripting question: Say that I have a variable appargs which is set by appargs=$@ So now it holds all of the command line options entered when the script started. When I want to test this (not using getopts) for example like this: if [ -z $appargs ] then echo "Missing options!" show...

Go to advanced search