Raspberry Pi, Linux and Moodle (split from Difficulty downloading Moodle)

Raspberry Pi, Linux and Moodle (split from Difficulty downloading Moodle)

by Visvanath Ratnaweera -
Number of replies: 25
Picture of Particularly helpful Moodlers Picture of Translators
Hi Rick

I'm glad to answer your questions. We are diverting from the original topic though. Therefore I gave this sub-thread a new subject in case the moderator wants to split it.

> However, when I travel light, I am not sure that I want to carry around with me another device.

Sure. You know that the Pi is the size of a pack of cigarettes. It fits nicely to a side pocket of my sling bag. For my usage, the Pi doesn't even need an external power source. I simply connect it to the USB port of my laptop.

> And it doesn't appear to me that the Raspberry Pi can run Microsoft Office, but I might be wrong about this. Your thoughts about MS Office, PC software, and Mac software running on a Raspberry Pi?

Pi was originally meant to be an experimental rig, a hardware controller and a development board. But the designers used an architecture which is closer to a full PC than an embedded device. Still the Pi is an order of magnitude weaker that the typical laptop today. One shouldn't expect it to be with its less that 5 W power consumption!

Bottom line: Pi doesn't replace the laptop (although there are nerds who are doing exactly that), it is the server of the classical client-server-architecture we have in Moodle. (Well, only in this context. The Pi itself is very versatile.)

Anyway, the bottom line is, Linux is the OS of choice (and destiny) for the Pi. Microsoft is way too bloated. BSD (kernel of the Mac OS) will run in a Pi, but not the shiny GUI. (I am doing an injustice to Pi. It has incredible graphics power for its size - which a server does not need.) Now the good news: You don't have to be a command line geek to run Linux on Pi. Write the image to a micro SD, insert in to the Pi and connect it to a power source. There are many variations of Linux for Pi. The one I am talking about is the https://moodlebox.net/, which has the latest version of Moodle pre-installed.

Now the question, isn't Moodle too big an application for Pi? The developer of MoodleBox has taken lot of trouble to tune it. It feels snappy enough, even in a class of 20 students. Try it!

> Also, out of curiosity, what do you do for a "monitor" for the Raspberry Pi when you travel with it?

I didn't get your question. If you mean a performance monitor, all the tools available for Debian GNU/Linux are available for Pi.
Average of ratings: Useful (3)
In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle (split from Difficulty downloading Moodle)

by Colin Fraser -
Picture of Documentation writers Picture of Testers

It has been a while since I have been playing around with a Pi, but if I recall, you could use any size SD card, as long as it had the OS on it. That could also be the file storage area as well, if the card was big enough. I got a couple of 16Gb micro cards floating around here somewhere... shouldn't be too far away should be suitable... mmmm next time I think of it....never know, just need a kb and monitor. mmm My portable Moodle..smile  

In reply to Colin Fraser

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Colin

Pi changed the SD card standard for its newer versions. (From memory, Pi 1 and 2 were standard SD. Pi 3 is micro SD.) MoodleBox needs Pi 3 because of the built in wireless card. So your 16 GB micro SD is perfectly suitable for the latest Pi 3 Model B+. https://www.raspberrypi.org/products/

Once you get familiar with the MoodleBox, you'll see that it is mostly "plug and play" even headless. But yes, it is always good to have a monitor and a USB keyboard, just in case.
wink

BTW, about more storage: You can connect tera bytes of USB storage if you want, loaded with any other web content, https://moodle.org/mod/forum/discuss.php?d=365924#p1477585. You'll then need a real power supply (not the laptop's USB).
In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle

by Walter Byrd -

> Pi changed the SD card standard for its newer versions. (From memory, Pi 1 and 2 were standard SD. Pi 3 is micro SD.) MoodleBox needs Pi 3 because of the built in wireless card.


