Go to advanced search

by jahboater
Tue Oct 16, 2018 4:54 pm
Forum: C/C++
Topic: I am missing some fundamental understanding of C?
Replies: 12
Views: 184

Re: I am missing some fundamental understanding of C?

Depending on the context... I would get compile errors when using -> member notation vs . notation. Via trial and error I have observed that when I reference a struct's member within the same scope the compiler wants . notation... if not in the same scope or passed as an address of a pointer like i...
by jahboater
Tue Oct 16, 2018 9:18 am
Forum: General discussion
Topic: USB Boot
Replies: 16
Views: 1232

Re: USB Boot

k-pi wrote:
Tue Oct 16, 2018 9:09 am
If you set the OTP bit on the RPi3B, you will be able to boot from USB or from a microSD card, it is the same on the RPi3B+
The OTP bit is set in the factory for the Pi3B+
by jahboater
Tue Oct 16, 2018 9:01 am
Forum: General discussion
Topic: Raspberry Pi 3 B+ overheating
Replies: 3
Views: 162

Re: Raspberry Pi 3 B+ overheating

My raspberry pi 3b+ is overheating a lot and cpu speeds are randomly jumping to 99-100 at any random moment can anyone help? :D What do you mean "speeds are randomly jumping to 99-100" - do you mean 100% utilisation? To show the temperature, use: [email protected]:~ $ vcgencmd measure_temp temp=40.8'C Too hig...
by jahboater
Mon Oct 15, 2018 2:52 pm
Forum: Advanced users
Topic: PI management software via SSH
Replies: 7
Views: 151

Re: PI management software via SSH

You can also put commands on the ssh command line (no need for managing lots of keys and other files) [[email protected] ~]$ ssh [email protected] cat /proc/cpuinfo [email protected]'s password: processor : 0 model name : ARMv6-compatible processor rev 7 (v6l) Make sure to setup public/private key authentic...
by jahboater
Mon Oct 15, 2018 7:38 am
Forum: Beginners
Topic: got a pi - cant login
Replies: 4
Views: 100

Re: got a pi - cant login

I tried to change the pass word by editing the cmdline.txt, but i doesnt seem to have any effect on it, That will not work. You change the password with the "passwd" command. "su" is not a username. I agree with the previous post, install a fresh copy of Raspbian on the SD card. Download it from he...
by jahboater
Mon Oct 15, 2018 7:18 am
Forum: General discussion
Topic: Give my RPi 3 a life please
Replies: 18
Views: 618

Re: Give my RPi 3 a life please

In my opinion, the use of a Raspberry Pi3b as nothing but an alarm, is both overkill and a waste of electricity. Do more with it You can always ssh or VNC into it and do other work. I used the ZeroSeg display for a Pi Clock (but it does look better on a Pi Zero). https://thepihut.com/products/zeros...
by jahboater
Sat Oct 13, 2018 12:31 am
Forum: Troubleshooting
Topic: Worst web surfing experience with Strecht
Replies: 20
Views: 484

Re: Worst web surfing experience with Strecht

Is there a faster way to "reset" the swap memory rather than the "swapoff -a --> swapon -a" command?? sudo sed -i 's/^CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=1024/' /etc/dphys-swapfile sudo /etc/init.d/dphys-swapfile stop sudo /etc/init.d/dphys-swapfile start Change the 1024 to the new swapfile size.
by jahboater
Fri Oct 12, 2018 5:34 pm
Forum: General discussion
Topic: New version of Raspbian
Replies: 15
Views: 880

Re: New version of Raspbian

by jahboater
Fri Oct 12, 2018 1:07 pm
Forum: General discussion
Topic: A2 app performance class SD cards
Replies: 7
Views: 222

A2 app performance class SD cards

I see these are now readily available:- https://www.amazon.co.uk/SanDisk-Extreme-microSDXC-Adapter-Performance/dp/B07FCMBLV6/ref=sr_1_2?ie=UTF8&qid=1539349255&sr=8-2&keywords=a2%2Bapp%2Bperformance&th=1 A1 cards were 1500 IOPS random read and 500 IOPS random write A2 cards are 4000 IOPS random read ...
by jahboater
Thu Oct 11, 2018 6:42 am
Forum: C/C++
Topic: Valgrind
Replies: 21
Views: 484

Re: Valgrind

The code is quite complicated - it’s a scheduler for controlling industrial lighting, and it communicates via RS-485 and cellular modems. Maybe 20,000 lines of C. Anyway, I’ll spend some time trying to figure out what is slowing down valgrind so much when I get a chance. Have you looked at "gprof" ...
by jahboater
Mon Oct 08, 2018 6:09 pm
Forum: General discussion
Topic: Why sell a 7" screen?
Replies: 69
Views: 1631

Re: Why sell a 7" screen?

gkaiseril wrote:
Mon Oct 08, 2018 4:56 pm
Do not make the assumption that all Pis are used as general purpose desktop computer. It can be used for many applications besides the desktop.
The 7" screen makes a nice electronic photo frame.
Somewhat bizarrely you can log in and work on its Pi at the same time!
by jahboater
Mon Oct 08, 2018 10:49 am
Forum: Beginners
Topic: Decreasing Boot Time: Removing vs. Adding
Replies: 2
Views: 105

Re: Decreasing Boot Time: Removing vs. Adding

No full blown desktop GUI needed, but more than a headless install needed. Why not start with "Raspbian Lite" ? https://www.raspberrypi.org/downloads/raspbian/ I use it headless and it works very well. [email protected]:~ $ systemd-analyze Startup finished in 1.325s (kernel) + 4.991s (userspace) = 6.316s That...
by jahboater
Mon Oct 08, 2018 7:17 am
Forum: Troubleshooting
Topic: Reply from pi: Destination host unreachable
Replies: 5
Views: 119

