russell_barnes
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 11
Joined: Mon Feb 17, 2014 11:10 am

STICKY: Errata

Wed May 06, 2015 10:57 am

Have you spotted a mistake in a recent issue of The MagPi? Let us know here!

tirab
Posts: 3
Joined: Mon May 11, 2015 4:51 pm

Re: Errata

Mon May 11, 2015 4:58 pm

Hi guys.

Firstly, thanks for the great mag.
Secondly on page 33 of issue 33 Richard Smedly
goes into detail about octal numbering relating to
file permissions without first stating what he is referring too.

Had to look up external references to see what was going on.
Apparently its got to do with changing ownership using those octal
numbers. This is done by using chmod XXX filename where XXX refer
to the octal numbers spoken about in the article.

Thanks

whaleygeek
Posts: 3
Joined: Fri Jan 23, 2015 9:37 pm

Re: Errata

Thu May 21, 2015 7:27 am

Good point, we should link to relevant manual pages or information for technical information like this.

chmod uses octal (base 8) for encoding 'user', 'group' and 'other' permissions. Each of these has 3 bits, or pieces of information (is it readable, is it writeable, is it executable).

You can use chmod to modify permissions like this:

chmod u+x grants execute permissions to user
chmod u-x revokes execute permissions from user
chmod +x grants execute permissions to user, group, and other

or you can use it to modify permissions in one go like this:

chmod 555 gives read and execute, but no write, to user, group, and other.

5(octal) in binary is 101, so that's r-x ..... read, not write, execute

Because there are 3 bits (binary digits) of flags for user, group and other, and there are 8 combinations of those, this usefully encodes into a base 8 (octal) number.

There is a good calculator here:

http://permissions-calculator.org

There is a good description of the permissions flags and their octal equivalents on the chmod wiki page here:

http://en.wikipedia.org/wiki/Chmod

You can lookup the unix man page for chmod here:

http://unixhelp.ed.ac.uk/CGI/man-cgi?chmod

Or on your raspberry pi, type this at a command prompt to read the resident linux man page on it:

man chmod

If you use ls -l you will see the file permission bits listed in the long directory listing, so when you see the following:

r-xr-x---

Split these into 3 groups (user, group, other)

r-x r-x ---

Now imagine them as binary with the following base-8(octal) headings

421 421 421
101 101 000

Now convert those to octal (base-8) using the base-8 headings as listed above

5 5 0

So chmod 550 will set permissions user(r-x) group(r-x) other()


David
@whaleygeek
Technical editor, The Magpi.

User avatar
rpdom
Posts: 12804
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Errata

Thu May 21, 2015 7:47 am

Although I am very familiar with binary, octal and pretty much any other number base used in computing, I just use this basic method for working out permissions (ok, it is pretty much what you said, but worded differently).

As you said, there are three groups of permissions. Each group can contain "r" for Read access, "w" for Write access and "x" for execute file or list directory contents access.

I just remember that r=4, w=2 and x=1 (yes, that's binary, but you don't need to know that to start with).

Add together the numbers that you want for each group.
rw- = 4 + 2 = 6.
r-x = 4 + 1 = 5.
r-- = 4 = 4
rwx = 4 + 2 + 1 = 7

Put them in the chmod command.

rwxrw-r-x is "rwx" 4+2+1 and "r-x" 4+2 and "r-x" 4+1 which makes 765

chmod 765 somefile
(See, I didn't even mention Octal ;) )

pauldow
Posts: 47
Joined: Fri Aug 05, 2011 12:17 pm
Contact: Website

Re: Errata

Sat Oct 31, 2015 1:58 pm

Hello,

I have a problem seeing the text in some of the callout boxes on the .pdf version of issue 39.
The boxes pointing to items in the illustrations on pages 32,34,37, 39, and 58 are black. It looks like the the text might be behind the black boxes.
The text boxes on page 36 look correct.

I'm using Windows 8.1 and the built-in reader program from Microsoft. (Hopefully I won't be banished for that.)

Thanks.

User avatar
DougieLawson
Posts: 33785
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Errata

Sat Oct 31, 2015 2:37 pm

Try opening it with Adobe Acrobat Reader. It works OK on my Win10 system running the latest version of that.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

pauldow
Posts: 47
Joined: Fri Aug 05, 2011 12:17 pm
Contact: Website

Re: Errata

Sun Nov 01, 2015 2:18 am

Thank you. You're right. It does look correct using Adobe's reader.
I was trying to minimize the programs I had installed on this computer since I never seem to uninstall anything until I'm out of disk space, but I guess I'll need to keep Acrobat Reader.

richcb
Posts: 17
Joined: Tue Mar 08, 2016 11:19 pm

Re: Errata

Mon Mar 14, 2016 3:49 pm

The Magpi #43, March 2016, page 12, Whetstone section text, line 2: 'Whestone benchmark'? Need the services of a good sub-editor? ;)

scotty101
Posts: 3085
Joined: Fri Jun 08, 2012 6:03 pm

Re: Errata

