Hobby Engineering Archive

https://www.sparkfun.com/products/11114

Fairly inexpensive little microcontroller if I do end up happening to need one for something; a little more work than the Uno’s which are a little more complete and priced commensurately.

Be the first to comment

New Pogo units

Posted August 12, 2013 By Landis V

Received the two bargain PogoPlug devices I had ordered from Adorama for $14.99 each the other day, and at unboxing it initially appears they may be the more desirable E02 models as opposed to the Oxnas P21 units they were indicated to be on the product page and that I recently linked instructions on a hack for. Last time I ordered one of the Pogo units something similar happened and I also received an E02 device which was fairly easy to load an alternate OS image on (though I didn’t do a great job with getting that project completed), but it seems to be pretty hard to tell what you actually have with the Pogo units until you actually boot them up and get a chance to look aft the environment (short of physically opening the chassis).

8/12 – Initial Setup and Testing

I first configured the MAC addresses on my Pogo units in the DHCP configuration on my Asus router with Tomato firmware so I’d have a good reference as to where and what they were going forward (there’s a good chance they will come and go on my network over time, and it’s always nice to be able to look at my lease table and know what’s what). I’ve been meaning to take some power draw measurements on these units for awhile now, as I have some curiosity as to whether I might be able to power them from a solar cell or cells.  To test this, I connected the ethernet cable to the first of my Pogo units and then plugged it into my Kill-A-Watt device.  Utilization seems to be fairly steady around 5.0-5.3 watts just sitting idly after booting with only the ethernet cable connected.  Adding a USB flash drive brings the draw up to 5.4-5.8 watts.  Finally, the Encore ENUWI-G2 wireless USB dongle I have brings it up to 6.0-6.1 watts (before loading an OS that will support it, so this value may change).  I will leave the Kill-A-Watt connected as I continue and try to document some readings after connecting a USB drive, wireless USB device, and putting the unit under some load. My next step was to access the device via SSH.  As noted in my earlier post, there are some instructions for this at http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray.  I had to enable SSH access via the my.pogoplug.com site as I was not able to log in directly, but that was fairly straightforward to do.

8/14 Getting back to it

After getting SSH enabled and SSH’ing to the device, my intent was to load Debian Wheezy, as I’m a bit more familiar with the Debian package management and structure.  Please be advised that the notes below are not yet complete, as I am currently working through them. Update uBoot on your DockStar, GoFlex, or PogoPlug NAS – I did this, answered “yes” to the prompt to disable pogoplug services.  The installer recognized the device as a 2097 (Shevaplug), but this appears to be correct at least until a kernel that is patched for the E02’s is applied.  Just as Jeff’s instructions at the above page show, here’s what I ran:

cd /tmp wget
http://projects.doozan.com/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh ./install_uboot_mtd0.sh

I then ran /usr/sbin/fw_printenv and recorded the output from the command for later reference in case I encounter a need for it. My next steps were to prepare the drive to receive bodhi’s kernel/rootfs package noted below.  To do so, I issued the commands from steps 4 through 7 of the instructions at archlinuxarm.com, as follows:

/usr/sbin/fw_setenv usb_rootfstype ext3
/sbin/fdisk /dev/sda
#responded to prompts with o, p, n, p, 1, accept defaults, w
wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod +x
mke2fs ./mke2fs -j /dev/sda1
mkdir usb
mount /dev/sda1 usb

