Monday, June 8, 2015

Fixing buzzing H19txt bluetooth earpiece

After a year or so of using my H19txt, it started buzzing like something was on the speaker. I thought the speaker may have either been torn, or my ear hair was poking into the speaker.

After a little testing, I determined that my ear hair was definitely not poking into the speaker. So I decided to peel off the speaker grille. There wasn't much to lose at this point if I broke it. Luckily, it was attached with foam tape. Here's a picture of the earpiece with the grille removed.
You can see the black double-sided foam tape on the back of the speaker grille. There is a bunch of pocket lint, skin cells, and maybe even some ear wax built up on the screen over the speaker. Since I had a microscope handy, I took a picture of it.
After a little cleaning, the screen looks better.
Amazingly, after pressing the grille back on, the buzzing sound was gone.

I also went through the menu and turned off the voice interface. (To get to the menu, hold the call button down as you open the flip.) So now when I turn it on, it just beeps instead of saying "Phone one connected . . . More than eight hours of talk time." If I get a call and it's in my pocket, I can open the flip and put it on my ear and start talking sooner instead of waiting for it to get done saying "phone one connected".


Wednesday, May 20, 2015

Dude, Where's my PC?

If you've ever had a PC or laptop stolen, lost, or knew someone who had that happen to them and wished there was an easy way to track it down, this may help.

It will work on Windows systems if you install Linux as a dual-boot option. It will default boot to Linux. Password protect Windows so that the "user" is forced to only use the Linux OS. You can have Linux boot without requiring a password login. This will keep the new "user" busy while your computer is phoning home. Just don't write the super-user password down on your computer.

If you have the public IP address, you can get a close physical location, but probably not close enough to matter. However, if you also have a list of the nearby wifi networks and signal strengths, you can pinpoint the location pretty accurately if you know some trigonometry. See? This is one good reason to pay attention in math class.

It may take some roaming around from the IP address's stated location before you find one of the networks, but in theory it should be possible to locate the missing PC. 

Here are the steps.

1. Backup your PC. You know, just in case you accidentally have it install Linux by erasing your Windows installation.

2. Install a linux operating system if you don't have one already. Choose dual-boot if you wish to keep Windows.

Prevent the new "user" from easily re-installing the operating system:

3. In BIOS, set the boot order to boot to the hard drive only.

4. Password protect BIOS so step #1 can't be changed without the password. 

5. If you'd like to be able to remotely log-in to the PC if you knew its IP address, install openssh-server.
sudo apt-get install openssh-server

6. Enable your PC to email you by setting up mail:
   sudo apt-get install ssmtp
   sudo apt-get install mailutils
If you have gmail, you have to change your google account setting to allow access from less secure apps, otherwise it will block your PC's login attempt. If you forget to do this, you'll get an email that will tell you that google blocked a login attempt.

7. Edit the mail configuration file
sudo gedit /etc/ssmtp/ssmtp.conf

# Example file /etc/ssmtp/ssmtp.conf ---------------------------------------------------
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=your.email.address@gmail.com

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587
AuthUser=your.email.address@gmail.com
AuthPass=your.gmail.password
UseTLS=YES
UseSTARTTLS=YES
# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
hostname=gmail.com

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
# end of file --------------------------------------------------------------------------------------------

8. Change permissions on the email config file so that a non-superuser can't view its contents. We want to hide the ssmtp.conf file from non-superusers because it contains the password for your email.
sudo chmod 600 /etc/ssmtp/ssmtp.conf

9. Install curl so we can get the public IP address the computer is using.
sudo apt-get install curl

10. Create a script. We'll show you an example in a bit. In order to run every day that the PC is powered on, copy your script to the directory: /etc/cron.daily/
Make sure the name of your script does not have an extension, or else it won't run. If you name it checkin.sh, thinking it'll work because some shell scripts end in .sh and it even runs from the command line, it still won't run automatically.

Here's an example script that will email you the public IP address and the surrounding wifi network names and signal strengths.


#!/bin/bash
#
# Get public IP address and save it in ~/.locality at the end of the file.
# Save only the IP address to the file, and error output to the bit bucket.
curl ident.me > ~/.locality 2>>/dev/null

# Get the location of the ip address that's saved in the file .locality and dump the error in the bit bucket.
curl ipinfo.io/<~/.locality >> ~/.locality 2>>/dev/null

# Check if I'm superuser. It should be, if it runs automatically.
if [[ $(id -u) -eq 0 ]]; then
echo "" >> ~/.locality
echo "Superuser" >> ~/.locality
echo "" >> ~/.locality
else
echo "" >> ~/.locality
echo "Regular user" >> ~/.locality
echo "" >> ~/.locality
fi

# Scan for wireless networks and save to the same file. Send errors to the bit bucket.
# must be superuser to run this command.
iw dev wlan0 scan >> ~/.locality 2>>/dev/null

