Go to advanced search

by jojopi
Sun Dec 10, 2017 4:51 pm
Forum: Camera board
Topic: Raspistill annotation NOT like strftime
Replies: 8
Views: 321

Re: Raspistill annotation NOT like strftime

I don’t think setlocale() must be called, should be automatic. From "man setlocale": On startup of the main program, the portable "C" locale is selected as default. A program may be made portable to all locales by calling: setlocale(LC_ALL, ""); I seem to recall that the font used for annotations o...
by jojopi
Fri Dec 01, 2017 9:31 am
Forum: Python
Topic: Syntax Error with print statement after while loop
Replies: 7
Views: 276

Re: Syntax Error with print statement after while loop

#!/usr/local/bin/python Have you installed Python yourself, or are you following some very old example? Normally the path would be #!/usr/bin/python3 or #!/usr/bin/python2. from __future__ import print_function You have asked for print to be a function, so regardless whether you are running python3...
by jojopi
Thu Nov 30, 2017 7:10 pm
Forum: Troubleshooting
Topic: predictable interface names failing in Stretch
Replies: 31
Views: 2048

Re: predictable interface names failing in Stretch

This happens even with predictable names (i.e onboard = wlan1, usb = wlx... rather than onboard =wlan0, usb = wlx...). Interesting. I had wondered whether that was possible. In this case you may need to enable MAC address naming for the onboard interface as well. You can do that by deleting /etc/sy...
by jojopi
Thu Nov 30, 2017 8:11 am
Forum: Troubleshooting
Topic: Endless problems with Pi Zeros
Replies: 10
Views: 390

Re: Endless problems with Pi Zeros

