OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Beep from Terminal using Default ROM?, Only a beep between me and some success.
ClintReese
post Oct 28 2004, 03:06 PM
Post #1





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



The question:
Can anyone think of a way to make the Zaurus _beep_ from a Python program running in the terminal on the standard Sharp Rom? (Zaurus 5600. Default Sharp ROM. Standard Sharp terminal application.)

Why:
I've been using the old 'Riverbank' distribution of Python on the Z to write and execute programs on it for a few months now. Now, I'm writing a program which I want to do one simple thing: Beep to alert the user of a change. An ear-piece headphone + beep + zaurus = ability for the Z to alert the user tactfully of the Python program's output.

What I've tried so far:

1. I tried 'tput bel' on the Z's terminal, because it works on my Linux desktop, but the Z says there is no 'tput' command. I looked in the /bin , /sbin , /usr/bin , and usr/sbin to verify that.

2. I tried to use the Python 'curses' module. The one which I installed on the Z from RiverBank doesn't have the curses module. So much for curses.beep() on the current platform.

3. I can't think of a way to use the ( #include <curses.h> ) strategy from a C program because I still haven't figured out a way to put C programs on the standard Sharp ROM. That's why I'm using Python.

4. By the way, ZGCC doesn't seem to work with the default Sharp ROM. Am I wrong about this?

5. I looked for a .ipk for the curses module on Python. I can't seem to find one that doesn't already require an installation of ZGCC.

6. Riverbank seems to say that they don't support the distribution of Python which I'm using, or any other distribution of Python for the Z anymore, so I can't get such a curses module from them, apparently.
http://www.riverbankcomputing.co.uk/zaurus/index.php
The link which they gave also seems to require zgcc
http://www.vanille.de/projects/python.spy

More questions:
Am I overlooking something? Could I just get the Z to beep through some other clever stategy? It beeps when a key is hit. I wonder if I could get it to beep by overloading it somehow. Could I somehow play a sound file from the terminal with a command? Messy, but I'm almost desperate. Am I stuck? Should I finally give in and try to make the switch to Open Zaurus? Yet another delay.

Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176
Go to the top of the page
 
+Quote Post
ClintReese
post Oct 28 2004, 03:14 PM
Post #2





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(ClintReese @ Oct 28 2004, 03:06 PM)
The link which they gave also seems to require zgcc
http://www.vanille.de/projects/python.spy

Or not! I just realized that the link does have a link to some .ipk files, one of which does seem to be some sort of a curses module! Sorry that I may have overlooked this. If it doesn't work, I may be back to whine some more. smile.gif

Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176
Go to the top of the page
 
+Quote Post
ClintReese
post Oct 31 2004, 05:42 AM
Post #3





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(ClintReese @ Oct 28 2004, 03:14 PM)
QUOTE(ClintReese @ Oct 28 2004, 03:06 PM)
The link which they gave also seems to require zgcc
http://www.vanille.de/projects/python.spy

Or not! I just realized that the link does have a link to some .ipk files, one of which does seem to be some sort of a curses module! Sorry that I may have overlooked this. If it doesn't work, I may be back to whine some more. smile.gif

Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176

It didn't work. The default Sharp ROM doesn't even seem to recognize that file as one which it can install. Time to try Open Zaurus, I guess.

Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176
Go to the top of the page
 
+Quote Post
radioz
post Oct 31 2004, 06:39 AM
Post #4





Group: Members
Posts: 102
Joined: 11-October 04
Member No.: 4,962



Which Python are you using?

Have you tried the python.cramfs? I haven't had a chance to play with it much, but it seems pretty complete.

Here is the link I used: http://zaurus.xavierxeon.de/zaurus.php?gro...el&topic=python

radioz
Go to the top of the page
 
+Quote Post
ClintReese
post Oct 31 2004, 07:38 AM
Post #5





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(radioz @ Oct 31 2004, 06:39 AM)
Which Python are you using?

Have you tried the python.cramfs? I haven't had a chance to play with it much, but it seems pretty complete.

Here is the link I used: http://zaurus.xavierxeon.de/zaurus.php?gro...el&topic=python

radioz

Thanks for the link! I intend to try this. I'm using an old Riverbank port of Python which they don't support anymore. This should be a welcome change. Thanks again!

Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 1 2004, 10:13 AM
Post #6





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(radioz @ Oct 31 2004, 06:39 AM)
Which Python are you using?

Have you tried the python.cramfs? I haven't had a chance to play with it much, but it seems pretty complete.

Here is the link I used: http://zaurus.xavierxeon.de/zaurus.php?gro...el&topic=python

radioz

It didn't work for curses. sad.gif

It does seem to make a good replacement for the unsupported old Riverbanks veriosn, though, so thanks anyway. smile.gif

I can import sys and import time, but when I try to import curses I get an error something like the following in my little test program, curses1.py:

File "curses1.py", line 8, ini ?
import curses
File "/home/devel/python/lib/python2.3/curses/__init__.py", line 15, in ?
from curses import *
ImportError: libncurses.so.5: cannot load shared object file: No such file or directory

I think that I may have seen something on this site about libncurses. I think I will do a search on it. If python can't load the shared object file, mayb gcc can't either?


Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 1 2004, 10:55 AM
Post #7





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



OK. Pursuing another strategy.

voicerec recording01.wav

