Links Archive

On Networks N150R Routers

Posted June 13, 2016 By Landis V

Picked up a couple of these from Newegg for free plus a couple of bucks shipping after rebate.  Figured that in combination with a couple of relays on the GPIOs, I could probably use them for switches or work with the serial port for a sensor connection.  Just a few notes on them.

OpenWRT 15.05 Chaos Calmer patched to expose the GPIOs:  https://micu.webserwer.pl/pmwiki/pmwiki.php?n=OpenWRT.Downloads

Forum thread on not flashing direct to 15.05.1; I went to 14.07, then to 15.05.  https://forum.openwrt.org/viewtopic.php?id=51576

OpenWRT Wiki page with device info including GPIOs https://wiki.openwrt.org/toh/netgear/wnr612v2

Controlling the GPIOs

From here, the simple way to control the GPIOs natively is with the “brightness” value for the LEDs.  By example for the LAN1 LED (others are in the same path):

root@OpenWrt:~# echo 0 > /sys/class/leds/netgear\:green\:lan1/brightness
root@OpenWrt:~# echo 1 > /sys/class/leds/netgear\:green\:lan1/brightness

Update 9/18/2016

Finally got the LAN2 LED peeled off of the board, had a heck of a time with it.  After doing so, I discovered that I only get ~2.5v across the pins when the GPIO is active… not enough to drive my 3.3v relays.  I assume they are probably using a voltage divider here.  Measuring the resistance between the positive and negative ends of the LED without power applied, I get about 1580 ohms one direction, and 670 in the other.  There appears to be a ~960 ohm resistor at CA111, but I haven’t figured out exactly how this ties in.

Update 10/9/2016

Spent some time with this again over the past couple of days.  I removed the resistor at CA111, but apparently it is not a divider.  May need to spend some time to see if I can make something work with a 2N7000 MOSFET or something like that, but I’m pretty novice so that will take some effort.

I did test out my 433MHz ASK receiver on the TTL serial port, but without much luck.  This OpenWRT page was helpful in getting stty installed and setting the baud rate on the serial port,

‘stty -F /dev/ttyS0 9600 clocal cread cs8 -cstopb -parenb’ to set the config, and
‘stty -F /dev/ttyS0 -a’ to verify the config

but still didn’t get any output.  I’ll have to give it a shot with my Raspberry Pi just to see if I can get anything out of there.

Be the first to comment

Purpose

I recently purchased an Ivation barbecue thermometer which is supposed to be a pretty decent similar build to the Maverick 733 (I believe).  Of course, one of the first things that comes to mind is how to tie this in to some type of IP connected system so I don’t have to rely upon the included receiver and its limited range, and can instead take advantage of wifi, Internet, and the smartphone I always have with me.  Turns out it should be pretty feasible in conjunction with the Raspberry Pi I already have plans to set up as a sort of garage controller.  That device will be connected by ethernet and will have a constant and reasonably close proximity to my smoker and grills already.  This post is for my notes on links that will be useful when (if?) I actually get around to making this work.

Software/code links and notes will come later, after I actually get the equipment to start testing.

About the BBQ thermometers

The Maverick (and presumably Ivation) transmit on the 433.92MHz frequency using OOK.  The Hackaday link to Bob Blake’s article below describes the communications protocols and encoding.

Links

 

Update 10/9/16

Spent some time trying to get this working with my On Networks N150R over the past couple of days without much luck.  May have to give it a try with one of my Raspberry Pi’s and see if I can get it working there, if for no other reason than to verify that the receiver module I purchased is functional and/or that I have it wired somewhat properly.

Be the first to comment

Setting up a PPPoE headend

Posted May 23, 2016 By Landis V

May come in handy.

http://packetlife.net/blog/2009/apr/20/configuring-pppoe/

Be the first to comment

Lawn Tractor Sprayer

Posted May 12, 2016 By Landis V

Power connectors – one for tractor, one or two for sprayer (if desired to still use the battery terminal connectors, get two).  http://www.mouser.com/ProductDetail/Anderson-Power-Products/6331G1/ – or similar.  Or, this attached to battery and this extension cord (or similar/cheaper… eBay?) may be simpler, especially if the sprayer already has a quick connect on it, which it does appear to from the picture.

Sprayer –  http://www.orschelnfarmhome.com/OrschelnFarmHome/ctl16754/cp61429/si5182792/cl1/15-gallon-spot-sprayer

Pump appears to be this or similar, looks to be around a 4 amp draw.

Be the first to comment

More Pogoplug E02 uBoot Work

Posted April 30, 2016 By Landis V

I’ve written a few times about configuring Pogoplug devices to work with uBoot and Linux.  Recently I’ve run into some problems with one of my Pogoplug E02 devices, where it would no longer boot to the attached USB drive, and didn’t seem to be booting properly to the native firmware either.  Finally got around to looking at that a little bit in the past couple of days.