# Email
# Subject
SUBJECT="My PC location"
# To
TO_EMAIL="your.email.address@gmail.com"
# Message
# Sending email using /bin/mail
mail -s "$SUBJECT" "$TO_EMAIL" < ~/.locality
# Delete the .locality file.
rm ~/.locality 
# end of script checkin ---------------------------------------------------------


11. Hide the contents of your script from regular users, but allow them to run it, because, you know, another email confirmation is great.
sudo chmod 711 /etc/cron.daily/checkin

Additional Information

How to find the public IP address from the command line:
xmodulo.com/how-to-find-the-public-ip-address-from-command-line.html

How to find the geographic location of the ip address
Use curl ipinfo.io/[ip address] (from xmodulo.com/geographic-location-ip-address-command-line.html)

How to scan nearby wireless networks from the command line:
xmodulo.com/manage-wifi-connection-command-line.html

How to send email from a script:
http://linuxconfig.net/manual-howto/sending-mail-from-bash-script.html

I'll bet some experts out there can improve on this. If you have any great ideas, leave a comment!

Saturday, March 7, 2015

How to install the Nvidia 346.35 driver for a GTX 960 video card on Linux Mint 17.1

It took several tries and research on the internet to figure out how to get the driver loaded. After crashing Cinnamon a couple times, I figured out how to get it to install without crashing and everything seemed to work right. Since I had such a difficult time figuring out the correct way to install the driver, I'm creating this guide in case it can benefit someone else.
Click here for a more recent tutorial on installing version 352.63 on Linux Mint 17.3.

System build specs
Motherboard: Biostar A960G+
Video card: EVGA GeForce GTX 960 video card
Ram: Corsair 8GB DDR3 CML8GX3M2A1600C9
Processor: AMD FX-6300

Installation procedure
I followed these steps exactly and it worked without crashing anything.

1. Print out these instructions. Read through them before doing anything so you understand the procedure. It's helpful to understand what you're doing, instead of just typing a command because someone said to do it.
2. Backup your system, unless you're starting from a fresh install, like I did. I installed Linux Mint 17.1 from a DVD that I burned.
3. Then I installed the updates, so the system was up to date. I updated it before attempting to install the video driver.
4. Download the Nvidia 346.35 driver for Linux.
5. (Optional) Make a backup copy of grub.cfg in case you need to revert back. Open a terminal, and type the following:
    cd /boot/grub
    sudo cp -p grub.cfg grub.cfg.original
6. (Optional) Backup grub
    cd /etc/default
    sudo cp -p grub grub.original