Small point: I have a Pi 2 and it uses a micro SD card. Also I have ordered a USB wireless connector from ebay, it only cost $3. Will have to see if it works. The USB wireless connectors usually cost around $10.


The Pi 3 is a better bet anyway. You want as much power as you can get, and even that is none too powerful.

In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle (split from Difficulty downloading Moodle)

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Visvanath, you have inspired me to give it a try this summer!  Thanks for your comments.


I see on Amazon there is a CanaKit Raspberry Pi 3 B+ kit for $55US.  And a micro SD card (32GB) is only $13.  So it is not an expensive experiment for me.  Any thoughts about this CanaKit?

In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle (split from Difficulty downloading Moodle)

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I suspect CanaKit is as good as the next package. I got the whole 'official kit' which comes with a keyboard etc, as I no longer have such things in my computing relics box. The one thing missing for me about the pi is a nice consumer level case that does not look like something only a geek could love. Something a little sleek with a space/comes with a chunky USB style battery would be nice....


So much software, so little time.


update... I have just seen this on Amazon which is a bit nicer, even though it doesn't have a battery slot..

https://www.amazon.co.uk/GorillaPi-Raspberry-Case-Model-Protection/dp/B01D1QN4YI/ref=cm_cr_arp_d_product_top?ie=UTF8


In reply to Marcus Green

Re: Raspberry Pi, Linux and Moodle (split from Difficulty downloading Moodle)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Plus 1 to what Howard says about the Canakit and the Gorilla case. I would add that since I have wound up buying so many Pi3's and Odroids, that I no longer get the wall-wart power supplies. Instead I now have three Anker 60W 10-port USB wall chargers. They use a regular wall plug so they don't hog space at the electrical outlet, and allow me to power other items (smart phone, more Pi's, etc.) at the same time. Having a built in power switch allows me to power up/down everything at once. https://www.amazon.com/gp/product/B00YRYS4T4/ref=oh_aui_detailpage_o00_s01?ie=UTF8&psc=1

Along with the Anker, I buy specialty USB cables as needed to go from the charger to the device needing power. For instance the Odroid's need a barrel connector instead of micro B.

https://www.amazon.com/gp/product/B00XR69348/ref=oh_aui_detailpage_o06_s02?ie=UTF8&psc=1

https://www.amazon.com/gp/product/B011KMSNXM/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1

In reply to Marcus Green

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Rick

As others have hinted, there is nothing special about kits. I haven't bought any, so can not comment. Where I live, Pi is as common as bread. I can go to any electronic discount shop and be certain that if they don't have Pi in stock, they'll get one the next day! Here is what you need in terms of your application.

- maximum portability
-- Just a Pi 3 Model B or B+ https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/
-- a good quality micro SD card, 16 GB upwards
-- A case for safe transportation. Note that you can leave the micro SD inserted during transport, if the case give some protection. The https://www.raspberrypi.org/blog/raspberry-pi-official-case/ does that. But then there is a whole industry producing all sorts of geeky cases. ;)
-- simple USB to micro USB cable to tap power from your laptop

- medium size data storage (still portable)
-- a bigger SD card or a flash drive. Power from the laptop is still sufficient

- huge data storage (less portable)
-- external hard drive. You'll need a real power supply, for example a 2.5 A one.

@Marcus, I have a Pi 2 case which rejects Pi 3. Make sure that the case takes a Pi 3.

@AL, I assume Pi itself consumes much less power than an Odroid. It runs happily taking 600-750 mA from the 5 V supply of a USB -> 3 to 4 W! The power supply you suggested is an overkill and makes the box less portable.

@Rick, I always run MoodleBox without heat sinks! So far no B+ though.
In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Visvanath,

You are right, that for just one or two Pi's or Odroid's, the Anker charger is over kill. However, due to all the experimenting I have been doing over the past year, on my workbench right now there are sixteen (16) Pi's and eight (8) Odroids. At times, I need ALL of them running at the same time. The three Anker chargers handle that with ease. Trying to plug each one into an individual power supply would be a nightmare.

If you ever buy one multi-charger though, it sure comes in handy. Even now, where I am working on one Pi2 for a local gaming store, it is more convenient for me to plug the Pi into an Anker, instead of trying find an empty USB port.

In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
It is the time to buy Raspberry Pi 3 Model B. Since the recent upgrade Model B+ shops offer discounts on Model B.

I don't think MoodleBox as a "private Moodle server" will benefit from the added power in B+. In fact, it could have a negative effect, if you power the Pi from your laptop. I read today that the idle power consumption jumped from 4 W to 7 W!
In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Maybe so, but I am having a hard time confirming this (since I am not in the Raspberry Pi loop yet.)  Where did you go to see this?  And has this been verified by other Raspberry Pi users?

In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Every time a new Raspberry Pi comes out the media (blogs, video, magazines,...) explode with all kinds comparisons - benchmarks are the most popular. The one I am talking about, the power consumption, is something straightforward and simple to measure. I saw those two figures in a popular German language computer magazine.

I should have mentioned that those numbers, approx 4 and 7 W, are idle consumption. With intensive (artificial) loads, the consumption more than double. But then the things start to get complicated. For example the B+ has a built in mechanism to throttle the CPU when the core temperature goes too high. All these are not relevant to MoodleBox as a portable Moodle: It is basically idling apart from short spikes if you conduct a synchronous exam in the class with large nos. of MC questions on one page.

I have experience only in Model B, not B+. Twice I conducted an Active Quiz https://moodle.org/plugins/mod_activequiz in my class, with a whole series of MC questions as a competition. Only once the Pi got blocked. It was enough to wait a minute and restart the question.
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi,

In fact, I tested my MoodleBox with a Pi3B+ which is also, as of the last version of the MoodleBox image, the version on which I develop it.

Two improvements over the 3B make a great difference: 1) Better and faster Wi-Fi, and 2) faster ethernet. These 2 features alone make it the RPi of choice for a MoodleBox, IMHO. Moreover, for such a use, I could not measure any increase of power consumption, since the CPU is not very stressed indeed.