Regarding the HDMI issues, have you tried config_hdmi_boost (see https://www.raspberrypi.org/documentation/configuration/config-txt/video.md)? Pi3 has full-size HDMI, while Zero has Mini-HDMI, so you must either be using a different cable or an additional adapter with the Zeros. A faulty or poor qua...
by jojopi
Thu Nov 30, 2017 6:47 am
Forum: Raspbian
Topic: (Solved) unable to install 'libX11-dev' on new Stretch install
Replies: 3
Views: 195

Re: unable to install 'libX11-dev' on new Stretch install

It is "libx11-dev". The library is libX11, but Debian policy is for package names to be generally lowercase. (Somewhere in my own notes I have mention of "install libX11-dev libXext-dev", so I suspect that uppercase did also work at some time in the past. I do not understand why that would have chan...
by jojopi
Wed Nov 29, 2017 12:45 pm
Forum: Beginners
Topic: How do give permission to chromium to access /tmp folder?
Replies: 9
Views: 356

Re: How do give permission to chromium to access /tmp folder?

Everything was working correctly. The whole point of /tmp is that anyone can write there, but users cannot delete each other's files. Other programs depend on this behaviour. Your solution is to create your own directory, say /var/local/ready-for-printing. Because only your applications will be usin...
by jojopi
Sat Nov 25, 2017 4:07 pm
Forum: Beginners
Topic: Uptime gives idle > 4 times running time
Replies: 2
Views: 120

Re: Uptime gives idle > 4 times running time

The idle value in /proc/uptime is not reliable. I think the problem is that the upstream kernel has never been updated to calculate it correctly, in the case of tickless scheduling. Most programs will use the "cpu " line from /proc/stat instead. This provides more detail, and it appears to be correc...
by jojopi
Thu Nov 23, 2017 2:04 am
Forum: Off topic discussion
Topic: [SOLVED] Question about some VERY old LED displays
Replies: 11
Views: 898

Re: Question about some VERY old LED displays

There is also a supposed maximum of a total of 50 (fifty) mA for all GPIOs but I don't recall seeing an authoritative answer of whether this is a chip limitation which still applies or was all that was available from the linear 3.3 volt regulator on earlier model RPis once the on-board stuff took w...
by jojopi
Sun Nov 19, 2017 10:23 am
Forum: Advanced users
Topic: Effective bit length of Python on RasPi
Replies: 3
Views: 269

Re: Effective bit length of Python on RasPi

For best possible calculation accuracy in pressure, 64 bit integer support is needed. That sentence appears in the introduction for some C code that requires a 64bit type. The code will not just be less accurate if the type is not available, it will be wrong. There is a separate implementation usin...
by jojopi
Thu Nov 02, 2017 3:34 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO max current
Replies: 34
Views: 62798

Re: GPIO max current

One thing I have always wondered: if some of the GPIOs are sourcing current and others are sinking, then does the 50mA limit apply to the sum of the absolute currents, or to the maximum of source and sink?
by jojopi
Mon Oct 30, 2017 4:46 am
Forum: Beginners
Topic: Disable pi annoying fetures
Replies: 18
Views: 915

Re: Disable pi annoying fetures

broe23 wrote:SCP stands for "Secured Connection Protocol".
[…]
Such as in this case, it is obvious what SCP stand for.
It is "secure copy" !
by jojopi
Fri Oct 27, 2017 5:08 am
Forum: General discussion
Topic: Raspbian with Read-only Root
Replies: 147
Views: 33110

Re: Raspbian with Read-only Root

The argument is that SD cards perform wear leveling over various areas of the storage space independently. Those areas being 4MB or whatever in size. If that is true then you can arrange your partitions to align with those area boundaries. No, 4MiB (or cat /sys/dev/block/179\:0/device/preferred_era...
by jojopi
Fri Oct 27, 2017 1:19 am
Forum: General discussion
Topic: Raspbian with Read-only Root
Replies: 147
Views: 33110

Re: Raspbian with Read-only Root

Nobody know's, if wear-leveling on SD-cards, you're typically using on a rasperry , is stopping at partition-borders? My assumption is: NO, it doesn't ... If the wear levelling did stay within partitions, you would be able to destroy a card prematurely by writing to a small partition such as /boot....
by jojopi
Fri Oct 27, 2017 12:57 am
Forum: Other projects
Topic: Isolating a Pi 3 for Security / Malware Research
Replies: 7
Views: 623

Re: Isolating a Pi 3 for Security / Malware Research

I’m starting a Cyber Security & Operations Degree. As such we will be playing with some nasty computer viruses and malware. Are you sure that you will be playing with active malware? Will any of it even work on a Linux armhf platform? Just swap the SD card between the Pi3 and a Pi2, say. Even if yo...
by jojopi
Sun Oct 08, 2017 11:06 am
Forum: Advanced users
Topic: Predicable names on stretch are confusing me
Replies: 29
Views: 2099

Re: Predicable names on stretch are confusing me

If you really want Pi3's wlan0 to be wlxb827ebxxxxxx, you must (delete and) create your own /etc/systemd/network/99-default.link and add the "mac" policy: [Link] NamePolicy=kernel database onboard slot path mac MACAddressPolicy=persistent The default version in / lib /systemd/network/99-default.link...
by jojopi
Mon Sep 25, 2017 1:02 pm
Forum: General discussion
Topic: dd vs cp for flashing sd cards on the Linux command line.
Replies: 23
Views: 1234

Re: dd vs cp for flashing sd cards on the Linux command line.

Larger buffers results in lesser seek time and faster transfer speeds. You are assuming that the read or write size used by the application has any influence on the device driver. In Linux the default behaviour is for everything to go through the buffer cache in between. The kernel can read ahead u...
by jojopi
Sun Sep 24, 2017 5:19 pm
Forum: General discussion
Topic: dd vs cp for flashing sd cards on the Linux command line.
Replies: 23
Views: 1234

Re: dd vs cp for flashing sd cards on the Linux command line.

Would you please explain this? In Linux you can open /dev/sdX, seek to an arbitrary byte, and read and write arbitrary bytes. Yes, the hardware is using blocks. You would not suggest that I use dd for all files, just because they are stored on drives that use blocks. It is no more efficient for the...
by jojopi
Sun Sep 24, 2017 3:25 pm
Forum: Troubleshooting
Topic: inconsistent boot results/renaming network interfaces
Replies: 5
Views: 287

Re: inconsistent boot results/renaming network interfaces

The /boot/cmdline.txt part is Pi-specific.

(On normal platforms you would use /etc/default/grub.)
by jojopi
Sun Sep 24, 2017 11:59 am
Forum: General discussion
Topic: dd vs cp for flashing sd cards on the Linux command line.
Replies: 23
Views: 1234

Re: dd vs cp for flashing sd cards on the Linux command line.

GNU cp is fine. You can also use "cat IMAGE >/dev/sdX", but that is awkward to sudo. There is nothing special about dd, unless you use its count, skip, or seek operands, etc. If you forget to specify bs, the performance is disastrous. The GNU version does have one redeeming feature, however. "killal...
by jojopi
Sat Sep 23, 2017 3:30 pm
Forum: Beginners
Topic: Combining C and Python and launch at boot
Replies: 1
Views: 154

Re: Combining C and Python and launch at boot

Looking at the return code when launching the python from C, I get 256. That means the command executed, but exited with status 1. It is consistent with an uncaught Python exception. I have no logs at all. Any errors from the Python interpreter will go to the standard error stream, rather than your...
by jojopi
Sat Sep 23, 2017 2:23 pm
Forum: Troubleshooting
Topic: NFS server goes catatonic?
Replies: 2
Views: 199

Re: NFS server goes catatonic?

Ping replies are sent by the kernel, so they do not usually stop working unless the system is completely dead. One possibility in your case is that everything is still running but you have lost USB connectivity to Ethernet, keyboard, and mouse. When the system is working, I would suggest that you sw...
by jojopi
Mon Sep 18, 2017 4:22 am
Forum: Beginners
Topic: Crontab not working at reboot (split on request of pcmanbob)
Replies: 3
Views: 228

Re: Crontab not working at reboot

There is always an inherent danger when altering any of roots files, including the crontab. You can't create a boot-loop as the Pi user (well you can, but you need to craft it), as root it is all too easy. Surely you are not suggesting that "sudo reboot" in pi's crontab is somehow safer than "reboo...
by jojopi
Sat Sep 16, 2017 2:11 pm
Forum: C/C++
Topic: First c program write in raspberry pi.
Replies: 55
Views: 37661

Re: First c program write in raspberry pi.

On an embedded system and on most windows compilers on the market an include of a ".h" automatically marks the matching ".c" file to compile if it is in the same directory. GCC is different I have to add even the current directory to the include list or specifically pass the library file as well. I...
by jojopi
Sat Sep 16, 2017 9:05 am
Forum: Networking and servers
Topic: ssh key pairing between two pi's still requires password after setup
Replies: 28
Views: 1533

Re: ssh key pairing between two pi's still requires password after setup

I was able to compare permissions between the accounts and I discovered that my home directory /home/sking was set to 775. Turns out ssh wants 755. Actually it is fine for ~ to be 0775, as long as its group has the user as its only member. Any of the methods for creating a user should also create a...
by jojopi
Wed Sep 13, 2017 3:40 pm
Forum: General discussion
Topic: Using --password with ssh
Replies: 4
Views: 328

Re: Using --password with ssh

You are using "StaSh", a shell-like program written in Python for the Pythonista environment for iOS. Unlike bash, stash does not execute external commands directly, because they would not normally exist on iOS. It has a set of Python programs for the commands it knows how to emulate. You can see th...

Go to advanced search