It is very messy and slow, but all I need to do for now is learn how to execute a command from within a Python program. I think. smile.gif

Clint Reese
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 1 2004, 11:10 AM
Post #8





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



arg! os.system() should work, but now voicerec doesn't play the recording sent to it as an argument as a default!

Clint Reese
Go to the top of the page
 
+Quote Post
jfv
post Nov 1 2004, 06:43 PM
Post #9





Group: Members
Posts: 438
Joined: 24-June 03
Member No.: 202



If you have installed kismet it also installs a little program called buzzme (in /usr/bin ?) which will make a little noise. You can make a system call to use it from your python script. Try buzzme -t from the command line.

Felipe
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 2 2004, 07:32 AM
Post #10





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(jfv @ Nov 1 2004, 06:43 PM)
If you have installed kismet it also installs a little program called buzzme (in /usr/bin ?) which will make a little noise. You can make a system call to use it from your python script. Try buzzme -t from the command line.

Felipe

Thanks! I intend to try to install kismet soon. This should work! smile.gif

Clint Reese
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 3 2004, 06:17 PM
Post #11





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(ClintReese @ Nov 2 2004, 07:32 AM)
QUOTE(jfv @ Nov 1 2004, 06:43 PM)
If you have installed kismet it also installs a little program called buzzme (in /usr/bin ?)  which will make a little noise. You can make a system call to use it from your python script. Try buzzme -t from the command line.

Felipe

Thanks! I intend to try to install kismet soon. This should work! smile.gif

Clint Reese

Hmmm. Looks as if Kismet is also intended for open zaurus? Oh well. If I can get OZ installed properly, Kizmet may help me to get around some programming anyway. Thanks. smile.gif

Clint Reese
Go to the top of the page
 
+Quote Post
jfv
post Nov 3 2004, 07:29 PM
Post #12





Group: Members
Posts: 438
Joined: 24-June 03
Member No.: 202



I am using the Sharp ROM and kismet is fine with it. If you don't want to bother installing kismet, just take apart the ipk (cp file.ipk file.tar.gz; tar xzvf file.tar.gz) and you get a bunch of files, maybe in some subdirectories, one of which is buzzme. Just move it to /usr/bin/ , make it executable and you are good to go.

Felipe
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 3 2004, 07:47 PM
Post #13





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(jfv @ Nov 3 2004, 07:29 PM)
I am using the Sharp ROM and kismet is fine with it. If you don't want to bother installing kismet, just take apart the ipk (cp file.ipk file.tar.gz; tar xzvf file.tar.gz) and you get a bunch of files, maybe in some subdirectories, one of which is buzzme. Just move it to /usr/bin/ , make it executable and you are good to go.

Felipe

Thanks! I intend to try to learn how to install kismet on the default ROM. smile.gif

Thanks again!

Clint Reese
Go to the top of the page
 
+Quote Post
ClintReese
post Nov 4 2004, 02:23 PM
Post #14





Group: Members
Posts: 69
Joined: 26-February 04
Member No.: 2,014



QUOTE(ClintReese @ Nov 1 2004, 10:13 AM)
QUOTE(radioz @ Oct 31 2004, 06:39 AM)
Which Python are you using?

Have you tried the python.cramfs? I haven't had a chance to play with it much, but it seems pretty complete.

Here is the link I used: http://zaurus.xavierxeon.de/zaurus.php?gro...el&topic=python

radioz

It didn't work for curses. sad.gif

It does seem to make a good replacement for the unsupported old Riverbanks veriosn, though, so thanks anyway. smile.gif

I can import sys and import time, but when I try to import curses I get an error something like the following in my little test program, curses1.py:

File "curses1.py", line 8, ini ?
import curses
File "/home/devel/python/lib/python2.3/curses/__init__.py", line 15, in ?
from curses import *
ImportError: libncurses.so.5: cannot load shared object file: No such file or directory

I think that I may have seen something on this site about libncurses. I think I will do a search on it. If python can't load the shared object file, mayb gcc can't either?


Clint Reese
C.H.E.I.F. - Cyborgs Having & Encouraging Individual Freedom
http://books.lulu.com/content/70176

Aha! When trying to learn how to instal Kismet on the Zaurus, I learned that it also seems to be dependendent on the libncurses5 thing about which Python was complaining!

http://www.irongeek.com/i.php?submenu=zaur.../wardrivingapps

Maybe I just need to instal libncurses5 properly, and maybe the Python curses import will work and the beep will work? I've also looked at what seems to be the source code for 'buzzme,' and it seems to be dependent on a library called 'sys/ioctl.h' for its beeping capabilities.

So, if I can just find out about libncurses5 and get it working, it should have some libraries which I can use to make this thing beep...

Thanks again for your time if you've made it this far.

Clint Reese
Go to the top of the page
 
+Quote Post
jfv
post Nov 4 2004, 03:15 PM
Post #15





Group: Members
Posts: 438
Joined: 24-June 03
Member No.: 202



If I understand correctly, libncurses provides this hybrid console GUI, which you may not need. For kismet you can install kismetQt, or whatever it's called, which provides a proper GUI for it. As far as buzzme is concerned you should just need to put the binary in your path and it will buzz for you, you shouldn't need any libraries. If you are having trouble finding the binary I'll mirror it for you here. Please let me know if it works.

Felipe
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th October 2014 - 02:15 AM