Go to advanced search

by DougieLawson
Thu Jul 19, 2018 5:47 pm
Forum: Advanced users
Topic: New SSD
Replies: 2
Views: 23

Re: New SSD

You may want to boot a GParted Live CD on your laptop, plug in the USB drive and shrink the partitions down to the nearest MB over their used space. That will make the copy run quicker as you won't be reading/writing lots of X'00's. You could do that with a Raspberry booted from an SDCard with GPart...
by DougieLawson
Thu Jul 19, 2018 5:25 pm
Forum: General discussion
Topic: A new level of seasickness
Replies: 6
Views: 121

Re: A new level of seasickness

That stuff doesn't make the website any prettier or any easier to use, it just increases the load time for no apparent benefit (and is therefore 100% pointless). If I can adblock the Javascript I'll do that, else I'll have to look at coding a Greasemonkey/Tampermonkey script to knacker it.
by DougieLawson
Thu Jul 19, 2018 5:14 pm
Forum: Beginners
Topic: I can not start motion as daemon
Replies: 2
Views: 45

Re: I can not start motion as daemon

Since it's still using the old sysvinit stuff you need to run
sudo update-rc.d motion defaults
sudo update-rc.d motion enable

that should get it running a boot time.
by DougieLawson
Thu Jul 19, 2018 5:09 pm
Forum: Beginners
Topic: Installation of Mysql connector on Pi
Replies: 9
Views: 157

Re: Installation of Mysql connector on Pi

Try
sudo apt purge python{,3}-mysql*
sudo pip install mysql-connector-python
sudo pip3 install mysql-connector-python
# if using python3.

The old junk in DebIan Stretch doesn't support the new authentication scheme.
by DougieLawson
Thu Jul 19, 2018 5:05 pm
Forum: Other programming languages
Topic: PHP5 mysqli.so
Replies: 5
Views: 165

Re: PHP5 mysqli.so

Dougie Lawson we need to tell the Squirrelmail developers to pull their fingers out and switch from PHP5 to PHP7. No I don't, because I'm not even the slightest bit interested in running it. If you want that you've got to ask for it. Or re-write their code and give it back to them with a pull reque...
by DougieLawson
Thu Jul 19, 2018 3:57 pm
Forum: Troubleshooting
Topic: RS Raspberry PI 3B+ GPIO pins possibly defective
Replies: 4
Views: 105

Re: RS Raspberry PI 3B+ GPIO pins possibly defective

Simple precaution. Don't allow 6V (from 4*AA) anywhere near the GPIO (which are only 3.3V tolerant). Use an LM239D to control your motor. https://tutorials-raspberrypi.com/how-to-control-a-stepper-motor-with-raspberry-pi-and-l293d-uln2003a/ https://learn.adafruit.com/adafruit-raspberry-pi-lesson-9-c...
by DougieLawson
Thu Jul 19, 2018 3:53 pm
Forum: Beginners
Topic: Raspberry Pi not connecting with Brick Pi
Replies: 3
Views: 73

Re: Raspberry Pi not connecting with Brick Pi

Since all the code is available at: https://github.com/DexterInd/BrickPi you may be able to hack that and get it working on Stretch. Then send your changes back as a pull request. One thing that sticks out is the serial devices changed. So this line in BrickPi.py may need a tweak ser.port='/dev/ttyA...
by DougieLawson
Thu Jul 19, 2018 3:34 pm
Forum: Troubleshooting
Topic: MAX6675 GPIO input python issue
Replies: 4
Views: 94

Re: MAX6675 GPIO input python issue

Try this sample program #!/usr/bin/python # -*- coding: utf-8 -*- import spidev from time import sleep m6675 = spidev.SpiDev(0,1) m6675.max_speed_hz=1000000 def c_to_f(temp): f = ((temp/5)*9)+32 return f def readTempC(): m6675.writebytes([0x00,0x00]) tempRead = m6675.readbytes(2) temp = (tempRead[0]...
by DougieLawson
Thu Jul 19, 2018 2:59 pm
Forum: General discussion
Topic: A new level of seasickness
Replies: 6
Views: 121

A new level of seasickness

What's with all the wibbly wobbly things on https://raspberrypi.org? Can I have a big red switch to turn off that new CSS crap? I don't like wibbly wobbly web pages they make me feel seasick.
by DougieLawson
Thu Jul 19, 2018 2:51 pm
Forum: Beginners
Topic: Installation of Mysql connector on Pi
Replies: 9
Views: 157

Re: Installation of Mysql connector on Pi

Stop using MySQLdb switch to mysql.connector. sudo apt install python{,3}-mysql.connector https://dev.mysql.com/doc/connector-python/en/connector-python-examples.html It works much the same as MySQLdb. import mysql.connector db = mysql.connector.connect(user='vajra', password='vajra11', host='192.16...
by DougieLawson
Thu Jul 19, 2018 8:22 am
Forum: Other programming languages
Topic: PHP5 mysqli.so
Replies: 5
Views: 165

Re: PHP5 mysqli.so

On Stretch php5 is removed. You need to replace all the php pieces with php7.0 equivalents.
by DougieLawson
Thu Jul 19, 2018 7:43 am
Forum: Raspbian
Topic: systemd service won't run at startup
Replies: 4
Views: 87

Re: systemd service won't run at startup

It's the systemd way of doing plumbing. You're sending the standard output (stdout) from the raspivid process through the socket process into the standard input (stdin) of the netcat process. It's ugly but you can stop and restart the three processes without breaking things.
by DougieLawson
Wed Jul 18, 2018 11:32 pm
Forum: Raspbian
Topic: apt-get dist-upgrade vs flash with new version of OS
Replies: 6
Views: 139

