Using FTP software to transfer files from Pi SD card to windows network
This week I wanted my students to experiment with their Pi computers and capture screenshots for a word processed report on their tinkering. We are using the Pi & their SD cards with other classes, so I wanted a way for them to get their screenshots off their Pi before the lesson ended.
Our classroom have windows-based machines which are networked together. So step one was to borrow the Ethernet cable and plug it into the Pi. I then explained to students how the ifconfig or ip addr command can be used to list the network settings of their Pi.
Next step, I showed them how to use FTP software, like Filezilla to access the content on their Pi files. I was careful to run this past our sys admin first, to make sure that things were screwed down as much as possible. Although I encourage my students to explore, I would rather they didn’t do so on our school network!
First stop, in the Site Manager, I had to add the IP address details of the Pi into the Host box, fill in the rest of the details and then I saved the profile as Red CoupePi.
You can now see the local machine in one pane and the Pi SD card contents in another.
They were then happy to grab their screenshots and transfer them to a windows network area that they could access. These screenshots then went into their write-up.
I did consider asking them to use webmail on their Pi so that they could attach screenshots to emails. They could then pick it up on their windows machines. We were however using Pi B computers, so this would have been so much slower. I also figured that in the long-term it would do them no harm to learn about FTP software too. It was certainly part of my journey, when I was writing websites.
I also considered using Libre Office on the Pi, which of course now comes bundled with Raspbian Jessie images. Then I remembered we only had single-core processors!
Next step in my thinking was to simplify the setup of the Pi computers for my class. They are quite confident in plugging in all the necessary cables to set up their Pi, but seeing as they didn’t need access to a GUI, like StartX, I thought about setting up access to a Terminal window on their windows machines, using Putty. What I could then do is plug all the 16 Pi computers into a network switch and run them ‘headless.’ This would mean I wouldn’t need my students to plug in their HDMI cable, mouse and keyboard each lesson. All they would need to do is plug in a network cable and power lead before connecting it to the switch.
I did of course think about a wireless solution, but I figured that wireless dongles might be just too tempting for someone pull out, just to be annoying, or be slipped into someone’s pocket. These things also cost money, whereas there are always a few Ethernet cables kicking around. So I went for the ‘wired’ approach with a switch similar to this.
I plugged in a couple of Pi computers then found out their IP address using monitor/keyboard. I skipped back to my windows PC, loaded Filezilla and connected to each Pi in turn. Yippee!
It then dawned on me that I hadn’t actually made much progress here. I still needed to find out their IP address using a monitor and keyboard. My sys admin had spoken about allocating static ip addresses, but despite me passing on the MAC address of each Pi, he wasn’t quite ready. I therefore still wanted to get their dynamic ip address once they had booted, without monitor/keyboard.
Showing the IP address with a dongle
I then remembered a visit to CamJam Raspberry Jam last year. Actually, I remember it very well as I spoke there. I bumped into someone who had a gadget that plugged onto the GPIO pins and displayed the IP address. After a quick twitter conversation between myself and Michael Horne, he came back with this dongle from 4tronix.
How it works is that on booting up, a Python script is auto-run. This gives a scrolling display of the Pi IP address. As this is quite processor intensive, after a few displays, the code then halts.
I will deal with the setup of this, and an audio technique for doing the same, in my next post…