02 February 2015

Raspberry Pi 2

Gizmodo's article about the Raspberry Pi 2 came up in my best friend's news feed on Facebook, which ended up in mine after he liked it.

From what I posted yesterday (or early this morning if you want to get technical), there's not much different, but the article does link to a store that sells them for (presumably) North America. (Direct link here)

It seems like the ethernet is indeed 10/100 as I had thought, so using it as a bittorrent client is definitely out of the question. However, I think I might just get the Pi 2 instead of it and the B+ together. Considering the quad-core on the Pi 2, there wouldn't be any problem with having it being an FTP while I do other things - I'd also just be able to mount it to the "case" I recently made which would keep the SoC relatively cool.

I'm sure MCM Electronics is a pretty decent online store, and while the BBB rating/review is pretty good,  I'm not too happy with how slow the site took to load (maybe because everyone wants the Pi 2?), so I'll wait for now (I don't have money for it anyway).

(Edit)

On the Raspberry Pi blog, there's a post about the Pi 2, and a couple links to retailers Element 14 and RS Components - with Element 14 not working correctly. I checked again at Newark and it was also there, so options are definitely available.

Raspi 4 correction and DD-WRT Client Bridge

A couple hours after posting Raspi 4, I looked on Amazon and saw that the B+ was cheaper than the B revision 2, so it's what I'll be buying instead. I'm unsure what I'll do with the extra USB ports, but I guess it'll allow me to expand it's storage ability (though the point of it is a small-file FTP server due to the 10/100 ethernet port).

One of my friends read earlier that the Raspberry Pi 2 will be coming out sometime soon which will have a quad-core 900MHz ARM and 1GB of ram and still be $35 USD. I'll need more info on it, but I'm quite sure the ethernet's still 10/100, assuming the USB controller still controls it.

Reading this article, it seems like it's on sale today, but only for the UK (or maybe just England?), since I didn't get any hits for it in the Newark Element 14 store.

Nonetheless, I'll probably end up getting one to use as the ultimate low-energy, low-heat solution for when I want to write. I'll also be able to listen to music and watch videos as well, provided I put it on an external drive. I'm decently confident that it'll be able to handle a lot more than the B (revision 1) that I have, so using a real web browser shouldn't pose any problem either. It'll be nice to be able to leave on all the time, since it probably won't consume all that much power, if at all any different from its predecessors.

I'll also be receiving my best friend's Raspi to tinker around with, since I'd rather not awkwardly tinker with mine along with the fact that he's not using it for anything (I think it underwhelmed him more than I). It'll help me figure out a use for my Raspi once I get the B+.

One possibility is to make my Raspi a ad-removing wifi access point, but as I think about it, it would make things a bit awkward as far as placement and such - I'll still keep it in mind however.

Another possibility is to make it a personal NTP server, where it updates its own time from the NTP server I use (ntpX.jst.mfeed.ad.jp - replacing X with 1, 2, and/or 3) then acts as a server to give the time for any of my machines (except for Triela and Sae-chan, considering their mobility), but considering the nature of NTP servers (and the NTP client service), it's not entirely necessary.

