Wednesday, August 22, 2018

Transfer contacts from iPhone to Android locally, without a cloud

Note to self, next time I manage to convert someone from iOS to Android, this is how it’s done:

Sync iPhone to a Mac through iTunes
- On Info tab, select “sync contacts”
- (Optionally sync contacts to a specific addressbook folder)

Export contacts to a vCard file
- Open Address Book
- Select all contacts (in a folder)
- Drag them into desktop
- FooBar and 100 others.vcf file gets created

Import vCard into Android
- In Bluetooth preferences on Mac, pair with the Android device
- From Bluetooth menu on the Mac, select the Android phone, “Send file to device…”
- Select the vcf file created
- On the Android phone, accept the file transfer and import to contacts

Sunday, February 18, 2018

Enable Wake on lan on Ubuntu

Note to self, next time I'm wondering why WOL doesn't work with Ubuntu.

Enable it the convoluted ways of NetworkManager. What was wrong with /etc/network/interfaces?

  nmcli connection show 
  sudo nmcli connection modify 802-3-ethernet.wake-on-lan magic

Make sure some over-zealous daemon does not thwart your efforts and shut down your NIC on suspend.

  sudo sed -i.bak -e 's/^WOL_DISABLE=Y/WOL_DISABLE=N/'

Reboot and confirm the settings are good

  sudo ethtool | grep "Wake-on"
Supports Wake-on: pumbg
Wake-on: g

Suspend your Ubuntu

  sudo pm-suspend

Double check the link led is on.

Set up and run a client on your favorite OS

  sudo port install wakeonlan


Sunday, December 31, 2017

Easy-rsa fails with "Missing or invalid OpenSSL"

Trying to use easyrsa on MacOS High Sierra, it failed with an error message

MacBook-Air:vpn me$ EasyRSA-3.0.3/easyrsa init-pki140736197817224:error:0E065068:configuration file routines:STR_COPY:variable has no   value:/BuildRoot/Library/Caches/  22/libressl/crypto/conf/conf_def.c:573:line 3
Easy-RSA error:
Missing or invalid OpenSSL
Expected to find openssl command at: openssl
This seems to be a known issue with MacOS High Sierra which has migrated to Libressl instead of Openssl, and has an easy workaround:

MacBook-Air:vpn me$ EASYRSA_OPENSSL=/usr/local/Cellar/openssl/1.0.2n/bin/openssl EasyRSA-3.0.3/easyrsa init-pki
init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /Users/me/Documents/vpn/pki

Sunday, November 12, 2017

Playing audio from Raspberry PI3 to A2DP speaker

Basic steps from Arch Linux wiki, with a small Raspbian specific kludge from StackOverflow:
Create /etc/dbus-1/system.d/pulse.conf:

<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  <policy user="root">
    <allow own="org.pulseaudio.Server"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Manager"/>
  <policy user="pulse">
    <allow own="org.pulseaudio.Server"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Manager"/>
  <policy context="default">
    <deny own="org.pulseaudio.Server"/>
    <deny send_destination="org.bluez"/>
    <deny send_interface="org.bluez.Manager"/>

pulseaudio --start
# bluetoothctl
# power on
# agent on
# default-agent
# scan on
# pair 
# connect 
# scan off
# exit

paplay imperial_march.wav --device=bluez_sink.04_FE_xx_xx_xx_xx

Wednesday, November 1, 2017

Apple Mail.App alternatives

Notes to myself on experiences with alternatives to standard Mac OS email app.

Apple Mail behavior of downloading all messages and their attachments from all remote IMAP folders is unacceptable on a laptop.

- Very high latency on all UI widget operations on a Macbook Air - feels like operating on a remote desktop

Airmail 3
- UI feels quick, but is highly asynchronous. You never know if the view represents the server state.
- Undo operation doesn't really work - Customer service refuses to understand the issue

Sticking with Airmal for now.

Tuesday, October 31, 2017

Hikvision IP camera experiences

I decided to try out a low cost surveillance camera, Hikvision DS-2CD2142FWD-IS.

The good

  • Cheap - you can get 10 of these for the price of a single European brand name camera
  • Surprisingly solid casing
  • Comes with waterproof RJ45 connection kit

The bad

  • Supposed to be web managed - however that is not really the case
    • Management "Web pages" rely on a proprietary browser plugin for essential parts of the configuration
    • Cannot see a live view - must manually open a dedicated app to see video
    • Cannot play back on-device recordings
    • Cannot download images captured on the device micro sd
    • Cannot draw area of interest for motion detection, video tampering, intrusion detection or line crossing detection
  • Something weird with the DHCP implementation, occasionally picks up a new IP address. No other device or camera in the same network does this

The unknown

  • Robustness and real operating temperature range - winter will tell whether this one will work in the sub -30C temperatures

Saturday, October 28, 2017

Canon CP910 no longer prints over WIFI

When printing from and Android phone, CP910 fails with error message:
Cannot read data from memory card!
Cannot print incompatible images or memory card not readable
Even though there is no memory card involved at all. Canon PRINT app incorrecly claims the photo was printed succesfully.

I suspect this has to do with Canon CP910 not really understanding progressive JPEG images. Android probably switched from baseline to progressive at some point.

To resolve this, I had to install an image converter app. Then first convert the image from jpg to jpg and then share the converted image to Canon PRINT app for printing.