Palm Pre Emulator on Linux (Networking)

January 2nd, 2010

I updated my Pre emulator to the 1.3.5 SDK, only to notice none of the Internet applications worked. I searched and found one post by a guy on Stack Overflow with an incredibly unhelpful answer of RTFM (which, TFM does not even apply here).

I spent some time and figured it out. So, if you run into this problem, solve it as follows:

Log into your emulator via novacom:

$ novacom -t open tty://

Show the network routes (note the default gateway):

$ ip route show

Edit /etc/resolv.conf and change the line there to the same one as the default gateway.

$ vi /etc/resolv.conf

NB you may need to remount the filesystem as readwrite. I forget if this is the case.

My resolv.conf was 10.0.2.3, when it should have been 10.0.2.2. If you’ve never used vi before, press “i” to begin edit mode, then when you’re done, press the ESC key, and then press “ZZ” (upper case z twice).

You should notice your Pre emulator suddenly has network access again.

 

Getting Rid of X-Lite

December 15th, 2009

At work we use SIP/VoIP, and since I'm the one without a hard phone (e.g., a real phone), I use a soft phone (e.g., software + headset) when I need to make or take a call. I've been using X-Lite for the past few months, which by all outward appearances is a solid, working softphone. However, it's become increasingly annoying to me since it:

  • Likes to forget to make my headset the default audio device
  • Refuses to allow me to use the “Transfer” feature (pay upgrade)
  • Pops up that annoying as hell “Video” window on start
  • Has an ugly interface
  • Sometimes just freezes randomly

I've been trying to find an alternate softphone, and finally seem to have. 3CX Phone seems to work like a charm, doesn't nag me to pay for anything (I don't even think there is a paid version), and lets me easily transfer calls, etc.

We'll see how it goes on call quality, but so far, so good. Eat it, X-Lite.

 

How to use proxycheck

December 7th, 2009

proxycheck is a small program design to (surprise) check for proxies. What's not so clear, however, is how to use it. The default examples are for mail servers, which I guess was the thing to do back in 2004 when the last version was released. However, I need to adapt it for use with pypsd. Here's how to check a host for open proxies in an IRC context:

./proxycheck -c "chat::real.irc" -d real.irc.server.here:6667 -aaaa host.to.check

The chat parameter confused me for awhile until I figured out what it was for. proxycheck takes care of scanning ports and connecting to hosts using a number of methods, but once connected, you need some way to verify a real hit. -d tells proxycheck to try connecting to the supplied host:port, and -c chat:<send>:<watch> tell it to try sending some text and scanning for watch. If it matches, you have a positive hit.

In the case of IRC, the first thing that happens when you connect to an IRC server is a series of notices from the IRCD (at least in hybrid), so watching for “real.irc” (e.g., replace this with part of your ircd's hostname) is good enough.

If you want more verbose output (checking the data stream), don't bother with Wireshark. Just add -vvvv to the command.

Enjoy.

 

Django On-Demand Model Fields

November 19th, 2009

I'm writing an Inventory system for work in my downtime, part to brush up my rusting Django skills, part because we really need one.

We started with a few requirements for what would make a good inventory system to meet our needs, and one of those was that it would be painless to add new types of items and have the ability to customize them. If you know much about Django models, you probably know enough to know that models are typically hard-baked. If you're writing a blog system, you might create a model with fields for Title, Author, Date, Text. Well for us, what if I want Widget X to have a field for Serial Number, and Widget Y to have a field for Firmware?

 

So, Passenger is actually pretty useful

November 9th, 2009

I have to admit, I'd heard of Passenger/mod_rails before, but I only found out yesterday by chance that it also handles WSGI. Since most of any serious work I do is with Python, this caught my attention. Passenger turned out to be simple to setup, and braindead-simple to get running.

I've gone through several iterations of how to run my WSGI, from Apache mod_wsgi to Nginx mod_wsgi to Nginx proxy + CherryPy, and now back to Apache “mod_rails”. As an aside, Nginx mod_wsgi sounds like a good idea, but it isn't. The author has written about this as well, and I encourage you to Google for more information.

One thing to remember when you setup your WSGI app with Passenger is that your passenger_wsgi.py file should be in the directory above your DocumentRoot. So if your docroot is /var/www/my.site/public, put the .py in /var/www/my.site/

I also run two redmines, so this simplifies that as well, since Passenger does rails primarily.

Goodbye, Nginx TCP proxying.

 

Importing Amarok 1.4 statistics into Amarok 2.2

October 25th, 2009

This assumes you use mysql/external:

  • Save your amarok <2.2 database:
mysqldump -uroot -p amarok > amarok.db #adjust for your system
  • Re-import it as database “amarok1”
  • Drop your original amarok database and let Amarok 2.2 otherwise re-create it.
  • Look at amarok.urls.rpath and amarok1.statistics.url to determine the prepending path difference

Execute the following queries:

update amarok1.statistics set url=REPLACE(url,"./", "./mnt/hdd750/"); /* replace "./mnt/hdd750/" with the prepending difference you saw in the earlier step */

insert into amarok.statistics (url,createdate,accessdate,score,rating,playcount,deleted) select id,createdate,accessdate,percentage,rating,playcounter,deleted from amarok1.statistics s1 inner join amarok.urls u2 on(s1.url=u2.rpath);

Preseto, Amarok 2.2 now has your old statistics.

 
Search for Posts
Popular Tags
 
Archives
2010
 
Recent Comments
 
© 2008 Will McGugan.

A technoblog blog, design by Will McGugan