Re: Reply from pi: Destination host unreachable

Perhaps expand your search with

192.168.0.0/24

I use nmap which easily finds Pi's (if you can get it for the laptop).

sudo nmap -sn 192.168.0.0/24

gives

Nmap scan report for pi (192.168.0.80)
Host is up (0.100s latency).
MAC Address: B8:27:EB:95:F7:84 (Raspberry Pi Foundation)
by jahboater
Sun Oct 07, 2018 4:11 pm
Forum: Beginners
Topic: How can I backup a Raspberry PI sd card?
Replies: 14
Views: 325

Re: How can I backup a Raspberry PI sd card?

Insert an SDCard in a USB reader (I'll assume it appears as /dev/sda, check with dmesg) sudo dd if=/dev/mmcblk0 of=/dev/sda bs=100M & Wait twenty minutes (for each 8GB in size) Dougie, Does the 100M block size help much? The "cp" command uses 128K. /dev/mmcblk0 and /dev/sda are two separate devices...
by jahboater
Sun Oct 07, 2018 9:24 am
Forum: Troubleshooting
Topic: Can't install Chrome OS (FlintOS) on my Pi, Etcher won't create image, just wipes my SD card???
Replies: 7
Views: 204

Re: Can't install Chrome OS (FlintOS) on my Pi, Etcher won't create image, just wipes my SD card???

+1

Don't format the SD card first when using etcher to install an image (it is pointless as the formatting is immediately lost).
Etcher will unzip the image as well.
by jahboater
Sun Oct 07, 2018 1:45 am
Forum: Beginners
Topic: OS names / current / latest vesrion ?
Replies: 7
Views: 226

Re: OS names / current / latest vesrion ?

So this really does not tell me Raspian / Debian "version" , just Linux "core" . As Dougie said, its in /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_...
by jahboater
Sat Oct 06, 2018 11:10 am
Forum: Beginners
Topic: exFat vs FAT32
Replies: 4
Views: 135

Re: exFat vs FAT32

+1 100%

ext4

Does Linux even run off a FAT file system?
When a FAT formatted USB drive is mounted, the user info is simulated.

Further, ext4 is a modern high performance filesystem with extents and a journal.
by jahboater
Sat Oct 06, 2018 1:59 am
Forum: C/C++
Topic: Valgrind
Replies: 21
Views: 484

Re: Valgrind

rzusman wrote:
Fri Oct 05, 2018 9:43 pm
It's still really slow, but I can figure out how to deal with that.
What kind of Pi are you using?
I run valgrind on the new 3B+ and it is usable.
by jahboater
Fri Oct 05, 2018 6:59 pm
Forum: C/C++
Topic: Valgrind
Replies: 21
Views: 484

Re: Valgrind

Heater,
I saw this in the -Wuninitialized warning description.
Because these warnings depend on optimization, the exact variables or elements for which there
are warnings depends on the precise optimization options and version of GCC used.
Just use -O3 !!!
by jahboater
Fri Oct 05, 2018 6:55 pm
Forum: C/C++
Topic: Valgrind
Replies: 21
Views: 484

Re: Valgrind

That is to say that in general it is impossible for static analysis to determine if a variable is initialized before use or not. It is very hard indeed to prove it in complex deeply nested situations. int n; int m = n + 4; is pretty simple though. For this reason it is better to use Valgrind or the...
by jahboater
Fri Oct 05, 2018 6:45 pm
Forum: C/C++
Topic: Valgrind
Replies: 21
Views: 484

Re: Valgrind

-Wmaybe-uninitialized For an automatic (i.e. local) variable, if there exists a path from the function entry to a use of the variable that is initialized, but there exist some other paths for which the variable is not initialized, the compiler emits a warning if it cannot prove the uninitialized pa...
by jahboater
Fri Oct 05, 2018 6:35 pm
Forum: General programming discussion
Topic: Python, Java or both?
Replies: 23
Views: 1533

Re: Python, Java or both?

But it's not clear to me how one can know what language one wants to learn before one has learned it? Perhaps try jobsearch or something similar: 1,883 C++ jobs 11,969 C jobs 3,143 Python jobs 6,595 Javascript jobs 17 Cobol jobs 3,901 Java jobs Bit surprised at the C++ result. But ECMAScript and C ...
by jahboater
Fri Oct 05, 2018 6:12 pm
Forum: C/C++
Topic: Valgrind
Replies: 21
Views: 484

Re: Valgrind

jahboater, The gcc man page just says this: "These warnings are only possible in optimizing compilation, because otherwise GCC does not keep track of the state of variables." Where is there a GCC man page that says that? I cannot find one. Neither can google. Have you tried just typing "man gcc" on...
by jahboater
Fri Oct 05, 2018 5:34 pm
Forum: General programming discussion
Topic: Python, Java or both?
Replies: 23
Views: 1533

Re: Python, Java or both?

The ONLY language where you cannot remember what the code does by the time you’ve pressed the space bar for the next bit :D Look up APL :) https://www.whoishostingthis.com/resources/apl/ https://en.wikipedia.org/wiki/APL_(programming_language) Extract from the first link:- Some programming language...
by jahboater
Fri Oct 05, 2018 3:55 pm
Forum: General programming discussion
Topic: Python, Java or both?
Replies: 23
Views: 1533

Re: Python, Java or both?

The obvious answer is "pick a language you know". The less obvious answer is "pick a language you want to learn" (which is why all the code I've written recently has been in C++). Good answer. I would consider a language that is well supported on the platform. That is, comes pre-installed and ready...

Go to advanced search