Of course, I own still several older (!) RPi 3B, that work beautifully as MoodleBoxes. And a RPi 3B is a good bargain with the price drop.

Nicolas

Disclaimer: I'm the creator of MoodleBox.

Average of ratings: Useful (4)
In reply to Nicolas Martignoni

Re: Raspberry Pi, Linux and Moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Hi Nicolas, thanks for your comments.

Are you able to power your 3B+ from a computer's USB port, or must you run it from its own power supply?

In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Nicolas

Thanks for the report on Model B+. Specifically the improvements:
> 1) Better and faster Wi-Fi, and
> 2) faster ethernet.

In fact, the benchmarks confirm a moderately faster Wi-Fi and massively faster Ethernet. (But MoodleBox in off-line mode make no use of Ethernet.) Also CPU performance is confirmed to be higher in proportion to the increase in clock frequency from 1.2 GHz to 1.4 GHz. Only the SD read/write speeds remain the same, which is to be expected.

@Rick
Sorry, for making a fuss about the power consumption. The physics says the faster CPU clock and the next generation of network circuitry are going to need more power. That is why I was not surprised by the magazine report of a 3 W increase. Although I have not tested, I bet the B+ will run from a laptop's USB port.

Assuming this 3 W increase is correct, it means the B+ will draw 3000 mW / 5 V = 600 mA more than the B. So B+ will draw 600 mAh more from the battery every hour. If the laptop battery has a capacity of 5000 mAh and it ran 5 h earlier now it will run 5000 / (1000+600) = 3 h 8 min. Whether that is a big deal, you have to decide. (Again, in theory.) The fact is that Nicolas has tested B+ and recommends it.
In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Rick,

From this official source from the Raspberry Pi Foundation, for optimal function the RPi 3B+ should run with a 3.5A power source (same requirement as the RPi 3B).

