Baby Tools/Methods: Hits & Misses

So for first time parents, there is often LOTS of guesswork. Here’s some of our hits and misses to hopefully make life a little easier for other first-time parents 🙂

1) Tools

Video baby monitor + WiFi

So I have a bit of a paranoid streak in my technology use, so I’ve never used the WiFi features (The unit was a gift).

The Video is a BIG win. The ability to quickly tell if that yell was only a dream, or if they are sitting/standing up without the risk of being seen/heard checking in (PLUS NIGHT VISION!) is purely awesome.

Baby Carriage & Car-seat

Winter Clothing

“Petit Coulou” Carseat-cover
BIG WIN; forget dressing the kid in a suit, into the carseat and just cover the whole thing! No need to risk waking them up by forcing little limbs in or out of sleeves/legs

Thumb-less gloves with forearm and wrist elastics+toggles
WIN: Thumbs on childrens’ gloves are totally over-rated, even at 18mo…

Winter boots (with side-zippers)
WIN: much quicker than laces, and hold on pretty decently

WowCup

WIN @ 1yo. Spill-RESISTANT cups: if they drop it, you get a splatter instead of an empty cup and a puddle. With the right expectations, they’re pretty sweet.

2) Methods

Baby Sign-language

We only used a sub-set of signs, but definitely a WIN.

Past month ~3 of using this (with the BLW) it take SO MUCH guesswork out of what your kid wants. They won’t be able to talk for another 6mo-1year, but them being able to communicate basic things like ‘more’, ‘finished’ and ‘drink’ make mealtimes so much easier!

There is a plethora of sites that explain the different signs; I’d recommend looking at a few and try regularly integrating 2-3 signs (in-context, of course) at a time, until the kid understands and starts repeating them. With each sign they get, you can add a new one to the rotation.

We started with ‘more’ and ‘finished’. Later brought in ‘bath’ and others, though they were more or less useful in the end. Your kid will understand what you’re saying rather quickly – it’s nice to give them some basic way to give you a better hint of what they’re after 🙂

Baby-Led Weaning (BLW/DME)

tl;dr: This was a WIN! If you are a foodie and/or enjoy cooking, definitely check this out! (@ jessicacoll.com or just google BLW)

I think the french name for this idea/process more accurately describes what happens: “Diversification Menée par l’Enfant” or ‘DME’ – Baby-led diversification – since nothing stop the mother from breastfeeding once the kid starts eating solids.

The basic idea is to capitalise when your kid starts putting everything in their mouth (@ ~6mo) to put APPROPRIATE (in nature, and size) foods in their hands so they can explore tastes, textures and control how much and how fast they eat.

  • APPROPRIATE SIZE means (roughly) pieces the size of your thumb (for starters). They wil begin by biting of small bits and chewing that
  • APPROPRIATE NATURE means soft stuff; think bananas, avocado, carrots boiled until soft, etc. You’ll also want to peel most things. Later you can start ripe fruits and tomatoes (cut in wedges), etc.
  • AVOID!: anything that is A) ROUND (grapes are the BIGGEST NO-NO), B) that can’t be easily be squished between your index and middle finger (on the same hand) and/or C) contains added sugar and/or salt

It will be messy, food may be thrown around but in 2-3 months, you should be able to give your kid a few pieces on their tray and have some peace for 15-20 mins as they work their way though the selection.

We went to a 4-hr seminar with Jessica Coll, who is a nutritionist-dietician, and learned the ins and outs of BLW. I’d highly recommend attending such a seminar, if you are interested in trying this technique. She also offers an online-course style section of her site with recipes, message boards and videos; we signed up but didn’t actually use it.

I LOVED the example she gave in the class: “Imagine going to a fancy restaurant and ordering a nice steak. Next imagine the waiter bringing it to your table, having run it through the blender with your potatoes and vegetables, and proceeding to shovel the amalgamated slop into your face with a spoon, leaving you hardly any time to breathe, let alone take note of the flavour of what you’re eating”

CAVEAT EMPTOR: this method WILL be completely weird/alien to your parents; be ready to respond to “what do you mean you don’t give baby mush-mush!?”.

