Saturday, September 13, 2014

Samsung Galaxy S3 LTE and VOIP Microphone Issue

I heard about FreedomPOP from my brother, basically you get 200 minutes, 500 Texts and 500MB data free each month. They use the Sprint network and support 3G & LTE. The way it works is everything goes over the data connection. Calls are routed over VOIP and texts are about the same. This actually works really good for me as I get basically no service at home on Verizon or Sprint, but I have good WiFi. It will route over any available internet connection, so you could even use it overseas (on WiFi). There are some issues I can't resolve ATM. Here's What I've run into so far:

I'm running a SlimKAT 7.0 on a Samsung Galaxy S3 (Sprint), so these may or may not work for you. I TAKE NO RESPONSIBILITY IF YOU BRICK OR DAMAGE YOUR DEVICE!

Problem 1 - No LTE

No LTE, 3g works fine, but when you get an LTE Connection you don't get an IP. This is an APN problem. LTE Works fine on stock, but not on SlimKAT / CM11 (tested).

Solution:  You have to activate on stock (you should have a nandroid right?). After you've got everything working on stock you have to backup your APN list, then flash your custom ROM.
Next you have to restore your APN list, reboot and LTE will work! Unfortunately it's harder to do than it seems. an unprivileged app can no longer write to the APN list. So here's my solution (you may or may not need to do this on stock to read them):

  1. Make sure your phone is rooted (and has supersu or something on it)
  2. Install APN Backup and Restore from the Play Store.
  3. Install ES File Explorer File Manager from the Play Store.
  4. Launch ES File Explorer and in the setting enable "Root Explorer"
  5. Navigate to "/data/app" and long press and "cut" "com.riteshsahu.APNBackupRestore-1.apk"
  6. Navigate to "/system/priv-app" and paste the apk file there. 
  7. Long press on the apk and hit properties. Permissions should be "rw-r--r--" Owner and Group should both be "root"
  8. Reboot
  9. Open APN Backup and Restore, close the ICS warning, hit menu, then disable ICS checking.
  10. Now you can backup and restore your APN's

Notes:

  • If you're restoring you may want to make a backup, delete the APN's that came with your ROM, then restore the stock ones. 
  • You may need to find and move the stock file with ES File Exporer if it didn't save to "/storage/emulated/0/ApnBackupRestore". 
  • I don't recall where it saved them on stock, but you may want to find it and make sure it's not going to get deleted when you flash. 
  • Reboot when you're done.

 Problem 2 - VOIP Apps use top microphone

I fought with this for quite a while, in the freedompop messaging app I could turn on various settings and it would work until they updated the app, then it would require a different set of options. I thought it was a freedompop problem until I started playing with the new Google Hangouts. It only used the top microphone, and there were no options to fix it.

Solution: It's a build.prop issue.
  1. Install Build Prop Editor From the play store. (or use whatever method you want)
  2. Change "persist.audio.handset.mic" from "digital" to "analog"
  3. Reboot 
Note: I removed some lines in "/etc/audio_policy.conf" related to VOIP before finding the build.prop issue and it didn't fix it. But it may have changed things, I'm looking into this.
UPDATE: Just confirmed from my brother - the build.prop edit fixes the problem.

Problem 3 - Amazon Music Won't Play Downloaded Prime Songs

Symptoms: Streams Prime music fine, plays music I've bought and downloaded, plays MP3's from the phone fine, crashes when trying to play Prime Music I've downloaded.

No solution so far.

Monday, May 26, 2014

Adventures in 3d printing Or "I Finally Built a RepRap!"

I've wanted a 3d printer for quite some time. A few years ago I stared building one that, to say the least, was poorly engineered and under constructed. It never actually worked at all. Some of the designs could have worked, especially in a large CNC machine, but were just not a good fit for a small 3d printer. I've been eyeing the RepRap i3 models for a while now, last week I bought a kit (less electronics).

RepRap i3 with cooling fans and filament spool.
Note spool is on backwards to allow for the sloped ceiling in my lab.


Assembly was quite straightforward, there is a partial guide, though it skips (or I missed) some key steps.

A few tips:

  • Final alignment of the XZ (vertical) frame should be done after assembly. Just line it up so the extruder will reach the front and back of the Y frame and is square.
  • I printed thumbnuts to fine tune the bed leveling, it makes it really easy to get it spot on. I used these "Easy Heated Bed Leveling Thumbnuts"
  • The Z axis endstop was a pain, part of it was I used the wrong mount, but I printed this "Adjustable Z-Axis Endstop Arm" to make it easier

Fire in the Hole!

Everything I (and probably everyone else) build has some "teething" issues. I had (and am still having) a few. After I got it set up fairly good I started a print and it seemed to be working nicely, then the Sanguinololou literally caught fire (there were flames). The bug list for the Sanguinololou says the traces for the heated bed are too small, so I had reinforced them with wires before this point, it was the wires that caught fire. Turns out the mosFET shorted and the bed just stayed on continuously drawing ~16A. I salvaged the board and put a new mosFET (all I had on hand was a 12A logic level one) put it back together, set it to pwm at 50% and it lasted about 30 seconds before shorting too (I was watching this time). I swapped it again, added a reverse diode and ran it through an automotive relay (so the mosFET turns the relay on and off). That works really good.

Electronics, complete with rats nest

Now that the fires were out It was time to try some real prints. The filament won't stick to the bed. No matter what I do it won't stick. I tried cleaning really well, nope. gluestick helped, allowed me to print the upgrades I mentioned, but was hit or miss. I researched, tweaked settings, spent the better part of a day on it. Finally my brother was over and (looking on his tablet) said "they say here that Reprapper brand glossy black PLA won't stick to glass, use blue tape". Yep, I had Reprapper brand glossy black PLA filament, and yes, it sticks really well to blue tape.

