Go to advanced search

by DougieLawson
Fri Apr 19, 2019 4:30 pm
Forum: Beginners
Topic: swapping boot media between models
Replies: 4
Views: 47

Re: swapping boot media between models

If apt update; apt upgrade didn't work then your SDCard must have NOOBS on it.

Forget it, it is possible to upgrade NOOBS but it's a lot of faff. Get a fresh new card, a copy of plain Raspbian (NOT NOOBS), a copy of etcher and build a fresh bootable card.
by DougieLawson
Fri Apr 19, 2019 3:04 pm
Forum: Troubleshooting
Topic: Samba client keeps asking for password and can't login.
Replies: 11
Views: 4765

Re: Samba client keeps asking for password and can't login.

hortimech wrote:
Fri Apr 19, 2019 12:24 pm
Why are you forcing everyone to be 'root' ? this is very insecure.
It's probably a NTFS filesystem mounted at /mnt with no override for uid=, & gid= on the mount command.

It is 100% insecure.
by DougieLawson
Fri Apr 19, 2019 2:57 pm
Forum: Troubleshooting
Topic: Why do I receive unreadable data via serial Port on Raspberry Pi?
Replies: 1
Views: 15

Re: Why do I receive unreadable data via serial Port on Raspberry Pi?

That's almost always going to be a baud rate problem. Check the program running in your ATMEGA8.
by DougieLawson
Fri Apr 19, 2019 2:53 pm
Forum: General discussion
Topic: Change new user privileges
Replies: 4
Views: 78

Re: Change new user privileges

That's asking for your userid's login password.
by DougieLawson
Fri Apr 19, 2019 9:28 am
Forum: Beginners
Topic: How to make the process run in background
Replies: 5
Views: 73

Re: How to make the process run in background

If the background process writes to stdout you could run it with nohup and the output goes to ./nohup.out.

If you want to run a process that starts at every boot write a SystemD service file (which can log to syslog or any file you'd like).
by DougieLawson
Fri Apr 19, 2019 9:24 am
Forum: General discussion
Topic: New Raspbian release 8th April 19
Replies: 17
Views: 644

Re: New Raspbian release 8th April 19

I'll have a chat with the webteam Monday, it's odd there is no underline. Should be there. Meanwhile, please keep things polite. If you have a problem with a post, report it, don't comment on, that just makes things worse. More odd is that the label for the link is Release notes: Link (which is so ...
by DougieLawson
Fri Apr 19, 2019 9:01 am
Forum: Troubleshooting
Topic: trouble with booting my raspberry pi 3
Replies: 2
Views: 49

Re: trouble with booting my raspberry pi 3

Why on earth did you run rpi-update? Don't ever run it again - it can break your system. MySQL has no dependencies on the kernel and bootcode versions. Rolling it back on a rescue system is non-trivial. Boot another SDCard in your RPi. Mount the broken card in a USB reader. Run this recipe. sudo -i ...
by DougieLawson
Fri Apr 19, 2019 8:59 am
Forum: Beginners
Topic: How to make the process run in background
Replies: 5
Views: 73

Re: How to make the process run in background

Either run
thang1
[CTRL]+[Z]
bg 1

Note: that job number (1 in my example) increments sequentially for each job you set into the background in this execution of the shell.

or
thang1 &
to set it running in the background when it starts.

Use
jobs
to see what's running in the background.
by DougieLawson
Fri Apr 19, 2019 8:55 am
Forum: Python
Topic: No SPI Clock
Replies: 3
Views: 53

Re: No SPI Clock

Try adding

Code: Select all

spi.max_speed_hz=500000
(with the clock speed you need).
by DougieLawson
Thu Apr 18, 2019 10:55 pm
Forum: General discussion
Topic: fsck on an image?
Replies: 1
Views: 55

Re: fsck on an image?

You can't fsck the raw device. You can only fsck the partitions on it.

So start by taking a look with sudo fdisk -l /dev/sdc then run sudo umount /dev/sdc1; sudo fsck -f -y /dev/sdc1 ... etc.
by DougieLawson
Thu Apr 18, 2019 6:20 pm
Forum: Python
Topic: crontab & overwriting results
Replies: 3
Views: 56

Re: crontab & overwriting results

The way I'd do it is to have a single script called from a SystemD service that starts at boot time. So you know there's only ever one instance running. SystemD can do startup, shutdown, status and auto restart on premature death. That removes so much overhead in getting the python runtime instantia...
by DougieLawson
Thu Apr 18, 2019 5:56 pm
Forum: Troubleshooting
Topic: Does cloning an SD clone the Pi's MAC address?
Replies: 17
Views: 353

Re: Does cloning an SD clone the Pi's MAC address?

You've got the source code for piclone, hack it to do the stuff you want like generating new SSH keys (which simply needs the files to be removed and they'll get created automagically at boot time), hostname (set to RaspberryPi unless you specify it), etc. If you get something that passes muster wit...
by DougieLawson
Thu Apr 18, 2019 5:48 pm
Forum: Advanced users
Topic: Send email on failure or restart of systemd service
Replies: 2
Views: 48