3) Baby-proofing

Magnetic Latches

THESE. ARE. AWESOME! Hover a magnet over the right spot and the cupboard opens! Don’t and it stays locked. Kid not interested in the cupboards/etc. yet? Turn them ‘off’ (Yes, they have an ‘off’ switch!)

The installation instructions didn’t make any sense (I’m an P.Engineer) but I was able to figure our how to place/space everything just right on the first try 3 cupboards out of 5 (2nd and 3rd try on the last 2, respectively).

If a toddler gets a hold of the handle and really pulls, the 2-sided adhesive may give, but if only trying to pull from the edge of the door, it should last.

https://www.amazon.ca/gp/product/B01CQ16Q8A/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

Cabinet Latches

These require 2 opposite cupboard doors to have handles in-range (<~6″ apart) to work. We have knobs on the cupboards, so just slip the gizmo on and off to get into the cupboards! YMMV depending on the type/spacing of your cupboard handles. Probably no good for drawers.

https://www.amazon.ca/gp/product/B000I68QHA/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

Outlet Covers

Only 1$ for a pack of ~30, these are a must have before baby starts crawling. Apparently HydroQuebec (electrical utility) will send you somefor free if you ask.

https://www.amazon.ca/gp/product/B00081J3N6/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

Plastic corner-covers

These seemed like a great idea, but work best in the following cases:

  • you plan to install them on perfectly square (cubed) corners
  • you don’t mind it being held in place by 2-sided tape
  • your kids doesn’t take an interest in trying to remove them

The 2-sided tape is no match for a determined child (or mine, in any case). I put one on the corner of the fireplace mantle – it didn’t last long. Added some clear boxing tape on top and it’s still attached many months later.

https://www.amazon.ca/gp/product/B0000479VI/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

Foam glass-edge covers

This is larger (~1″ deep) than we expected form the photos, but also a better cushion. Installation takes some imagination as the 2-sided tape provided comes in a roll (not pre-attached to the inside of the foam). If you’re aesthetically demanding, try something else, as they arrived rolled, so had a ‘wrinkly’ look to them, and the sides of the roll of tape also leave funny marks on any parts of the foam it touches.

Would not buy again (and didn’t install it on the second coffee table either).

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

Advertisements

Bonding eth0 and wlan0

So since I’m using my Pi for some network functions, I figured it’d be nice to have a single IP to consistently reach the device, regardless of whether a cable is handy or not.

Since my router is smart enough to disallow pre-configuring the DHCP server to assign the same IP to multiple MACs (and no one likes IP address conflicts), I went with bonding.

My starting point was debian’s wiki: https://wiki.debian.org/Bonding

In Raspbian, a new package is needed:

# apt-get install ifenslave

Don’t forget to tell the kernel to start the bonding module at each boot-up:

# echo 'bonding' >> /etc/modules 

So I got the lion’s share of my setup from there (with some adjustments) – here is the final version:

# Define slaves   
auto eth0
iface eth0 inet manual
    bond-master bond0
    bond-primary eth0
    bond-mode active-backup
   
auto wlan0
iface wlan0 inet manual
    wpa-conf /etc/network/wpa.conf
    bond-master bond0
    bond-primary eth0
    bond-mode active-backup

# Define master
auto bond0
iface bond0 inet dhcp
    slaves         eth0 wlan0
    bond_mode      active-backup
    bond_miimon    100
    bond_downdelay 200
    bond_updelay   200

Thanks to a forum post I’ve lost track of, I also figured out that I had to comment out the line I had previously added to address an issue getting dhcp addresses:

# iface default inet dhcp

The current delay is 5min 11sec from reboot to ping(out).

When plugging-unpluging the Eth cable, one can clearly see the difference in ping-times (~5ms vs. ~0.5ms), but no requests/replies get dropped!

 

Verification

I reproduced this on a brand-new minimal-install of Raspbian (4.4.50-v7+) and folowed my own steps.

BUT, for some reason, when booting with eth0 connected, eth0 would grab the IP (instead of bond0 doing so) and I was unable to ping my router(!?).