A Sheep! Here's the first print that I took a picture of.

A few remain

Now I can print, I've still got a few issues left, mostly "dialing in" problems.

  • Overhangs and bridging don't work quite right. I've been lowering the extrusion temperature and it really helps. I started at 200C and am down to 180C for the first layer and 175C after that. A box fan after ~5 layers helps even more.
  • I printed some large parts and they warped, pulling the blue tape off the glass. The cooling fan bracket printed really nice with the 182C/177C and bed at 35C settings. this might be licked, but can't say yet. 
  • The first layer of big parts will bunch up a bit during infill, leaving stuff sticking up that can catch the extruder. If it gets 3 layers or so it will bury the problem and will complete fine. I might still be a touch close on my z-axis start point or it might be something else.

Future plans

  • Upgrade to optical endstop for Z-axis. It should be considerably more repeatable than a mechanical endstop, so I think it would be a big improvement. The X and Y axis are not nearly as critical, so I don't see any need to change those endstops.
  • Upgrade the electronics so I don't need a computer hooked to it and add cooling fan support. I've got several options: MosFET board and sd adapter, MosFET board and android tablet, Panelolou (includes Mosfets on the interface board and SD on the panel). I'm leaning toward the tablet option. The software looks really cool. I need to try it sometime.
UPDATE: I printed a bracket to mount some 40mm cooling fans, but all my small fans are 50mm, so I printed a 50mm bracket. Seems I chose one bad fan (rattles) so I'll have to replace that at some point. It makes a huge difference. I'll do another post on integrating it with the electronics.

Links

http://www.thingiverse.com/thing:208137 - thumbscrews
http://www.thingiverse.com/thing:267927 - Z-Axis Endstop Arm

Sunday, March 2, 2014

1997 Dodge Dakota PCM Repair

My transportation situation in 2014 has started out bad. My car decided it doesn't want to run when on pavement anymore (works fine in the driveway). I'd been two weeks trying to fix it (along with working a 50hrs/week and studying for CS50x) when my truck started stalling randomly. The first time I was pulling out of the driveway on the way to work, it cranked for a minute then started and ran fine. The second time (same day) I was driving through town on my way home from work and it just started coasting. Fortunately it re-started just as I was preparing to coast onto the shoulder. I got home and pulled the codes.

Diagnosis

  • P0320 - Crankshaft Position Sensor
  • P0351 - Ignition coil A
I know I pinched the CPS wires when I put the transmission back in, I just hadn't got around to replacing it. I searched for P0351 and it seems it's usually not the coil, but the PCM failing. I also found that there is a header in the PCM that can cause stalling problems. It's on the voltage regulator board.

I replaced the CPS and coil just to be on the safe side. Then started it up and wiggled the wires at the PCM. The center (white) connector would cause it to skip. So I pulled the PCM and re-soldered the header (see links).

Repair

What a pain that was! it's mounted to a aluminum plate that sucks the heat out of the connector. I ended up with a hot air rework gun at 300C and my soldering iron at 400C. It barely melted the solder, even after heating it for a few minutes! If I do this again I'll put it on my BGA rework pre-heater (electric griddle) and heat the whole board up!

1997 Dodge PCM Voltage Regulator Daughter Board?


Anyway, I reassembled the PCM and sprayed all the connectors with De-oxit. Wiggling the wires no longer has any effect on the engine. At least I'm (hopefully) back to one driveable vehicle. If I have to I'll try to pull the board under the potting and re-solder that too, but for now it seems to be working again.

UPDATE: It worked for a while, but started acting up again. I bought a used one off ebay and the truck has run great ever since. I pulled the main board out of the case and started cleaning the goo off it, I think it's the connectors where the harness plugs in, but that's as far as I've got.

Links

CS50x

Late last year I signed up for CS50x from Harvardx on EDUx.

So far it's an interesting course. When I signed up I thought we only had 12 weeks to complete it, but it turns out we have an entire year. Which is great because I started a full-time job three days after CS50x started! I've been putting off writing about it, but I want to get started. My progress is slow, as I'm working 50+hrs/week and trying to keep up with everything else (car broke down the first week, then the truck, you get the picture).

I'm going to do a post on each Problem Set, and try to describe and explain the issues I ran into and how I solved them, without violating the cs50x policy of course (no complete solutions will be available here). Remember, I'm new at this, so my solution may not be the most efficient nor elegant by any means. But it should work.

Overview

The lectures have a lively feel to them and are available in many formats, I have been streaming the videos from the courseware page and occasionally downloading the mp3's to listen to on the way to work.

The shorts are really cool 5-10min explanations of things related to the course. Did you know that in ASCII to change from capital to lower case (and vise versa) only one bit changes? Yep, it was in a short.

The appliance is a virtual machine running Linux with a selection of tools to help you. I used virtualbox under Arch Linux, but it runs on Windows, Linux and Mac. It could be really slow on old or low-powered systems. it's a bit slow on my HTPC, but OK on my laptop. It took a while to get everything running smoothly, but that was mostly vitrualbox issues rather than appliance problems.

The problem sets start easy (scratch) and get harder really fast, but it's supposed to be a challenge right? There is a standard edition and a hacker edition, only the standard counts toward completing the course, so I've concentrated on them. I'll go back and do the hackers as time permits (or when I'm procrastinating on the final project).

The final project is a dilemma for me, so far all the ideas I've had fit one of these categories: too simple, too complicated, already been done, or not sufficiently interesting to me. Hopefully I'll come up with a good idea before I'm through with problem sets.

Links

http://www.reddit.com/r/cs50/
https://www.edx.org/course/harvardx/harvardx-cs50x-introduction-computer-1022