Re: Send email on failure or restart of systemd service

Easiest is to grab a copy of Nagios. That's been spamming my inbox for months.
by DougieLawson
Thu Apr 18, 2019 11:26 am
Forum: Python
Topic: crontab & overwriting results
Replies: 3
Views: 56

Re: crontab & overwriting results

Merge the scripts into one and you can properly serialise the updates to your database. Run the process for each sensor in a separate python thread.
by DougieLawson
Wed Apr 17, 2019 10:01 pm
Forum: Python
Topic: Connecting and recording data from a UGEEK Multiple Sensors Cobber v0.2
Replies: 6
Views: 98

Re: Connecting and recording data from a UGEEK Multiple Sensors Cobber v0.2

You can't get elevation without knowing your current local pressure value and an accurate value at mean sea level. If you know elevation and pressure you can calculate pressure at mean sea level. If you know pressure at mean sea level and elevation you can calculate the local pressure. #!/usr/bin/py...
by DougieLawson
Wed Apr 17, 2019 5:37 pm
Forum: Beginners
Topic: Problems with Headless operation
Replies: 18
Views: 354

Re: Problems with Headless operation

Ernst wrote:
Wed Apr 17, 2019 5:22 pm

The other problem I see is that you have misspelled key management, key_mgnt is wrong and must be key_mgmt.

The simpler solution with key_mgmt is to simply remove those lines - they aren't needed as wpa_supplicant can read the setting that's needed from the access point.
by DougieLawson
Wed Apr 17, 2019 4:22 pm
Forum: Troubleshooting
Topic: Unable to reconnect to WiFi/networks via headless Pi0
Replies: 7
Views: 85

Re: Unable to reconnect to WiFi/networks via headless Pi0

Get rid of those key_mgmt lines - you don't need them wpa_supplicant can work it out when it tries to connect.
by DougieLawson
Wed Apr 17, 2019 4:17 pm
Forum: Troubleshooting
Topic: Ras3 crashes after update
Replies: 38
Views: 2634

Re: Ras3 crashes after update

It didn't affect my download. It's running on my 3B+ (the one with the official screen and TV uHAT). I'll push it out to the others later (now that I'm over my Broadband failure at 05:15 this morning).
by DougieLawson
Wed Apr 17, 2019 2:46 pm
Forum: The MagPi
Topic: Source Code for "An Introduction to C & GUI Programming"
Replies: 3
Views: 104

Re: Source Code for "An Introduction to C & GUI Programming"

Andyroo wrote:
Wed Apr 17, 2019 11:29 am
Why not just copy and paste from the PDF?it may take a few mins where the code crosses pages buts that’s not too much of an issue.
That's unreliable and likely to introduce nasty hard to find bugs.

Having the code on github.com is a much better suggestion.
by DougieLawson
Wed Apr 17, 2019 1:55 pm
Forum: Troubleshooting
Topic: Ras3 crashes after update
Replies: 38
Views: 2634

Re: Ras3 crashes after update

Your https cert is a pile of stinking stuff. root@Tranquility:/tmp # wget https://repo.xecdesign.com/raspi-copies-and-fills_0.12_armhf.deb --2019-04-17 14:52:35-- https://repo.xecdesign.com/raspi-copies-and-fills_0.12_armhf.deb Resolving repo.xecdesign.com (repo.xecdesign.com)... 80.85.84.120 Connec...
by DougieLawson
Wed Apr 17, 2019 1:48 pm
Forum: Troubleshooting
Topic: Cannot access server on laptop
Replies: 1
Views: 41

Re: Cannot access server on laptop

Stop using TightVNC, switch to RealVNC which has better support for Raspberry Pis running Raspbian.
by DougieLawson
Tue Apr 16, 2019 8:34 pm
Forum: Python
Topic: Store gy-neo6mv2 gps module data into mysql
Replies: 5
Views: 117

Re: Store gy-neo6mv2 gps module data into mysql

There are some reports in the net around 2014 about "Experimental MySQL HTTP API", which allows to use a REST API with mysql. Do not know whether this is still in current release. I am curious to see your report on how to use it, security and performance. That's not available as source code. It's a...
by DougieLawson
Tue Apr 16, 2019 6:06 pm
Forum: Python
Topic: Store gy-neo6mv2 gps module data into mysql
Replies: 5
Views: 117

Re: Store gy-neo6mv2 gps module data into mysql

No. You said you want to connect to MySQL, so your comment is 100% illogical.

URLlib is for connecting to remote websites.

Don't even consider web scraping phpmyadmin. You would open a security hole that's larger than Dr Katie Bouman's black hole.
by DougieLawson
Tue Apr 16, 2019 7:31 am
Forum: HATs and other add-ons
Topic: TV Hat
Replies: 1
Views: 93

Re: TV Hat

The adaptor is a Belling-Lee female to MMCX male.

The small socket on the board is a female MMCX

Go to advanced search