7. Since the driver installation requires that we boot into a terminal instead of the GUI, we need to change that, temporarily. We need to make two changes to the file /etc/default/grub, with gedit, running it as super user:
    sudo gedit grub
    Add the word text so that the following line looks like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"
    The next item is important, otherwise, you'll get a black screen instead of booting to terminal.
    Uncomment the following line (remove the #)
    GRUB_TERMINAL=console
If you don't uncomment that line, you'll get a black screen instead of a terminal. Not fun.
8. Save and exit gedit.
9. Re-build grub.cfg by running the command
    sudo update-grub
10. We're still in the GUI now, but after we reboot, it should go straight to a terminal instead of launching the GUI.  Reboot now by going through the normal turn-off procedure
11. When the computer turns back on, it should be in the terminal window, asking for login. Type your user name, hit enter, then enter your password. If you got a black screen, you probably didn't uncomment the correct line in step 7. 
12. You should be at the command prompt now. I assume you downloaded the Nvidia driver to your downloads directory. We'll go there now. 
    cd Downloads
13. Run the installation driver by typing:
    sudo sh NVIDIA-Linux-x86_64-346.35.run
Say yes to everything. It said a pre-install script failed, but I continued installation anyway.
14. After installation completes, don't reboot yet. We still have to fix grub so it doesn't boot to a terminal again. We'll use the pico editor since we're not in the GUI.
    cd /etc/default
    sudo pico grub
Remove the word text so the line is back to how it was before:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
You should probably leave this line uncommented:
   GRUB_TERMINAL=console
15. Save the file and exit pico. So in the future, if you hit ctrl-alt-F1, you should get a terminal. If you comment the above line again, it just goes to a black screen. To get back to the GUI, hit ctrl-alt-F7 or ctrl-alt-F8, but don't do that now since we're not in the GUI yet. 
16. Now we need to rebuild grub.cfg with the following command:
    sudo update-grub
17. Shutdown the computer with the following command line:
sudo shutdown -h now
18. Turn the computer on, and it should boot up normally, into the GUI with the Nvidia driver. But it doesn't list it in System Settings / Device Drivers. 

Leave a comment if this helped you.
Thanks.

Sunday, January 4, 2015

Bleeding the ABS unit on a 1996 Ford Thunderbird


Vehicle

1996 Ford Thunderbird LX 3.8L
It has the Teves MK IV ABS system with traction control.

 

Symptoms

I've been having a problem with my brakes for a few years now. The rear brakes don't have enough braking power. When I took my car in for safety inspection, the brake bias was way too far forward, meaning the fronts did most of the braking, and the rears barely did anything.

The other problem was that if I pressed hard on the brake pedal, I could get it to go all the way to the floor. If I did a panic stop, I could almost get the wheels to lock up on dry pavement, but this would require lots of pressure on the brake pedal. I was worried that I would have to press too hard in an emergency situation.

 

Attempt 1

So I replaced the master cylinder and bled the brake system. That didn't help at all. I was considering replacing the proportioning valve, but didn't because I suspected air in the ABS unit because of the excessive pedal travel.

I activated the traction control while bleeding the brakes. I activated the ABS in the snow, then bled the brakes. I bled the brakes again. Nothing helped.

 

Research

So I turned to the internet and the service manual. Both sources said that I needed to get my hands on a T90P-50-ALA tool. I didn't have the $300 that they wanted for one on ebay. So I found some wiring diagrams and a pin-out diagram. These were really helpful, but I still made a couple mistakes along the way. Hopefully you don't repeat my mistakes.


 

Attempt 2

This was a near disaster. I blew a fuse trying to hook up power to the ABS valves. I was connecting to the wrong end of connector C-104. Basically, I connected power to pins 3 and 33 of the ABS module without the ABS relay being activated. When the main ABS relay is not activated, it connects pins 3 and 33 to ground. Connecting power to ground is not a good thing. Something had to melt. It's a good thing there was a fuse between the battery and my connection to ground. 

After recovering from that mistake, I thought you run the pump with all the valves activated. Well, that made the ABS motor make an awful sound. I hope I didn't damage it. After putting it all back together, it still wasn't fixed. I was not having a successful day.

The ABS module is located in front of the front wheel on the driver's side. Here's a picture with the inner fender removed and the wiring harness detached.


 

More Research

Then I took a look at the hydraulic diagram. I realized my mistake. By closing the inlet valves, I blocked the path of the brake fluid from the pump, preventing it from circulating. (See dead head definition.) If I activated only the outlet valve, then the motor could circulate brake fluid, leaving the air bubbles in the reservoir. The inlet valves are normally open, while the outlet valves are normally closed. When you activate either valve, you change the state (open to closed, or vice-versa). Activating the valve is done by grounding the appropriate pin on the connector to the ABS module. 

This is an ABS diagram similar to my Thunderbird, but it doesn't have the traction control valves in the diagram.


 

Attempt 3

Here's the approximate procedure I used to bleed the ABS unit on my Thunderbird without the help of the T90P-50-ALA tool.

  1. Remove the front driver's side wheel, remembering to implement all safety precautions.
  2. Remove the inner fender.
  3. Disconnect the wiring harness from the ABS control module. You pull on the metal clip and rotate it up to the top. Then lift the connector to remove it from the module.
  4. Ground pin 34 to activate the main relay. This makes power available to the valves.
  5. Ground pin 15 for twenty seconds to run the ABS motor.
  6. Ground pins 2, 21, 36, and 18 to activate each wheel's outlet valves, one at a time while the ABS motor is running. Don't run the motor for more than 60 seconds. Maybe run each valve for 5 seconds each.
  7. I'm not sure if you're done at this point if you have traction control. But here's what I did next.
  8. I hadn't found a hydraulic diagram for the traction control part yet, so I opened both rear dump valves (pins 18 and 36) with the ABS motor running while I activated pins 37 and 40, one at a time to run fluid through the traction control part.
I was really hoping this worked. Unfortunately, it is mostly the same. But it was enough to get it to barely pass the brake skid-pad test at inspection.






 

More Research

I found this diagram on the internet. It looks like this is the traction control version for FWD (still not my RWD version, but maybe close enough to figure it out).
 
 
Only the outlet valves are normally closed. The inlet valves and the two special valves for the traction control are normally open.
When the traction control is activated, the special valves close to prevent the ABS unit from applying pressure to the  front brakes.

I'll probably have to work on this again to pass the next annual inspection. So here are the next two possible solutions I'm going to try.


Bleed one-way valves

Activate both traction control valves and dump valves for the back wheels while pressing on the brake pedal to bleed through the one-way valves.

Close the inlet valve and compress the caliper piston to bleed each one-way valve on the inlet valves. Do this for each wheel.


Bleed pressure relief valves

Activate both traction control valves and the ABS pump.

Hopefully this fixes it. I don't see a way for the $300 bleeder tool to bleed the one-way valves if there's any air stuck in them. So I don't see a point in spending the extra money if there's a chance it won't solve my problem. Inspection is coming up, so if the brakes don't pass this month, I'll be updating this post soon.