Re: apt-get dist-upgrade vs flash with new version of OS

New Raspbian versions arrive about every two years. There's usually a direct upgrade path (by editing files in /etc/apt to change from Wheezy to Jessie, Jessie to Stretch (and next time from Stretch to Buster)). In between times there's regular modification levels of the existing Raspbian version, t...
by DougieLawson
Wed Jul 18, 2018 11:21 pm
Forum: General programming discussion
Topic: What Does Hiding the Details of I/O in Library Calls Teach?
Replies: 51
Views: 965

Re: What Does Hiding the Details of I/O in Library Calls Teach?

What I see is loads of software "engineers" (if you can call programming by trial and error engineering), but nobody who knows how to make anything. I would say that's a problem. It depends how you define "software engineer" and how many years of experience are needed to go with that definition. I ...
by DougieLawson
Wed Jul 18, 2018 9:00 pm
Forum: General programming discussion
Topic: What Does Hiding the Details of I/O in Library Calls Teach?
Replies: 51
Views: 965

Re: What Does Hiding the Details of I/O in Library Calls Teach?

Of course the second one chooses Python to tackle a problem one has given up all hope of small size and performance. You can say that again. I rewrote a python program (it reads a BMP180 using the /sys interface and writes SQLite3 every three minutes) in C++ and the working set of the program goes ...
by DougieLawson
Wed Jul 18, 2018 8:36 pm
Forum: Raspbian
Topic: Compiler Error
Replies: 2
Views: 45

Re: Compiler Error

It builds OK for me on plain Raspbian with G++ V6.3.0 and wiringPi 2.44

cd /tmp
wget https://github.com/HakonHystad/MFRC522_nested_attack/archive/master.zip
7z x master.zip
cd MFC*
mkdir build
make
by DougieLawson
Wed Jul 18, 2018 4:58 pm
Forum: General programming discussion
Topic: What Does Hiding the Details of I/O in Library Calls Teach?
Replies: 51
Views: 965

Re: What Does Hiding the Details of I/O in Library Calls Teach?

Of course the second one chooses Python to tackle a problem one has given up all hope of small size and performance. You can say that again. I rewrote a python program (it reads a BMP180 using the /sys interface and writes SQLite3 every three minutes) in C++ and the working set of the program goes ...
by DougieLawson
Wed Jul 18, 2018 4:18 pm
Forum: Troubleshooting
Topic: PPP Serial communication between two Pi's
Replies: 7
Views: 180

Re: PPP Serial communication between two Pi's

You'll need to create a route between the eth0 and ppp0. What you're doing is much like making the Raspberry into a Wireless AP as documented at: https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md You should be able to crib some of that stuff (change wlan0 for ppp0 on t...
by DougieLawson
Wed Jul 18, 2018 1:54 pm
Forum: Beginners
Topic: open CMD on startup with and eun a command?
Replies: 10
Views: 155

Re: open CMD on startup with and eun a command?

How do you know it's not running?

Add this: > /var/log/jar.log 2> /var/log/jar.error (stuff in blue) between the end of your command and the &

When you've rebooted and you think it's failed take a look at those two logfiles you've just written.
by DougieLawson
Wed Jul 18, 2018 1:25 pm
Forum: Bare metal, Assembly language
Topic: Understanding the mailbox property interface
Replies: 6
Views: 162

Re: Understanding the mailbox property interface

I've started writing a more comprehensive mailbox document, the work in [progress is here https://github.com/raspberrypi/documentation/tree/JamesH65-mailbox_docs/configuration/mailboxes Does that help? In your article can you include a simple sample C program that anyone can cut'n'paste and get run...
by DougieLawson
Wed Jul 18, 2018 1:05 pm
Forum: General discussion
Topic: RTC sync with NTP
Replies: 13
Views: 233

Re: RTC sync with NTP

run sudo systemctl daemon-reload
by DougieLawson
Wed Jul 18, 2018 12:35 pm
Forum: Troubleshooting
Topic: hostapd problems after upgrade to 4.14.50
Replies: 53
Views: 1132

Re: hostapd problems after upgrade to 4.14.50

For many years interacting with some of the largest software (and hardware) suppliers in an enterprise environment the "normal" reaction on a problem report would be: "please install the latest version" before closing the case. Something similar occurred in this thread, so I upgraded to 4.14.52 and...
by DougieLawson
Wed Jul 18, 2018 12:25 pm
Forum: General discussion
Topic: RTC sync with NTP
Replies: 13
Views: 233

Re: RTC sync with NTP

On the two machines with RTCs I've done those udev changes. NTP got replaced with timedatectl in Rasbian Stretch. NTP continually updates the clock. Timedatectl periodically updates it (although I can't find out how often - Google won't tell me). On my network I put NTP back in. One machine syncs to...
by DougieLawson
Wed Jul 18, 2018 12:14 pm
Forum: General discussion
Topic: "Low depth" power supply
Replies: 15
Views: 414

Re: "Low depth" power supply

It depends what you define as an "appliance". For example, connecting an electric hob or fan oven to a 30A supply is somthing that's best left for a competent person. That's true here in the UK if what you're doing is covered by part P. https://www.gov.uk/government/publications/electrical-safety-ap...
by DougieLawson
Wed Jul 18, 2018 12:02 pm
Forum: General discussion
Topic: RTC sync with NTP
Replies: 13
Views: 233

Re: RTC sync with NTP

If you have a real RTC you don't need fake-hwclock. So run that stuff once.

Go to advanced search