However, according to Wikipedia, no usual USB port from a computer can deliver so much power (2A max!). This does mean that even with the RPi 3B, using a computer USB port as power source can be unreliable.

For the low power needs of the MoodleBox (if nothing is connected to the RPi's own ports), this is usually not a problem though and it works relatively well, at least with the 3B model.

However, my experience with the RPi 3B+ is not as successful. I tried with several computers, and the pattern is not regular. Some observations:

  • When powering from USB of my desktop computer (from 2011) and my laptop computer (from 2015), I get under voltage warnings in the log of the RPi 3B+. The power LED (red) of the RPi 3B+  is not continuously on.
  • When powering from USB of my desktop computer, everything works normally though.
  • When powering from USB of my laptop, I don't get Wi-Fi signal.

In conclusion, just as the Raspberry Pi Foundation, I don't recommend to use RPi 3 in "real work" powered from a USB port of a computer, especially if you have some devices attached to the USB ports of the RPi.

Average of ratings: Useful (2)
In reply to Nicolas Martignoni

Re: Raspberry Pi, Linux and Moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Okay, now I better understand.

Out of curiosity, Nicolas, what are you really doing with you RPi relative to moodle?  Where does it fit into your overall work with Moodle?

It certainly is not a device that you can take on a plane, when traveling, instead of your laptop to work with moodle.

In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

As I'm a teacher in secondary education, I use Moodle for teaching my classes.

With MoodleBox, I can have my own Moodle installation in my class, when the institutional tools aren't enough for what I want to do.

I didn't get it on a plane, but it could be done without problem, providing a Moodle server for the whole plane and teaching there with Moodle (THAT would be cool indeed cool). Maybe your airway company would not agree though big grin.

In reply to Nicolas Martignoni

Re: Raspberry Pi, Linux and Moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Ah, now I better understand.

Can students access it from anywhere, or must they be on your intranet?  This is a bit new to me, and I don't know if the Moodlebox package provides an IP address, or even a domain name.

In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Rick,

I suggest you read the documentation on the MoodleBox website. I think you will get answers to most of your questions there (hopefully!). Otherwise, don't hesitate to ask here.

For your specific question, what you want is maybe here.

Nicolas

In reply to Nicolas Martignoni

Re: Raspberry Pi, Linux and Moodle

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Okay Nicolas, I got my Raspberry Pi 3+ the other day, installed everything as directed, and it works. Now I am starting to see where this particular solution is positioned.  It's interesting.  Yet another way people can use, learn, and even deploy a small moodle class.  Pretty good package that you have put together!

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Raspberry Pi, Linux and Moodle

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thank you for this.

Have fun with the MoodleBox and don't hesitate to post your usage feedback.

In reply to Nicolas Martignoni

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Nicolas

Indeed https://www.raspberrypi.org/blog/raspberry-pi-3-model-bplus-sale-now-35/ says, "Note that Raspberry Pi 3B+ does consume substantially more power than its predecessor". Although to be expected from the physics, this is bad news for me. So far I powered my MoodleBox on a Pi 3B from my laptop, which makes the duo very portable. I should make use of the discounts and grab some 3B Pis!
In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Earlier I said, "So far I powered my MoodleBox on a Pi 3B from my laptop,.." I was just lucky. Pi 3 can not be reliably powered from the USB port of a laptop!

Today I noticed a (wireless?) hick-up of a Pi 3B MoodleBox with no load and had a careful look. The Pi throws a low voltage warning every couple of minutes! So Pi 3B and for sure 3B+ need a proper power supply.
In reply to Visvanath Ratnaweera

Re: Raspberry Pi, Linux and Moodle

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Yes, that's exactly what I experienced too. Sometimes lucky, otherwise not so. mixed

FYI: the under voltage warning was added recently to the kernel of Raspbian, so it may be the case that we got before under voltage without noticing.