Disconnecting eth0, the IP would toggele over to bond0 and everything worked well (pinging over wlan0), so I reconnected the cable and it still worked (pinging over eth0)… or 5 seconds, after which, the IP switched back to eth0 and ping connectivity was lost!?

The only other changes I made before it started workign again were:

  • disable “alsa-utils” sound driver/service (update-rc.d alsa-utils disable)
  • comment out the plaintext ‘key’ line in /etc/wpa-supplicant/wpasupplicant.conf

… Wierd, right??

Resources:

**http://unix.stackexchange.com/questions/93063/i-always-need-to-ifdown-ifup-wlan0-after-reboot

Auto-launch application on (Raspbian-xfce desktop) login

So I do most of my tinkering in the terminal, through much googling and log the changes (ahem, improvements) I make.

So I wanted to have these 3 apps (terminal, changes.txt & iceweasel) opened automatically on login.

The Good:

Since I had previously switched from LXDE to XFCE, the solution was quick and GUI-based, adding some entries in Settings > Session and Startup : Application Autostart.

  • xfce4-terminal
  • iceweasel
  • leafpad /home/pi/Documents/changes.txt

Though for some (unknown) reason, the abbreviated path ~/Documents/changes.txt initially failed ot open the correct file – the full path from ‘/’ worked just fine.

This post by alez put me on this track.

The Bad:

Unfortunately, I initially tried adding these at the end of .bashrc with a ‘&’ appended so they will launch in the background (and .bashrc would not wait forthemto complete/exit before exiting itself) – BIG MISTAKE.

The Ugly:

Basically an infinite loop somehow arose opening multiple instances of these 3 applications until everything ground to a halt! 😦

Fortunately I had just received my second Pi and was able to quicly download NOOBS, install raspbian, slave my original microSD card and comment out the evil.

Webmin on Raspbian

Webmin is a neat little tool that puts a GUI front-end on a whole lot of (pretty much everything??) stuff that can be configured in Linux.

I followed the instructable below which was basically flawless (so much better than some of the help-files I’ve been working with lately that have so many knowledge gaps you’ve liable to fall in and just give up before getting the first thing running…). Kudos to steve.m.graves for a thoroughly well-done job!
http://www.instructables.com/id/Adding-Webmin-to-manage-a-Raspberry-Pi/?ALLSTEPS

The main advantage I’m looking for is saving configuration of various services/etc. without having to manually ferret out relevant config files, save those (and their relative paths) and cross my fingers I didn’t miss some important piece of the puzzle.

Is my geek-pride injured for taking the GUI (read: non-console) way out? A little. but in contrast with the potential time-savings, the compromise is a no-brainer.

The Raspbian GUI vs. the evil ‘startx’

So it all started with the best intentions: Let’s try to open up a Windows machine with RDP!

The straw…

So somewhere I found how to install rdesktop and that led me to install some other packages & type ‘startx’ to get it all going… and it was all downhill from there! 😦

No matter what I did, I couldn’t get the old GUI to come up the way it used to!

Stuff I tried, but that ultimately didn’t pan out

I tried restoring the ‘.old’ .Xauthority file. I tried changing the .Xauthority file’s user:group back to pi:pi (from root:root). I tried deleting the .Xauthority file altogether. Hell, I even though it plausible that Raspbian’s default partitioning of my 32GB SD card somehow let me clog the FS – but nope; not one partition with >15% utilization.

Update: OH! I also added a “startx; sleep 10” to the end of my  .profile at some point that caused xface to not start until I logged in via ssh and killed the bugging-out xServer process… :@

Update 2: Great! Now I get the same blank/black desktop again!? Running ‘startx’ will bring up xface, but this is still a manual SSH step required to get my GUI up and running! Poking around I removed the instigating ‘rdesktop’ package and based on the post below, installed slim to replace lightdm, which only seems to want to drop me into the black-screen GUI with a right-click menu to open a terminal emulator and other applications.

https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=7571

