HP LaserJet Pro M1212nf MFP Scanner on Ubuntu

c02938893

If you’re able to print using the HP Printer above but unable to use its scanner with your Ubuntu 16.04 LTS, then you’d have to install hplip and run this command to install the latest proprietary software:

$~ sudo apt-get install hplip hplip-gui -y
$~ /usr/bin/hp-diagnose_plugin # Follow Instructions

After that, reboot eventually and use Simple Scan GUI to scan your documents.

Sony Xperia Z3 Tethering Error after Update to Android 6.0.1

Once you update your Sony Xperia Z3 to Android 6.0.1, Tethering might break.

sony-xperia-z3-compact

It has to do with something related to Operator APN and DNS resolution. The update forces APN resolution to succeed before activation. It’s amongts new tactics of Telecom operators tyranny. Anyway:

  • Enable Development mode on your Smartphone (CGo to Settings -> Phone Details -> Click several times on Build Number)
  • On your Ubuntu 16.04, install Android SKD along with ADB and fastboot (sudo apt install android-tools-adb android-tools-fastboot -y) (ref: https://www.linuxbabe.com/ubuntu/how-to-install-adb-fastboot-ubuntu-16-04-16-10-14-04)
  • Start an adb shell by typing the following command: adb shell
  • At the adb shell prompt, run this command: settings put global tether_dun_required 0
  • hanine @col in /opt/android-studio/bin (13 entries, 0 hidden)
    7 2005 $ adb shell
    shell@D6603:/ $ settings put global tether_dun_required 0
    shell@D6603:/ $ exit
  • Type exit, then disconnect your phone and reboot

Huawei E3531s-2 on Ubuntu 14.04

The BroadBand modem Huawei E3531s-2 on Ubuntu 14.04 does not work out of the box.

Let’s make it work.

  • – Install supervisor:

sudo apt-get install supervisor -y

  • Add a supervisor configuration to a new program: A script we’ell shortly create, In /etc/supervisor/conf.d/broadband.conf

[program:broadband]
command=/usr/bin/broadband
autostart=true
autorestart=true
stderr_logfile=/var/log/broadband_err.log
stdout_logfile=/var/log/broadband_info.log

  • Write a script in /usr/bin/broadband and make it executable.

#!/bin/bash
# Script to enable Mobile Broadband
# Author: (hanynowsky@gmail.com)
WAIT=25
# Huawei E3531s-2
localcon="Meditel2"
connector(){
isBUP=$(nmcli con status | grep -i "${localcon}")
if [ -z "${isBUP}" ];then
echo "Broadband Connection Status is void: ${isBUP}"
nmcli nm wwan on;
sleep 1;
nmcli nm wwan off;
sleep 1;
if [ -n "${isBUP}" ];then
echo "Switching Off connection to ${localcon}"
nmcli con down id "${localcon}";
fi
sleep 1;
echo "Trying to Connect to $localcon"
nmcli con up id "${localcon}";
if [ "$?" -eq 0  ]; then
echo "Connection Established."
fi
sleep 1
fi
#exit 0;
}

while true; do
if [ -n "$(lsusb | grep '12d1:15ce')" ]; then
# This will switch to modem mode : 12d1:15b1
sudo usb_modeswitch -v 12d1 -p 15ce -M '55534243123456780000000000000011062000000100000000000000000000'
echo "Activating modem, please wait ${WAIT} seconds."
notify-send -u normal -a broadband "Connecting Broadband" "Modem $(lsusb | grep -i huawei). \nPlease wait 25 seconds"
sleep $WAIT
fi
isModem=$(lsusb | grep -iE '12d1:15b1|modem on')
if [ -n "${isModem}" ]; then
eval connector
fi
done

  • Change ‘localcon=”Meditel2″‘ to the name of your BroadBand Connection (You should have already configured it using Network Manager Applet)
  • Restart Supervisor.
sudo service supervisor restart

Now everytime, you plug the broadband device, it will get connected through the BroadBand connection configuration you already set up. In our case it’s called “Meditel2”.

Please note that once you plug the device, you have to wait 30 seconds before the connection is established.