I was also thinking an MP3 player for my car (considering I'd depreciate the iPod, I could probably convert to OGG), but display and controls are only part of the complications of doing this.

I'll have to poke around more to see if there's something else that I can add to the list of possibilities, but off the top of my head, those are the only three at the moment.

Late yesterday (31 January) I remembered about using DD-WRT (it was within a conversation with a friend when conversing about using the Raspi as an access point) to make a partial wireless bridge by having the router connect to the AP directly (client bridge) instead of using two routers to make a full wireless bridge. I looked up the Tenda routers I was using and it wasn't within the router database, tough luck for me I thought.

The router I had bought toward the end of 2012 (I think?), for when I was seriously considering on getting my own internet line, had been mounted in my bedroom and sitting there ever since (I had set it up some, but I hadn't a clue where I kept the passes for it and such), which is the router I checked next - which came up.

After about 3.5 hours of reading, double-checking, and setting up, I was ready to begin the installation process, which was quite quick and easy compared to what the DD-WRT wiki had made it to be.

I then began setting it up as a client bridge, which was fairly easy, but besides misunderstanding the instructions a bit (along with not thinking about the instructions), I couldn't get it to connect. I even tinkered with the settings a lot, trying different things that might be the problem, according to the troubleshooting, but still nothing.

After finding a blog with instructions in a different order, I still couldn't get it to work, and so I began tweaking things again. I started over with the blog instructions, but also changed the settings that they had labelled as "optional", and still didn't work. I then (for whatever reason) decided to change the encryption type from WPA/WPA2 mixed mode to just WPA2 and change the type to AES, and when I went to check the status, the AP showed up!

The entire process (excluding research/etc) took 3 hours - most of it belonging to trying to set up the client bridge.

The immediate reasoning for doing this is to reduce the number of wireless connections from my bedroom (though it's only reduced by one whenever Mei-chan's on), to allow me to stay on the same subnet (192.168.0.x) instead of having a separate one (192.168.1.x) to transfer files from Taiga to Mei-chan, and allow a quicker run of the Cat6 when I need to do large transfers from Melty or the NAS. What this does for me in the future is to rid of the Tenda wireless bridge whenever I make the wired network for the second floor.

Anyway, once I had fixed the settings on Mei-chan and Taiga and verified that both were able to access the internet, I shut Mei-chan down and removed the PCIe wifi card to give to Lie-chan. The PCIe wifi card that Lie-chan had went to the Dell (as much as I wanted to put it into the Intel, I didn't feel like messing around with windows drivers); the PCI wifi card that the Dell had went into Ziggy.

I realised sometime ago that I could move the Raspi to my bedroom, but right now, I don't have a good place for it along with the fact that I had just taken out an expansion card from Mei-chan and I don't feel like putting one in (I'd like to have some rear USB ports free if I need it for whatever reason). The other reason is that I had also made a 30cm cable for the, so making another one so quick doesn't appeal to me that much either. I might do it at some point though, but we'll see.

Random afterthought: I was half-tempted to use the Linux label, since DD-WRT technically uses the Linux kernel, but since it's not an actual distribution, I decided against it.

30 January 2015

Raspi 4

While looking at some Raspberry Pi cases the day before yesterday, I looked at this "case" that comes with a fan that plugs into the GPIO pins, which I found quite interesting, since I had never thought to look at the pinout for the GPIO or to use GPIO to power the fan. I was planning on redoing the wiring yesterday, but my best friend had a day off, so I went to his place instead.

I had a small fan from somewhere (I think it was one of the fans from the old XBox?) that I had set aside for a while, and this morning, I was looking at it to see if I was able to use it instead of an 80mm case fan, and I was definitely able to. I pulled out some parts to begin making a mount for it before I realized that the shroud would make it quite annoying to access the GPIO pins to plug the fan into.

I then looked around to see if there was something I could make a new case out of, and saw the tin that my Tool Logic credit-card sized multi-tool thing came in. While I could have made a full case with it, that would be a lot more work than I was willing to put into it, and so I used the lid, since it was shallow enough to not block any ports; it also had enough leftover space to make it easy to figure out how/where to mount the fan.

After figuring out how to position the Raspi, I made the fan mount with two break-off PCI slot covers, using titanium wire to tie one part together (after drilling the holes to mount the fan), and using a couple wraps of clear tape to hold the other side together.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6AeNmAHZeE4SolKspARcTk871ntckPDMK0CLn_CWzUV7IxShx8wzQxgFX4KkNwj12_iO_A_1RDgFwyM6v8YTvF1LlK1g7TEDfaEgoArynp0mcrdWXjUTSqCCcoGkPkf9Zs6CaPmBQ71s/w1106-h829-no/
You can partially see the tape on the bottom joint of the fan mount.

I had actually forgotten to drill the holes to mount the fan bracket to the lid, but I was still able to drill the holes without too much of a problem. The lid gave me a bit of a problem drilling into - since the metal was kinda thin, the hole didn't get drilled out cleanly, but I was able to clean it up enough to where it works. I used two bolts to mount the fan to the bracket and two bolts to mount the bracket to the lid, and while I could have cut most of the excess off of the bolts, I didn't feel like expending the extra energy to do so, since it didn't matter either way.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKZwc0R-_eGqGzqiwQyewgjcjz9ZH_REv-hh38YpX3GWRIllONIP2eAcg-KlJcm_mgdtkMIIZderR_JLumHY_KQ2IHDpatRfgl2_D5mACLlQtdWVYqZoJP9HxkuYKNdmYGoGpkPmYUIl0/w1106-h829-no/
The leftmost bolt was the most annoying to tighten, since I was just barely able to get a 10mm combination wrench (open end) to hold the nut (I didn't feel like finding an adjustable wrench).

I reused the screws that I used as feet from the old "case", since the heads to the mounting bolts are obviously not flush against the bottom. I also had to cut part of the tin to accommodate the power cord - which is a USB A to mini-B cord with a mini-B to micro-B adapter attached to it. I also trimmed a part of the top ESD foam that wasn't necessary off, wedging it between the bottom ESD foam and the plug opening to kind of hold the plug a bit.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsQXCQPPfuH82n2a8gOHvpxpBvtFp8G7-K0BxA6Gx9-67j7gLMN3eurmmnJ3RGEwbCoqR6CGiZp3GKjc3XLd4PkGGGrEGr0ryPB_tkvWeswG4iJ4gjzBpzqic8VHW-z1j2Qn4qIud9Nug/w1106-h829-no/
The metal warped, since it was thin, which you can see here.

I had thought I was done, when I realized the board still had a bit of free movement (the ESD foam has permanent dents that partially prevent it from sliding around, which isn't enough to hold it securely. After about half a minute, I remembered that I thought of using another bolt from the fan-mounting hole to hold the board down. The bolt I used was originally quite long, and I was going to use two nuts to position it, but that proved to be very awkward to tighten properly at the correct height, so I just measured and cut it to length instead (which saves me a nut). I used part of the piece I cut from the lid to make a flat surface for the bolt to transfer the pressure onto, and trimmed a bit of the blue rubber to match the size.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiptWsVgJrlFE9g0ZyIo6Pa99mA27yvjIg-XujpWXXCf5F_xag6ngeF1i_lJXC0-vmav_zaAkZmt9aZfmq_mqd1rr_k3K-iEfOHAS-gmNwSugnU-bN2JvyDG-kr6YIM22BULJgcdVn-rzs/w1106-h829-no/ https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEatkNBBb-B_qykZTkYOhc4jU1a3GDZNAV1F27gub5RCdB4e_KKrlT7CgK0j0o1ZkihKS69o8424PME8elCGi25o7Ux_5NK0nLPwfg7vAF-N0UdTue4ynh5ZMvPKN7YAbDWnd2S7RaBT0/w1106-h829-no/
"Front" view and holding bolt closeup.

While it works, I'm worried that the stress might cause the fan assembly to crack and break, but I'm hoping that doesn't happen. The airflow is pretty much directly on the SoC and the LAN IC, which will keep it relatively cool, though it's not entirely necessary.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcSRjnx6blfGMjF2dlgdRPc8ieH8ecZg8-9P5d9aUGRCTdqUItulvZtobmg-b_hmDw3yIJ84KlRnjTZ92ui7rUjCW0_OiBgPcx5W7EYtM1DU4kQHbBQAMMsh7SRmyfz0HT_ys20Xj0hSg/w1106-h829-no/
Top view (angled). The angled cut on the bottom ESD foam was to facilitate having it in the corner, but wasn't the best layout.


I think I'll buy another Raspi since the second revision of the B model has mounting holes, which will make it much easier to attach to this "case" and allow me to remove the board-holding bolt. When that happens, I'll get a case to toss this Raspi into and use it for something else.

It took about 5-6 hours to make this "case", but it was worth it, since it's a lot more open and all the ports are a lot more accessible. The only problem is that the "foot" placement wasn't great, so it doesn't stand on the switch properly - oh well.

25 January 2015

SSH

After tinkering with the Raspi, I decided to try to learn a bit of  SSH, and though what I've learned is basic and limited to the LAN, it's enough for the moment.

One thing I've learned is that anything that can be done in terminal can be done with SSH, since it's accessing another machine with a runlevel 3 interface.

Last night, I decided to boot openSUSE 13.2 to runlevel 3 on Triela and try to SSH into her to run updates, but I had no such luck; I tried again with Lie-chan a couple hours ago and still had the same problem.

After poking around on the net, I found the problem. The first was that the firewall was blocking SSH (port 22), and the second was that the daemon wasn't running or set to run on boot.

Once I get the chance to (probably tonight when I update Melty), I'll be able to boot any machine to runlevel 3 and remotely update it and shut it down.

Oh, when I was tinkering with the Raspi, I sent a halt signal (sudo halt) which wasn't the best idea, since the terminal session hung - oops! I found out a couple hours ago with Triela that I should type sudo init 6 to reboot, and with Lie-chan I sent sudo init 0 with SSH to shut her down. Sending init 0 over SSH to the target machine does a proper shutdown which then sends a logout signal to the SSH client from the target machine, making it a much cleaner experience.

I tried to SSH into Taiga, but found that I was unable to since the dependencies for openssh-server were broken, so the server wasn't installed. I'll see if there's a way to fix it, though I think Debian PowerPC might make it problematic.


Things I've learned:
  • Check to make sure SSH daemon is running/scheduled to run on boot
  • Check to make sure firewall doesn't block incoming SSH signals
  • Use sudo init 0 to shut down machine instead of sudo halt
  • SSH is quite useful and I should have taken the time to learn it earlier

Raspi 3

I decided to tinker with the Raspi again, thinking of using it as a very low-powered FTP machine for transferring small files since the Raspi's ethernet is 10/100 and not gigabit.

Once it booted up, I got to some sort of weird display manager and had to grab the mouse to move the cursor so I could type in the login and password fields, but was unable to successfully log in for whatever reason. I was about to download Raspian, but then decided to look at the size of the ARM version of openSUSE. Since it was much smaller than Raspian, I tried openSUSE 13.2 first, but ended up with errors, so I went with 13.1 instead and got to the login without any problems.

I finished up setting up the FTP daemon before looking around on the internet a bit to learn how to SSH into the Raspi - to which I was successful. I then cleared out the SSH "known hosts" file and set up a static IP for the Raspi before playing with SSH a bit more.

What's nice is that I can just set up the Raspi with the bare minimum (power, ethernet, and usb drive) and then leave it alone - no need to login to it locally.

The only thing is that the Raspi is still a bit slow, even through SSH, but it's nowhere as bad as trying to run Chromium in Raspian.

I haven't set it up yet, since I'd have to rearrange the layout of the switch for the NAS and Melty, but I'll probably do it fairly soon.

14 January 2015

Mei-chan 8

Yesterday, I turned Mei-chan on, and after booting into openSUSE, Firefox loaded and immediately crashed. I rebooted and Firefox was fine after that.

Later on, I was transferring some files over from Taiga to Mei-chan and did a bit of spot-checking on the files, and the last two groups I was spot-checking had some erroneous checksums. With the last group, however, I kept getting different checksums, so I gave up and went to bed after finding out that bad RAM is one possible cause of inconsistent checksums.

This morning, after doing a bit of stuff on Melty, I transferred some files from Mei-chan to Melty before turning Melty off (probably for the rest of today). I then pulled out all the RAM from Mei-chan and put the first two sticks back in and ran Memtest86+. I got a lot of test errors and after a while of poking around in Memtest86+ and the net, I figured out what I needed to do and what to look for.

I ran one pass (and a bunch of other partial passes) with both sticks; one pass with stick 1 (and a few other partial passes while changing the voltage slightly, as well as trying bank 2); one pass with sticks 2, 3, and 4; then finally one pass with 3 and 4. Looks like the memory fault was located only on stick 1, which isn't bad.

After testing, I left sticks 3 and 4 in Mei-chan and proceeded to retest the last two groups of files that I gave up on and got matching checksums for the first group, and a couple bad checksums for the second group, which was remedied by redownloading the files from Taiga.

I then tested out stick 2 in the Dell and it seemed to work just fine, though it was running at DDR2 667 speeds instead of 800 speeds, but that was expected. Therefore, if I decided to give Lie-chan a new set of RAM (2x2GB), I can certainly put the old set into the Dell. I probably won't though, seeing the Dell doesn't really need that much RAM anyway.

Eventually I'll contact Corsair to get replacement RAM since it's not a major priority, as it's only one bad stick and 4GB of RAM is plenty to run Mei-chan with. Out of the 24 sticks of Corsair RAM that I've bought, I've only had one bad stick, which isn't too bad of a rate (4.167%).

To a point, I do wish that I had found the faulty stick sooner, since it would've been a lot easier to get a replacement than to have to live with the bad stick even though it never gave me any major problems until openSUSE 13.1, but as they say "What's done is done."

I could also install Windows on Mei-chan, but I don't think it'd really be all that worth it, since the only reason to would be to be able to play a couple games. Besides the fact that it'd be a major headache to redo the partitioning schemes and whatnot, it'd be hard for me to get comfortable with a long gaming session, as I'm usually either sitting on the bed or on a "cushion" on the floor. There's also the fact that I don't really use Mei-chan year-round, since she can raise the room temperature quite effectively in the summer (it can take her a bit longer in the winter, but she still does heat the room).

There's a bit of a load off of my shoulders, now that I know Mei-chan is stable, but the entire load will be off once I get and verify the replacement RAM.

Network Attached Storage 3

Last Saturday, I was backing up my files onto my NAS to allow me to access a spreadsheet I had made from my best friend's house, and I had stepped into the restroom to relieve myself. A couple minutes later I heard beeping and I ran though what it could be from, and after about half a minute, I figured out it was the NAS.

I checked the fans to make sure they were still spinning, and they were. Once I was back in the chair, I saw that the backup had stalled, and I tried to access the NAS via Firefox to no avail (I might have not waited long enough). I then grab my phone and use the DS Finder application to see what was going on, and it told me that volume 1 has crashed.

I tried restarting the NAS and it didn't work very smoothly, but it didn't help, so I decided to shut it down and pull the disk out. Since I had a bit of trouble pulling the disk out, I moved the NAS itself, removing the cables attached to it, and realized I was pushing on the lock tab down instead of up. I decided to clean the dust out and then connected disk 1 to the Dell to look at the SMART info with Parted Magic.

I found that the "Current pending sector count" had a value of 4, and it was considered a "pre-failure" value. I tried to run the short SMART test, but it hung on 90%. I tried to use MultiSystem to run the SMART test, but the disk utility in it was weird and didn't seem to properly start the test.

I found that there was some sort of systemctl bug that made the SMART test hang at 90% and that it was fixed in December 2013. Unfortunately for me, Parted Magic is dated for August 2013 and MultiSystem for September. I'll eventually download Gparted Live, since I'll need something a bit more updated.

The good news is that I can still use the NAS with a drive missing, though the power button flashes orange when the NAS is awake. I'm grateful for using RAID 1, since it allows for the array to continue to be used until the drive is replaced; I'm sure that if I was using any parity-based RAID array, the array would be unusable until I replaced the drive.

Once I get the newer ISO of Gparted Live, I'll try running the short SMART test again and see what it comes up with. I'll probably format it and try to use it for something else - the hard drive doesn't sound right when reading, so I'd rather not format it and stick it back into the NAS just to have it fail again.

I'll update once I get it tested.