The (lesser-evil) downside is that the login-prompt is back, but at least it is accepting the same user/pass that SSH has been all along 🙂 (raspi-config was of no help here, contrary o some forum posts)

The final solution

In the end, I said my goodbyes to lxde and uninstalled it and moved to xface, at the cost of a few hundred MBs of SD space. I followed the instructions below without any difficulties whatsoever:

http://linuxg.net/how-to-properly-remove-lxde-and-install-xfce-on-raspbian-debian-for-raspberry-pi/

I had some doubts (read: “Oh shit, did I really make things worse!?”-moments) at a few points during the reboot process, but xface ultimately came up with its (somewhat obnoxiously coloured) desktop background

I’ve done a first-pass in the settings tweaking certain things, but time will tell if xface will pass the ‘good enough’ test.

Once thing worth noting is that xface seems to take much longer to shutdown once given the ‘reboot’ command, but this may simply be my mind playing tricks on me… This seems to have been related to the “startx; sleep 10” that I had added to my .profile… and removed – see the Update above.

…but why use a GUI in the first place!?

Being quite accustomed to working through a console, using vi, etc. I still like to be able to use the Pi, connected to my monitor in complete SILENCE 🙂

Adding to that the amount of googling I do in the course of my hackling, a web browser and text-editor were natural additions.

Afterthoughts

I probably could have tried something from the Raspbian recovery menu (hold SHIFT at boot-up)… only though of this after xface’s obligatory post-install reboot. Oh well.

Update2: Maybe I should have looked further into lightdm’s config for the issue…

Lessons (I really should have) learned

Oh how nice it would be to have a full backup of the SD card to revert back to in case of similar catastrophes… but unfortunately I may have to end up screwing the pooch much harder than this to actually put the effort into deuplicating and storing SD cards…

Serving AirPrint via RaspberryPi

Serving AirPrint via RaspberryPi

So I’ve got a Pi, a few Apple devices and a Brother network-enabled laser printer, so I thought: “Hey, wouldn’t it be wonderful if I could print directly from the iDevice to the printer?”

It really would, but Brother’s app requires that you (re-)open whatever needs printing in their built-in browser, so that’s a few extra steps than I am happy with for printing from Safari, etc. (NOTE: The network scanning function from the app is pretty amazing, however)

The workaround: Use the PI as an AirPrint server (since it’s already handling other ‘always-on’ functions) – easy peasy! I’ve seen Brother’s got a Linux driver on their website!

UPDATE: Something got borked, so I did some debugging; turns out the ‘share printers’ option needs to be set in CUPS (see Step1’s update), and with the MIME types configured (maybe? Added step5), CUPS support Airprint directly (iOS 6+), without avahi??

Step 1: Install/setup CUPS

