Found this out this weekend, my Google Maps was continuously crashing. I was at the hotel, and the wi-fi for the hotel had the screen where it asks you to accept the ToS, or whatever. I never accepted, but was trying Google Maps on my phone, and it kept crashing. I just had to turn off wi-fi and it worked fine again.
Category: Geeky/Programming
Homebrew Mobile Phone?
I have been doing some thinking lately, and more about a "Homebrew Mobile Phone". I look at the iPhone and Windows Mobile Devices, and I wonder how much it would take to get all the parts needed to make a mobile phone and load some software on it. Basically I think the hardest part is getting the Wireless Antenna to work with the Carrier Towers. It would be nice to have a SIM card reader or something for a laptop, or a small USB device that you could plug into your laptop (with SIM card in the USB) and turn your laptop into a cell phone. Or even just build your own cell phone like you can build your own computer right now, load whatever software you want, and have it work with the carriers you choose.
I know Google has Android that they are working on, open source OS for mobiles, but what about hardware. Some quick Google searches brings up a few results, but after digging into it some, it doesn’t look like the projects are actively getting worked on. The one problem is, when you try to get some open homebrew mobile, all the hardcores just want to use Linux. Well, I want to put whatever I want on it, not just Linux.
A cell phone is just hardware, software, and some extra stuff to get it to communicate with the towers, I wonder why it isn’t more widespread that there are homebrew projects going on. If you listen to Walt Mossbergs video on how we should have a more open phone hardware to carrier relationship, it is spot on. I do wish I had more hardware experience, beyond basic soldering, maybe I would go ahead and start this project.
C# 3.0 and .NET 3.5 are out and ready for consumption, and I have been using some of the new features. One of the new features, Extension Methods, is really cool and can help you consolidate and reuse your code in a logical manner. Take for example, System.Data.DataSet – there is always something I do when getting a DataSet back. Check if it isnull and check if the table in the [0] index has more than zero rows.
Now, you end up having all these if statements to check this every time you get a DataSet back. Something like this:
DataSet myDataset;
myDataset= _database.ExecuteDataSet(dbCommand);
if(myDataset != null && myDataset.Tables[0].Rows.Count > 0)
{
…
}
Now, in previous versions of .NET, you could make a method in a Core library you have, or whatever and pass in the dataset and pass back a bool if that dataset met that condition. What you can do now is this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace SteveNovoselac.MyCoreLib.Common.Extensions
{
public static class DataExtensions
{
public static bool IsEmpty(this DataSet d)
{
if (d != null && d.Tables[0].Rows.Count > 0)
{
return false;
}
else
{
return true;
}
}
}
}
You can see, I created a class called DataExtensions. I have a method "IsEmpty()" that takes "this DataSet d" (this makes it an extension method for DataSet)
Now, in my code I can do this:
if(myDataset.IsEmpty())
{
…
}
Awesome! Next time I will go over Automatic Properties and the pros/cons in them.
So, after I upgraded to 1.1.3 Firmware on my iPhone, I tested everything. Everything works as planned, even my voicemail works great (not visual VM, but when I hit VM when on a diff carrier it actually goes to my VM!)
But, one issue I saw: "You must first connect to iTunes with an Internet connection to enable Youtube" when I tried to use YouTube
To fix: go to Installer.App, add a source "i.unlock.no" , let it refresh, then install the YouTube Activation Fix. Restart your iPhone and it works! Brilliant!
The other day I blogged about getting Cisco VPN to stay connect in Vista. The fix was a constant ping. It is all good but then you have this CMD window open all day in your taskbar, just taking up space, etc.
I decided to workaround it.
I created a .vbs (Visual Basic Script) called pingserver.vbs and put this in it:
Set WshShell = WScript.CreateObject("WScript.Shell")
cmd = "ping servername -t"
Return = WshShell.Run(cmd, 0, True)
set WshShell = Nothing
(replace servername with your name of the server you want to constant ping)
Then in Cisco VPN. Options Menu->Application Launcher. Check "enable" and browse to your VBS. Then when you connect it will run that VBS file, and you will have a hidden constant ping going to your server. Nice..
I tried this http://cre.ations.net/blog/post/the-113-soft-upgrade-jailbreak-faq but for whatever reason it thinks my phone isn’t 1.1.1 and jailbroken, so I had to find another way.
found this: http://modmyifone.com/wiki/index.php/OsX113devjailbreak
but I am 1.1.1, so need to update to 1.1.2, so I followed this tutorial http://modmyifone.com/wiki/index.php/Getting_Started_iPhone_Modding_OS_X_current_3
Worked great .. well wait, at the end my phone was stuck in restore mode. Doh. What to do? Well, try to restore 1.1.2 again I suppose, probably going down debacle road here.. we will see..well I decided to restore back 1.1.1 (http://modmyifone.com/wiki/index.php/Getting_Started_iPhone_Modding_OS_X_current) first, then go back to 1.1.2 again..
Unlocked 1.1.1 again using the same method I did before (the prefs, but did the jailbreakme.com stuff)
I restored to 1.1.2 then, and it was at emergency screen. I decided to use independence 1.1.3 beta to active/jailbreak 1.1.2 for me, so now I am there, not unlocked yet. I need to get Installer.app on there manually here (http://rapidshare.com/files/87105691/Installer.zip.html)
I then decided to unlock using AnySim 1.2.1u before trying 1.1.3 (maybe just so I could check my text messages in between upgrades? :)) Didn’t work. Forgot to turn on airplane mode. Restored back 1.1.1, then to 1.1.2, but this time I used independence to get it out of restore mode at the end (the tutorial above doesn’t say that – so the first time I did it, I figured I messed up or something! Doh!)
Now, lets unlock this baby using AnySim 1.2.1u (http://modmyifone.com/wiki/index.php/Unlock_the_iPhone_1.1.2_Upgrade) – remembering airplane mode!!!
Ok that worked, now I am on 1.1.2, unlocked, jailbroken, ready to go to 1.1.3..(http://www.modmyifone.com/forums/showthread.php?t=27648)
After it running for an hour, then a black screen for a while, I decided to reboot, and BOOM 1.1.3! I love the web clips, I put Facebook, Google Reader and Meebo on the home screen, as well as installed the Contacts Icon app through installer.app (since I am running 1.1.3, jailbroken, and unlocked (T-Mobile))
Whew..I am sure I missed some thing in between here, but I kind of "live blogged" it 🙂
The Google Maps locate map feature doesn’t work by default (known issue when upgrading/unlocking) So I am installing Navizon to try that, I guess it fixes Google Maps (http://repo.navizon.com to sources in Installer.app)
Ok, so I wasn’t sure about this, but tried. it.
Create a batch file with this in it and execute:
@echo off
reg delete HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateVistaSp1 /f > NUL 2>&1
reg delete HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionWindowsUpdateVistaSP1 /f > NUL 2>&1
reg add HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateVistaSp1 /v Beta1 /t REG_SZ /d dcf99ef8-d784-414e-b411-81a910d2761d /f
IF NOT %errorlevel% == 0 ( goto ERROR)
:SUCCESS
@echo.
echo ===========================================================
echo Windows Vista SP1 registry key has been set successfully.
echo Please check for updates in Windows Update.
echo ===========================================================
@echo.
goto END
:ERROR
@echo.
echo ===========================================================
echo FAILED to set Windows Vista SP1 registry keys.
echo Please run this script by right clicking and selecting
echo "Run as Administrator".
echo ===========================================================
@echo.
goto END
:END
pause
Then run windows update. I had to install and reboot twice with two updates first before I got the SP1 download. In Windows Update it says it is the RC1 version, but after install my build is 6001.18000.x86fre.longhorn_rtm.080118-1840
which I have read in various forums is the RTM version that matches Windows Server 2008 RTM
Works for me. If it isn’t RTM, I will just update when it comes out.
"A boy asked his mother how come she cuts off the edges of a pot roast when putting it into the pot. Mother told him that that’s how her mother taught her to do. So, boy went to his grandmother and he got the same answer. Then he went to his grand-grandmother and ask her the same question. The answer was: Well, back then my pot was to small and the meat didn’t fit inside." – Steve Maguire’s book Debugging the Development Process.
Sort of playing off my last post
IT and Development Best Practice: Just Because You Can Doesn’t Mean You Should..
You shouldn’t be afraid to as "Why are we doing this again?" Usually in business and IT/Development the answer is: "That is the way it was when I got here, so we just kept doing it that way." Now I am not saying that every practice and procedure in place is bad or wrong, what I am saying is that you should not be afraid to ask why a certain thing is done the way it is done.
"Why are we using batch files to do XYZ?" – now we can use VBS/C#/PowerShell/One Line CMD, etc
"Why are we using MS Access as a backend?" – now we can use SQL2005!
"Why do we have 18 steps to get something approved?" – now we can streamline it and speed up everything!
"Why am I doing more documentation than programming?" – documentation goes out of date 2 minutes after it is completed, let’s self-document our code with unit tests!
"Why do I spend more time in meetings that actually working?" – do you really need to be in all those meetings? Can it be solved without a meeting? Via Email? Phone? Small face to face talk?
and the list keeps going, but you get the idea…
Always question "Why?" and sometimes you will see that things are just being done because that is the way it has always been. Don’t be afraid to change things when you do see they need to be as well. Like it is always said – "there is always room for improvement"
If you are using the Cisco VPN Client on Vista (if you can even get it installed, you need one of the latest versions) Then you probably have ran into connection issues. "Connection Reset By Peer" or "Failed to Enable Virtual Adapter" or "User Authentication Failed" etc etc. I recently redid my Vista box and was just having major issues with the Cisco VPN Client. It would connect for 3 minutes, disconnect. 8 minutes, disconnect. 2 Hours, disconnect. I couldn’t stay connected for any period of time. A possible fix?
Set up a constant ping. To a server or device on the network you are connecting to. I have been connected non-stop for 2-3 days now without issue. This was just not happening before.
start->run->cmd> ping <ip or server name> -t
and just let it run in the background, it seems to keep the VPN Client connected!
I usually buy domain names when I think of something cool and it is available. (ilovetotsinpdx.com anyone?). The easiest way to find domains the "Web 2.0" way is using this cool AJAX’y interface to search open domains.
http://instantdomainsearch.com
Makes it fun and easy! BTW I do use http://www.active-domain.com for my DNS/domain registrar and I use http://hostmysite.com for all my hosting. Why? Just because I found it easiest 🙂