I wanted to get netconsole working before going any further.  First I initiated a netcat listener on port 6666 on another box with MAC 00:16:6F:56:96:9E and IP .194 with nc -l -p 6666.  I then attempted to load the configfs and netconsole modules as indicated in the instructions, but was not able to locate modules.dep – so I assume will have to proceed with getting the updated kernel and rootfs loaded first. Linux kernel 3.9.11 Kirkwood package and rootfs, last updated July 26 2013 (as of the time of writing) The bz2 package was hosted on Dropbox and I had downloaded it to my PC, but thought it might work better to just grab direct.  I discovered that the native wget in the Pogo firmware wouldn’t handle the HTTPS it redirected to, so a bit of a dirty hack with a reference from here (one of the later ones that uses echo to apply the HTTP 200 OK header was required since I couldn’t stuff this information into the binary) allowed me to grab it using netcat since I didn’t have a webserver handy on the box I had downloaded it to.  I started the following on the box that held the Debian rootfs: while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat Debian-3.9.11-kirkwood-tld-1-rootfs-bodhi.tar.bz2; } | nc -l -p 8080; done Then, from the Pogo SSH session, I executed wget http://download.host.ip.addr:8080/Debian-3.9.11-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (from the root directory of the newly formatted flash drive). This ran through and downloaded the file properly, and once it completed it reported “stalled”, so I issued a Ctrl+D on the server end and the connection terminated properly, with the file appearing to match according to an MD5 checksum. I then untar’ed the file on the Pogo with a tar -xjf Debian-3.9.11-kirkwood-tld-1-rootfs-bodhi.tar.bz2. This took a couple of minutes to complete, and unfortunately I didn’t think to check my power draw until it completed and was back down to ~6.3 watts.  Once complete I edited the fstab file and set the /dev/root type to ext3.  Finally, I issued a sync and /sbin/reboot and waited for the device to come back online.  I could tell when it did, as the front LED came up orange (due to the hardware reference to the Sheva, mentioned previously).  Unfortunately I wasn’t able to ping or SSH to it, so I gave it a hard power cycle and also cleared its DHCP lease from my router.  Pings replied when it came back up following the hard boot, and I also noticed that the front LED had come up green, which made me wonder if the hardware ID had been updated automatically. After removing the cached fingerprint from my SSH known hosts file, I was able to SSH to the Pogo and log in with username root and the default password of root, which I changed.  I then configured my regular user account as I normally do.  Upon checking fw_printenv, I see that the arcNumber is still showing as the Sheva 2097, as does a cat /proc/cpuinfo.  I ran across this thread which advised to issue a fw_setenv machid dd6, which I did followed by a sync and a reboot.  When things came back up, cat /proc/cpuinfo now shows the device as a Pogo E02.

Things to do:

Netconsole

Miscellaneous notes

/usr/sbin/fw_printenv output

ethact=egiga0 bootdelay=3 baudrate=115200 mainlineLinux=yes console=ttyS0,115200 led_init=green blinking led_exit=green off led_error=orange blinking mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) mtdids=nand0=orion_nand partition=nand0,2 stdin=serial stdout=serial stderr=serial rescue_installed=0 rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi force_rescue=0 force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi ubifs_mtd=3 ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done usb_scan_list=1 2 3 4 usb_scan_1=usb=0:1 dev=sda1 usb_scan_2=usb=1:1 dev=sdb1 usb_scan_3=usb=2:1 dev=sdc1 usb_scan_4=usb=3:1 dev=sdd1 usb_init=run usb_scan usb_device=0:1 usb_root=/dev/sda1 usb_rootfstype=ext2 usb_rootdelay=10 usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset ethaddr=00:25:31:04:XX:XX arcNumber=2097

2 Comments so far. Join the Conversation

http://www.howtoforge.com/installing-debian-squeeze-on-pogoplug-v3-oxnas-cleanly

I bought a couple of these on a discount deal today.  My previous model ended up being an E02 and less of a struggle, but ran across this site for dealing with the Oxnas and thought I’d better bookmark it now.  I’m thinking of using these devices either as a headless barcode scanner for grocery and inventory purposes, or possibly some tinkering for door/window sensors or an Internet relay for my garage door.

Be the first to comment

http://www.newark.com/jsp/search/productdetail.jsp?SKU=71J3845&CMP=AFC-GB100000001

I think these could be really useful and are reasonably priced.  Sure, 10BT, but that’s plenty of bandwidth for a number of low volume devices.

Be the first to comment

http://www.newegg.com/Product/Product.aspx?Item=9ATBGGS00D6895

Might try to build something like this for storing my boat in the shed.  Then again, might actually be cheaper to just buy this and modify it than to build from scratch.

Be the first to comment

5/19

Posted May 19, 2011 By Landis V

http://rss.slashdot.org/~r/Slashdot/slashdot/~3/3612AbuM154/CDC-Warns-of-Zombie-Apocalypse Looks like an amusing read.

http://thatwhichis.tumblr.com/post/5616002323/20-stats-about-the-us-housing-market-that-will-make-you

http://steveg769.bizland.com/spiralsbysteven2/ Wooden gears

http://idle.slashdot.org/comments.pl?sid=2170514&cid=36185434 A great idea for a honeypot FTP

http://www.lexinter.net/LOTWVers4/restatement_(second)_of_contracts.htm http://www.ali.org/

Really, really need to take some time to play with cfengine.

Had a funny thought about Apple (of the garden) being treated like a religion, “meticulous management of customer experience” (i.e., “herding the flock”), and suddenly it’s now the Rapture.

openssl s_client -connect #Command-line SSL connections

Would be nice to have a ping command with a configurable (via command line switches) exponential weighted moving average for packet loss. That way, you could watch some statistics on loss over intervals while running from a command line, and not just be interpreting loss for the time since you started the command an hour (day/week/whatever) earlier.

http://www.wired.com/wiredscience/2011/03/diy-cellphone-microscope/?pid=1112&viewall=true I’m a little more interested in the spectrometer.  I always thought it would be interesting to have one of those.

Be the first to comment