Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - misha

Pages: [1]
Security and Networking / How To Bring Up Wlan0 Via Command-line?
« on: August 21, 2008, 10:35:48 pm »

Thank you for your reply.  Sorry it took me so long to follow up on it -- been rather busy with other adventures.

Unfortunately, I'm unable to tell you exactly which ROM I am using -- the device reports the version as --.-- JP.  It is some Sharp ROM, though, with a 2.4.20 kernel.  I remember flashing this ROM a while ago from a third-party rescue guide.  I can't seem to find the original "genuine" ROM from Sharp anywhere these days -- if you happen to know where I can get it, then I'd be happy to use it instead.

I've had a look at the link you suggested.  First off, qreset seems like it may be useful for me, so here is the output of the commands you ask for (at

online (both stdout and stderr):

Code: [Select]
-rwxrwxr-x    1 root     root        89312 Jan 14  2006 /bin/ps
Processor    : XScale-PXA270 rev 7 (v5l)
BogoMIPS    : 415.33
Features    : swp half thumb fastmult edsp
CPU implementor    : 0x69
CPU architecture: 5TE
CPU variant    : 0x0
CPU part    : 0x411
CPU revision    : 7
Cache type    : undefined 5
Cache clean    : undefined 5
Cache lockdown    : undefined 5
Cache unified    : harvard
I size        : 32768
I assoc        : 32
I line length    : 32
I sets        : 32
D size        : 32768
D assoc        : 32
D line length    : 32
D sets        : 32

Hardware    : SHARP Terrier
Revision    : 0000
Serial        : 0000000000000000
Linux version 2.4.20 (yasui@iwamoto-del) (gcc version 2.95.2 19991024 (release)) #1 Sat, 23 Jun 2007 10:15:37 +0900
==> /var/lock/samba <==
head: /var/lock/samba: Is a directory

==> /var/lock/subsys <==
head: /var/lock/subsys: Is a directory
#local2.*                                                /dev/console
local2.*                                                /tmp/qpe-pppd-log
#local7.*                        /var/log/boot.log
15624 ttya0    SN     0:01 -bash
30738 ttya1    SN     0:01 -bash
12319 ttya1    SN     0:00 bash
12327 ttya1    RN     0:00 ps ax
12328 ttya1    SN     0:00 grep tty
-bash: /dev/ttya0
-bash: /dev/ttya0
-bash: /dev/ttya0
-bash: /dev/ttya0
-bash: /dev/ttya1
-bash: /dev/ttya1
-bash: /dev/ttya1
-bash: /dev/ttya1 /dev/ttya1


Code: [Select]
15624 ttya0    SN     0:01 -bash
30738 ttya1    SN     0:01 -bash
12813 ttya1    SN     0:00 bash
12814 ttya1    RN     0:00 ps ax
12815 ttya1    SN     0:00 grep tty

If it looks like I might benefit from using it, I'm happy to take qreset for a test drive.

Now, for the suggested links.  While it technically does bring up the network through the command line, it does this through qcop, which isn't exactly what I was after.

I was hoping for a sequence of separate commands that would achieve the following:

1) Activate wlan0 (so that it appears in ifconfig)
2) Attempt to associate to an access point
3) Disassociate

The reason I'm after all this is I'm diagnosing a problem with the LAN card.  Sometimes it just doesn't associate.  I'm not sure where the problem is (driver, card, the actual Zaurus), but I have to go through an elaborate witch dance of yanking the card and putting it back in to get things going sometimes.  At other times it works immediately, like a charm.

Dmesg complains of frames being dropped due to them being transmitted prior to association, but this seems to happen regardless of whether or not the card eventually manages to associate successfully.

Looking forward to hearing more about qreset.


Security and Networking / How To Bring Up Wlan0 Via Command-line?
« on: August 09, 2008, 10:26:16 pm »
Hi all,

I've got a Zaurus CL-3200, using AmbiCom WL1100C-CF PCMCIA wireless card.

I'm trying to bring up wlan0 via the command-line (yeah, there's a GUI tool to do it, but I'm curious).  I can connect to the wireless AP at home (sometimes).

I see the card details in dmesg after I insert it into the slot and cardctl status lists the card at socket 0.  It's in suspended mode.  So far so good.

I'm assuming that to get the card up I need to unsuspend it.  cardctl resume prints "ioctl(): Device or resource busy", but I'm assuming that's from the built-in microdrive, which is sitting at socket 1.  cardctl resume 0 doesn't print anything and seems to succeed.  cardctl status shows the card in a suspended state, however.  Can anyone explain why this is so?