Since I wasn’t able to SSH to the device, I had to open it up and connect to the internal serial console.  I had already purchased a USB to TTL serial cable adapter based on the PC-PL2303HX chipset (similar to these), so I opened up the Pogoplug and modified a CD-ROM audio cable I had laying around to connect between the TTL adapter cable and the serial port on the board (opening and serial connection documentation here).

Once I was able to get consoled in, I determined that my USB drive was only being detected properly on a soft boot.  So pulling the power cable was doing me no good as far as getting it to boot, but if I issued a reset or reboot from the failed boot environment, it would detect the USB device correctly and boot up.  While the reset command was functional, it was not practical, as it would have required a perpetual serial connection and for me to issue a reset every time it lost power before it would come up properly.  I want it to reload to normal running state automatically.

I played around with the firmware environment variables for a bit before going ahead with an upgrade of my uBoot environment (I was on a 2011 version).  I followed most of the instructions including flashing the default uBoot environment variables.  I was still having some issues with the USB drive not being detected from a cold boot, but modifying the “scan_disk” environment variable appeared to provide a resolution.  I changed the “scan_usb” portion of the command from “usb start” to “usb start; sleep 3; usb reset”, and thereafter I was able to successfully boot from both a cold start and a warm start.  The full variable after changes was as follows:

scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start; sleep 3; usb reset"; setenv scan_ide "ide reset"; setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 0x800000 /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done

Finally, I made some modifications to allow the default Pogo OS to load in the event a drive with a “rootfs” label was not present.  I added a “pogo_bootcmd” environment variable and modified the “bootcmd_exec” as in the following.  This appears to be allowing the device to boot the defacto Pogo OS in the event the rootfs drive is not present, though I still had difficulties SSH’ing in with my Pogo portal configured account.

pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else if bootm 0x800000; then echo Booting; else run pogo_bootcmd; fi; fi; fi
Be the first to comment

Updating US Cellular Galaxy S4 w/ Vanir ROM

Posted April 30, 2016 By Landis V

My wife’s phone was having some space issues that I finally got around to looking at today.  I recently upgraded my S5 to a 32GB SD card and it gave me plenty of space, so I was surprised when I checked hers and saw that it already had a 32GB card.  Had I looked a little closer, I probably would have realized that the card itself was not full, and in fact barely had anything on it.  I didn’t even have it set to store pictures on the external card :/

Having already bought a 128GB Class 10/U1 card, I decided to go ahead and install it.  I had run across an app a while back that actually allows the apps to be linked over to the SD card, so they don’t jump back to main memory every time they update, which is annoying as hell. I deleted the partition table on the SD card (referenced http://superuser.com/questions/373463/how-to-access-an-sd-card-from-a-virtual-machine, specifically answer 5 for a Windows machine… after updating VirtualBox and installing the current version of extensions, I was actually able to recognize and pass through my USB to SD adapter to my Linux guest) and recreated with a 96GB FAT32 partition and a 32GB ext4 partition (great thread on this setup here), formatted both appropriately, copied the data over from the old 32GB card to the FAT32 partition in the new card, installed, and booted.

I then configured the camera to save new pictures to the external SD card (FAT32 partition) and installed the Link2SD application from the Play store.  Had some difficulty figuring out why I couldn’t get root on the Vanir ROM, tried installing a couple of the SU apps with no luck.  Turned out I had not enabled it by 8x tapping the build number in about phone, and then apparently you have to select a different option in the “enable root” developer option… even though it shows apps + ADB, apparently it doesn’t set it.  Once I set it to apps only, I was prompted for root authorization as I had expected.

I then linked several apps over to the SD card, which seemed to be pretty straightforward and to work well.  Assuming this fix holds and continues to work as expected through updates, etc., I should have this phone pretty well fixed up for its usable lifetime.

Be the first to comment

Trying to build a useful home calendar

Posted April 25, 2016 By Landis V

One of the things I’ve been planning/intending to do is build a home calendar that shows all of our events at a glance, and to run it on a tablet or something similar.  We use Google calendars for most of our events, and since the intent is to show us everything that is going on, we’ll need to be able to authorize and authenticate to multiple calendars, pull the events, and display them.

One of the threads that either got me started thinking about this or was one of the first things I ran across when I had the idea was this one on Reddit.  I have a couple of Pi’s, and had generally planned on using one of them (and may yet for a similar design on a TV with a little more functionality), but ended up picking up an RCA Cambio tablet at Wal Mart for around a Benjamin, so I didn’t really need to fiddle around with adding a screen, mounting, network connectivity, etc.

The above thread led me to what I believe will work for the dashboard interface – freeboard.io.  While I have a distant familiarity with JSON and XML, I don’t work with it enough to be particularly good at it, and I’m pretty much completely unfamiliar with the Google APIs and how to call them, so I wanted to note a few links that were helpful as I was working through the process.

Code that actually ended up working to pull the basic info from a public calendar (just grabs “id” now):

 

Be the first to comment