Thu Apr 28, 2016 7:55 pm

MagPi Issue #45
Page 46
Diagram in the top left shows a black wire connected to ground on the Pi connected to the breadboard power rail. The other black wire that connects to the power rail on the right is not connected to the same ground rail.
Circuit won't work.
Last edited by scotty101 on Fri Apr 29, 2016 8:44 am, edited 1 time in total.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

B.Goode
Posts: 6429
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Errata

Thu Apr 28, 2016 8:06 pm

Please also see this post related to Issue 45: viewtopic.php?f=106&t=146248#p963232

Milliways
Posts: 310
Joined: Fri Apr 25, 2014 12:18 am

Blatant Error

Fri Apr 29, 2016 11:53 am

Does the MagPi have editors? If so do they test the copy?

The default /etc/network/interfaces contains the following:-

Code: Select all

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
dhcpcd has been default since May 2015!!!

I stopped reading before I got to the end of the 1st page of Un"Predictable Networking".

I seem to spend half my time telling people NOT to do this - I expect better of the Foundation.

PS It is about time the Foundation edited some of its Tutorials. Raspbian has been using systemd for 9 months but is still telling people how to setup using SysV.

User avatar
jbeale
Posts: 3360
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Errata (MagPi #45 on p.24)

Fri Apr 29, 2016 10:06 pm

MagPi45, p.24:
“…type in the following: raspistill -o firstpic.jpg
You’ll see a red light on the Camera Module, followed by the image of whatever the camera is pointing at…”

Correct me if I’m wrong, but I thought the new RPi v2 camera module has no red light?

nickweb
Posts: 10
Joined: Tue Jan 22, 2013 11:14 pm
Location: Glasgow, Scotland
Contact: Website

Re: Errata

Mon May 30, 2016 3:06 pm

Issue 46, Page 31 circuit diagram - Echo (?) pin showing as black bar.

Issue 46, Page 60 - you'll need "1x MCP602". The diagram in the next page shows 2 used, but page 63 shows only one used. :/

Issue 46, Page 61 circuit diagram - all chips appear the same. Is the main one meant to be a MCP3002?
Thanks,

Nick

http://www.nick-web.co.uk/ee

tadder
Posts: 7
Joined: Sat Jan 03, 2015 4:06 pm

Re: Errata

Sun Jun 12, 2016 5:43 pm

Issue 46 Page 32 Internet Radio, schematic I believe should show MCP3008 pins VDD and V_REF connected together. Without this mod the output from CH0 does not vary. Also the maximum output appears to be around 0.48, so I have changed the test on line 16 of the program to >= 0.4, and on line 19 to <0.4.

Unfortunately the Radio OP does not start until the program is closed, so will continue to work on it, but hope these two tips are helpful.

madtom1999
Posts: 51
Joined: Mon Jul 29, 2013 4:37 pm

Re: Errata

Thu Jul 21, 2016 2:36 pm

Not really a recent issue but in #1 there is a link to http://www.raspberrypi.org/forum/educat ... on-lessons which no longer works.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2810
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Errata

Fri Jul 29, 2016 7:11 am

In the dropbox uploader article this month (MagPi 48, page 54) it appears that

Code: Select all

git clone
has been omitted from the command to grab the dropbox_uploader repo.

It says...

Code: Select all

github.com/andreafabrizi/Dropbox-Uploader.git
I think it should say...

Code: Select all

git clone github.com/andreafabrizi/Dropbox-Uploader.git
Alex Eames RasPi.TV, RasP.iO

Johnd2117
Posts: 17
Joined: Fri May 13, 2016 9:23 pm
Location: Rotorua, New Zealand

Re: Errata

Mon Oct 03, 2016 9:13 pm

I have just followed the USB setup procedure that was published in the Magpi issue 50. I am quite sure that I followed all of the instructions, however, wen I remove the SD card and start up nothing happens. If I start up with the SD card inserted the Pi works properly but keeps polling the USB hard drive. Has any body got an idea what might have gone wrong? I suppose it's quit obvious that I'm a newbie at this and Linux is a mystery to me.

Kind regards John

User avatar
DougieLawson
Posts: 33785
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Errata

Mon Oct 03, 2016 9:16 pm

Johnd2117 wrote:I have just followed the USB setup procedure that was published in the Magpi issue 50. I am quite sure that I followed all of the instructions, however, wen I remove the SD card and start up nothing happens. If I start up with the SD card inserted the Pi works properly but keeps polling the USB hard drive. Has any body got an idea what might have gone wrong? I suppose it's quit obvious that I'm a newbie at this and Linux is a mystery to me.

Kind regards John
What model of RPi do you have? If it's a RPi3 then there are simple and clear instructions for getting it booting from a USB drive here: https://www.raspberrypi.org/documentati ... des/msd.md
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 291
Joined: Fri Dec 26, 2014 11:02 am

Re: Errata

Mon Oct 17, 2016 4:58 pm

A few errors crept into the code examples in my "Learn To Code In C" book (one of which is also in the chapter of it featured in Magpi issue 50). Details are as follows:

On page 28 of the book, and in the last example on page 53 of MagPi issue 50, the code block contains the line

Code: Select all

int a = 5;
This should be

Code: Select all

int a = 0;
On page 61 of the book, the use of the * as an argument to the program is mangled by the shell on Unix. (It does, however, work correctly on Windows.) To fix this for Unix, replace the line

Code: Select all

    if (*argv[2] == '*') printf ("%d\n", arg1 * arg2);
with

Code: Select all

    if (*argv[2] == 'x') printf ("%d\n", arg1 * arg2);
and use 'x' rather than '*' for multiplication.

On page 64 of the book, the code block contains the line

Code: Select all

for (value = 30; value < 40; value++)
This should be

Code: Select all

for (value = 48; value < 58; value++)
In the paragraph following this code block, the description "writing the bytes 30, 31...39" should be "writing the bytes 48, 49...57".

On page 66 of the book, the code block contains the line

Code: Select all

int value;
This declares a variable which is not used in this example - this line should be omitted.

Apologies to anyone inconvenienced by these - I did think I had run all the code examples in the book before it was published, but I seem to have missed these. I've double-checked all the rest of the code examples today, and I think all the rest are ok.
Last edited by spl23 on Tue Nov 29, 2016 5:32 pm, edited 1 time in total.

Johnd2117
Posts: 17
Joined: Fri May 13, 2016 9:23 pm
Location: Rotorua, New Zealand

Re: Errata

Wed Oct 19, 2016 1:20 am

DougieLawson wrote:
Johnd2117 wrote:I have just followed the USB setup procedure that was published in the Magpi issue 50. I am quite sure that I followed all of the instructions, however, wen I remove the SD card and start up nothing happens. If I start up with the SD card inserted the Pi works properly but keeps polling the USB hard drive. Has any body got an idea what might have gone wrong? I suppose it's quit obvious that I'm a newbie at this and Linux is a mystery to me.

Kind regards John
What model of RPi do you have? If it's a RPi3 then there are simple and clear instructions for getting it booting from a USB drive here: https://www.raspberrypi.org/documentati ... des/msd.md
I am using a RPi3 and I have referred to the article you mention.

I have tied installing a WD 500Gb Hard Drive, a Sandisk 32Gb Flash drive and a Seagate 500Gb Hard Drive, all failed to mount, and all gave the same error messages.

[ 40429616] sd 0:0:0:0: [sda] No cache mode page found
[ 40429794] sd 0:0:0:0: [sda] Assuming drive cache: write through.

I can't believe that a have a fault on three drives so I must suspect the programming or the RPi3. I wrote the program three times exactly as written?

Regards John

User avatar
DougieLawson
Posts: 33785
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Errata

Wed Oct 19, 2016 8:54 pm

Open an issue here: https://github.com/raspberrypi/firmware/issues see if the RPF folks can fix this for you.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
rpdom
Posts: 12804
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Errata

Thu Oct 20, 2016 5:43 am

Johnd2117 wrote:I have tied installing a WD 500Gb Hard Drive, a Sandisk 32Gb Flash drive and a Seagate 500Gb Hard Drive, all failed to mount, and all gave the same error messages.

[ 40429616] sd 0:0:0:0: [sda] No cache mode page found
[ 40429794] sd 0:0:0:0: [sda] Assuming drive cache: write through.
Those aren't errors, just normal reports on the discovery of a storage device.

Do you seen any more lines after them?

Johnd2117
Posts: 17
Joined: Fri May 13, 2016 9:23 pm
Location: Rotorua, New Zealand

Re: Errata

Thu Oct 20, 2016 6:33 pm

Thanks for your reply.

Nothing happens after the two reports, with all three drive I get the colour screen, the report and then nothing. As I said, I can't believe that three drives have the same fault so is it my RPi3 or the code?

Regards John

AndrejP
Posts: 1
Joined: Sun Oct 23, 2016 10:28 am

Re: Errata

Sun Oct 23, 2016 11:35 am

In MagPi Essentials - Learning to Code With C by Simon Long, main function keeps being definded as returning void.

As the C standard specifies the return type of main should be int and particularly since the return value of main can be and often is used to signify an error to the caller of the program, who may or may not have been human, would it not make sense to teach the correct return type in a beginner's book?

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 291
Joined: Fri Dec 26, 2014 11:02 am

Re: Errata

Sun Oct 23, 2016 5:23 pm

AndrejP wrote:In MagPi Essentials - Learning to Code With C by Simon Long, main function keeps being definded as returning void.

As the C standard specifies the return type of main should be int and particularly since the return value of main can be and often is used to signify an error to the caller of the program, who may or may not have been human, would it not make sense to teach the correct return type in a beginner's book?
See the second half of chapter 9, where I explain about arguments and return values from main.

This has been discussed this here already: viewtopic.php?f=106&t=153242 and am not going to justify my decision again.

Return to “The MagPi”

Who is online

Users browsing this forum: No registered users and 6 guests