At this stage I still can't do anything wireless-related to the card as wlan0 still doesn't exist (it isn't reported by ifconfig).  Ifconfig wlan0 up prints "SIOCSIFFLAGS: No such device".

Can someone fill me in?


Python / Python 2.5.1 And Pyqt For Cacko
« on: February 21, 2008, 08:19:54 am »
Thank you, it works very well.


Python / Pysqlite Ipk?
« on: February 10, 2008, 02:31:25 am »

I've been playing with libsqlite3 and pysqlite2.  I've tried two approaches:

1) Use existing IPK for libsqlite3
2) Build my own

First, let me describe my endeavours with option 1.  I used the IPK from here.  This IPK (and the others I have seen around) don't seem to include pysqlite2, so I decided to cross-compile it myself.  When I was done, and moved everything across to the Zaurus, I wasn't able to run the tests from pysqlite2.  I got this error:

Code: [Select]
ImportError:  /opt/QtPalmtop/lib/python2.4/site-packages/pysqlite2/ undefined symbol: sqlite3_enable_shared_cache
I decided to have a peek at the and see what symbols are there:

Code: [Select]
misha@poseidon:~/Desktop/package$ nm opt/QtPalmtop/lib/ | grep enable_shared_code
The symbol isn't there.   It's not part of the .so that was in the IPK that freizugheit attached to this post, either.  Can someone explain why this symbol missing?  Is it something that's really needed -- I can't seem to run the tests without it.

At this stage, I decided to try option 2.  I built libsqlite3 with:

Code: [Select]
./configure --disable-tcl --disable-readline --host=arm
It wasn't able to pick up my cross-compiler by default, but I was able to modify the output Makefile to point it to the right location.  After moving libsqlite3 libs and includes to the proper location, it all built.  The one thing I found curious is that it built libsqlite3.a and files instead of an .so -- this means it's building as a static library, as opposed to dynamically loaded, right?  I'm not 100% clear on what needs to happen here -- could someone clear it up?

I was able to build pysqlite2 against the libsqlite3.a and deploy it all to the Zaurus.  The tests work partially, hanging after a little while:

Code: [Select]
$ /opt/QtPalmtop/bin/python            
from Python 2.4 (#1, Jan  5 2005, 19:21:20)
[GCC 2.95.1 19990816 (release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysqlite2 import test
>>> test.test()

At this stage it hangs indefinitely.

Can someone suggest what the problem may be here?  Thanks in advance.

Cheers and regards,

PS., did you end up getting this to work?

Python / Application Icon On Qtopia Taskbar
« on: February 01, 2008, 06:48:06 am »
Quote from: Stubear
Have you seen these previous posts?

Possibly these will help?



Thanks...  I'm surprised my initial search of the forums didn't return those.  They are a great help!

Python / Application Icon On Qtopia Taskbar
« on: January 30, 2008, 09:13:32 am »
I've been able to solve my problem.  Unfortunately, the solution required writing more code, so I don't see it as the best option.  For now, though, it will more than suffice.

It seems like a Bash script doesn't quite cut it (no icon gets drawn).  A symlink doesn't work, either (presumably, it's because it doesn't find the required imports, cause they aren't in any of the locations Python searches).

Code: [Select]
#!/usr/bin/env python
This launch script should be placed in /opt/QtPalmtop/bin.  

Chown it to root:qpe and chmod it to 755.

It's required for the application to correctly start up in Qtopia.  Without it,
it doesn't seem possible to launch the app from the main application launcher,
have the application icon appear on the task bar, and keep the entire app
source tree away from /opt/QtPalmtop/bin.

It should be possible to avoid using this script if the application we're
trying to launch is installed into somewhere where Python can find it.  

import traceback
import sys

The location of the log file the launcher will write to.
LOG_FILE = '/home/zaurus/anki_qpe_launcher.txt'

The location of where the source files for AnkiQT Lite reside.
SOURCE_DIR = '/home/zaurus/Documents/python/ankiqpe'

    f = open(LOG_FILE, 'w')
        for i in range(0, len(sys.argv)):
            f.write('sys.argv[%d]: %s\n' % (i, sys.argv[i]))


        import ankiqt_lite_main
    except Exception, e:

Python / Application Icon On Qtopia Taskbar
« on: January 29, 2008, 07:50:10 am »

I'm trying to get my application's icon to get onto the Qtopia taskbar.  I have the following appname.desktop file:

[Desktop Entry]
Comment=Spaced Repetition Software
Display=640x480/144dpi,480x640/144dpi lives in /home/QtPalmtop/bin and contains:

/usr/bin/env PYTHONPATH=/home/QtPalmtop/lib/python2.4 /home/zaurus/Documents/python/

The application icon appears in the main launcher.  If I click it, the application launches, but I don't see the application icon on the task bar (the place where currently open applications are listed).  So if I move away to another application, there is no way to get back to Anki because there is no task bar icon.

Can someone suggest what might be the problem here?

Thanks in advance!

Pages: [1]