jfr doesn't have a personal statement currently.
Gender Not Set
Joined: 29-March 05
Profile Views: 1,673*
Last Seen: 22nd July 2009 - 06:57 PM
Local Time: Apr 25 2017, 02:04 AM
36 posts (0 per day)
* Profile views updated each hour
15 Oct 2007
I thought I'd try out the Python/PyQt/MySQL combination, but I've hit a snag that I can't handle. Any words of wisdom would be very welcome.
The machine is a C3000 with stock ROM.
I installed the Zaurus Python Image v2.4 from pyqplayer.sourceforge.net: files
Python runs fine, as far as I can tell.
For MySQL, I installed
That works fine using the mysql app: as zaurus or root I can create and populate databases. No passwords set yet.
But from python, I can't connect to MySQL. I've created a test database called 'junk' and here's what happens when I try to access it.
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.
>>> import qt
>>> import MySQLdb
>>> ms = MySQLdb.connect(host='localhost',user='zaurus',db='junk',passwd='')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/QtPalmtop/lib/python2.4/site-packages/MySQLdb/__init__.py", line 64, in Connect
return Connection(*args, **kwargs)
File "/home/QtPalmtop/lib/python2.4/site-packages/MySQLdb/connections.py", line 109, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
The MySQL daemon is running (or the mysql app wouldn't have worked). The directory
There are no error reports in dmesg.
Running as root gives the same error.
I'm totally new to Python, and I've no idea what to try next.
Cheers and TIA
24 Aug 2007
This post is a trawl, to see whether there's any wider interest in an oscilloscope project I've been working on.
The project uses a digital scope manufactured by Syscomp - the DSO-101. It's a two-channel scope, which plugs into a USB port and uses the conputer as its driver and display. You can read lots more about it at Syscomp's web site.
What I've been doing is to port the host software to the Z.
I bought the scope in the first place in connection with a Morse-to-speech project (mentioned before in these forums). I liked the spec and the price, and I particularly liked the fact that the software that runs on the host is open sourced. The software is written in Tcl/Tk, and I've been porting the main functionality to C++/Qt.
The scope hardware is physically bigger than a Zaurus, but not by all that much, so I thought it would be neat to use the Z as a host and thus end up with a pocket-sized oscilloscope system.
I've now got the port working pretty much to my satisfaction (YMMV). The port doesn't have all the advanced features of the original software, but I think it does count as a workable system. My Zauri are still using their original Sharp ROMs, and the program should work on C1000/3000/3100/3200.
(Dis)claimer: When I first bought the scope, I was merely another customer for Syscomp. I then offered them a couple of contributions for the host software, and that progressed to the point where I became a beta-tester for them. From that, I discussed the idea of the Z port and they were immensely supportive, including supplying extra hardware for the purpose. From that, you'll correctly gather that I think these people are Good Guys. But I have no commercial relationship with them - this is an open source project, pure and simple.
Maybe this is just my private toy, but if anyone else would be interested, I'd be happy to share it.
1 Aug 2007
I've been wrestling with this, and it's time to give up and ask the experts.
C3000 with stock ROM, but portability desired.
My program will communicate with two separate USB serial devices, which will appear on /dev/ttyUSB0-1. I can probe the devices to find out which device is on which tty, but if there are other serial devices connected, the probing would be likely to upset their operation. (The stock ROM has only two serial devices, but mknod seems happy to create more, and I'd like my program to assume that other devices could be present.)
The devices are identified by their Manufacturer, Product and SerialNumber strings in the output of lsusb -v, but that gives me two problems:
1. lsusb -v has to be run as root; I'd prefer my program not to need root privileges.
2. Although it identifies the devices, it still doesn't answer the question of which tty each is connected to.
I can get my program to run dmesg and then parse the output, and I've had some success there - but:
1. Parsing the dmesg output is hardly elegant, and presumably highly non-portable, not to say driver-dependent.
2. dmesg appears to use a circular buffer, and the information I need is not necessarily still present when I need it.
The question in its most simplified form:
How can my program find the manufacturer, product and serial number strings (as listed by lsusb) of the hardware connected to a given ttyUSB port, with bonus points for elegance and portability?
As usual, enlightenment would be much appreciated.
28 Jul 2007
I have a stock C3000, and I know that I can create a screen capture by typing Shift-Fn-C. What I don't know and probably should, is how to get a screen capture in portrait mode, when the keyboard is by definition inaccessible. I've tried opening it up just a little, but it switches to landscape mode before I can open it wide enough to get my fingers to the keys.
I searched, and found scrot, but that seems to require X11 to be installed.
I feel pretty stupid about this, because there just has to be a simple way, surely?
Enlightenment would be much appreciated. If said enlightenment included a way to trigger a full-screen capture from a program (stock ROM, please remember), that would be icing on the cake.
(I'm asking this because I want to create screen shots of my program while it's running. I do realize that I can save the program's part of the screen area from within the program, but I'd like to see the title bar and task bar in the screen shot too.)
11 Feb 2007
I'm looking into the possibility of writing an app for the Z that would take Morse Code input, and speak the resulting text.
The beneficiary would be a 92-year-old friend who has been a life-long radio ham, and who through a series of strokes has lost the power of speech.
Ideally, it'd be possible to connect a real Morse key to the Z by some means, so that he could use his own morse key.
I've found links to this sort of stuff via google, but unfortunately the links are dead. There are references to a sourceforge project called zmorsed, and I've seen a reference (without a link) to "How to connect a real Morse key via the audio connector". That reference said it was possible, but didn't go beyond that. The sourceforge links all lead to an "Access Denied" response. (Yes, I was logged in at the time.)
My plan would be to use flite for the speech synthesis, driven by the program that I'd write. I've proved out the speech synthesis part, but it's the Morse Code input that's lacking.
I'd be really grateful if anyone could help out here. For starters, does anyone have the zmorsed source?
Or any other code for interpreting morse code? Ideas for connecting the morse key?
Other users have left no comments for jfr.
There are no friends to display.
|Lo-Fi Version||Time is now: 24th April 2017 - 05:04 PM|