Easy enough, I followed these steps, which basically amount to:

  • Install CUPS: sudo apt-get install cups
  • Allow your user admin rights (to configure cups): sudo usermod -a -G lpadmin pi
  • I skipped some of the more questionably secure mods in the CPUS config-file, namely:
    • allowing printing via (CUPS server) to any machine on the LAN (since my printer is already network-enabled & I only need to add AirPrint support), and
    • opening up the admin interface to any machine on the LAN (since I have a monitor on my pi and am comfortable working with X11-redirects)
  • Restart CUPS: sudo /etc/init.d/cups restart
  • Add a printer via the admin WebUI (http://localhost:631)

UPDATE: You MUST check the ‘Share printers connected  to this system’ option, even though this seems less secure – see the UPDATE below for more on security.

GREAT! My printer is detected by CUPS! …Oh wait, my model isn’t listed 😦

UPDATE: For the security-minded, I came across this little gem by Marcus Povey: Limit printer access to your local LAN and loopback via /etc/cupsd.conf:

<Location />
  Order Deny,Allow
  Deny From All
  Allow From 127.0.0.1
  Allow From 192.168.0.0/24
</Location>

Don’t forget! You need to specify the NETWORK address, not the address of a specific host, or it will get stuck! (Thanks lifeafter2am!)


Stuff I tried, but ultimately gave up on:

  • Remember that wonderful Linux driver on Brothers’ website? Download and install the .deb package… Oh wait, it’s an x86 driver 😥
  • Finding a .ppd in the cupswrapper and LPR .deb packages (ar vx <filename>.deb to open them, in case you were wondering)

Then, the jackpot. A fine gentleman named Peter De Wachter was kind enough to build a brother driver with which CUPS can print to a few models of DCP- laser printers – INCLUDING MINE! The source code is graciously shared on GitHub under a GPLv2: https://github.com/pdewacht/brlaser

If you run into similar issues (missing linux armhf driver support from the manufacturer), you can try finding a suitable printer driver here: http://www.openprinting.org/printers


Step 2: Installing the brlaser driver

Special thanks to ‘hal58’ who wrote the ‘Jackpot’ post referenced above about getting his brother printer working with his Pi: https://www.raspberrypi.org/forums/viewtopic.php?t=116509&p=898138

His instructions amount to:

  • Download the source code .zip from https://github.com/pdewacht/brlaser
  • Install CUPS and software libraries/compilers:  sudo apt-get install cups build-essential libcups2-dev libcupsimage2-dev automake
    • I had an issue with ‘automake’, and hal58’s ‘automake-1.11’. An ‘apt-get update’ cleared it up.
  • Prepare, configure, build and install the driver: ./autogen.sh; ./configure; make; sudo make install
  • Restart CUPS service: sudo service cups restart

Hooray! Now back to the original guide!


Step 3: Finish adding the printer

Getting back to the interrupted ‘Add Printer’ process in CUPS WebUI, under the ‘Model:’ field just select the line ending with “using brlaser v3 (en)”

That’s it! 1hr later, I can print!! – Who says Linux/RPi aren’t fun? 😉

 Step 4: Install  avahi-daemon

UPDATE: This step (avahi-daemon) may not even be necessary!?
While debugging (after finding out my CUPS was not set to share printers), I had visible AirPrint printers in my iPhone: “AirPrint-Brother” (from /etc/avahi/services/airprint.service) and “Brother DCP-XXXX” (directly from CUPS??)

Most of the guides tell you to simply sudo apt-get install avahi-daemon, but somehow omit a key step: avahi’s .service config-file! (SERIOUSLY!?)

Step 4a: setting up the AirPrint service (avahi-daemon)

The ones that do seem to be aware that avahi is not simply plug-and-play, refer to a python script that will auto-create and configure the .service file required.

Disclaimer: My malfunction is that I don’t like running a random script called “airprint-generate.py” from github and hoping for the best… call me paranoid. Part of the problem is that I don’t know enough python to (time-effectively) audit that the script is actually doing what it’s advertised to do, and nothing more.

Fortunately, good ol’ google led me to archlinux, who gave a sample config-file and listed what should be customised: https://wiki.archlinux.org/index.php/avahi#Airprint_from_Mobile_Devices. As far as I can tell:

  • adminurl is the same link as you would use to administrate your printer via CUPS’ webUI (Administration > Manage Printers > ‘PrinterName’),
  • rpand ty are sub-strings of adminurl, and
  • as for nameand note, just pick a printer name and location-hint that make sense (will be displayed in the iOS device looking for printers)

Copy-paste the sample from ArchLinux into a text file and update the fields above before saving, e.g.: sudo vi /etc/avahi/services/airprint.service

A quick sudo service avahi-daemon restart and you’re set!

Step 5: Adding MIME types to CUPS (UPDATED)

While debugging, I came across this post by Friedrich Hotz, and added the MIME types indicated and it now seems that CUPS supports AirPrint on its own? I’ve deactivated the avahi ‘.services’ files (sudo mv airprint.service airprint.service.off) and my Brother DCP-XXXX is still detected on my iPhone! And it prints too!

echo ”image/urf urf string(0,UNIRAST<00>)” >  /usr/share/cups/mime/airprint.types
echo ”image/urf application/pdf 100 pdftoraster” > /usr/share/cups/mime/airprint.convs

Let me know if this helped you get a similar setup going on your own Pi.

Looks like Duplex printing will be a battle for another day 🙂