Reply
Thread Tools
Posts: 29 | Thanked: 17 times | Joined on Oct 2009
#1
Hello all,

I have created an application which basically implements the following instructions with a desktop widget gui:

http://wiki.maemo.org/Fremantle_Unsu...tooth_profiles

The gui right now is a simple button which changes from "Activate Bluetooth DUN" to "Deactivate Bluetooth DUN" when you press it. (It also, of course, does actually activate and deactivate the tethering capability)

I have some questions. Right now the app is written in python. This is done because I was lazy (The whole development process took maybe 30 minutes). However this presents some problem:

1) The app uses several MB of memory which is entirely unneeded because of python
2) One cannot run python widgets on the desktop right now (pending a bug #5232).


In light of all this, I am looking for feedback on if its worth porting to C and if anybody would mind designing a proper gui (probably a pair of icons for on and off?) for the widget.

I am also looking to see if anybody is actually interested in using this and if I should put time into doing it properly and trying to get this into extras.

Last edited by zgold550; 2009-10-14 at 19:29.
 

The Following 8 Users Say Thank You to zgold550 For This Useful Post:
Posts: 515 | Thanked: 193 times | Joined on Oct 2009
#2
This looks good but using windows Ill use the PC Suite so can bluetooth tether using that. Might be handy for linux/mac though.
 
Posts: 716 | Thanked: 303 times | Joined on Sep 2009 @ Sheffield, UK
#3
I'm hoping to have something similar to switch my N900 into MiFi mode so I can access it from my laptop more easily.

Also, does that application alone use a couple of MB or is that merely the Python memory footprint?

Just thinking it might not be so bad if that is a few MB for Python then far less per Python application, rather than a few MB per application. Its important to me as I am hoping to learn Python.
 
Posts: 29 | Thanked: 17 times | Joined on Oct 2009
#4
The application uses 12MB of memory. If I had to guess, 11MB of that is just the python interpreter and imports and not memory that is consumed because of any code I wrote. I would think that Nokia might already be working to trim this down.
 
Posts: 716 | Thanked: 303 times | Joined on Sep 2009 @ Sheffield, UK
#5
What I meant was, 11MB is bad, but if you already have other Python widgets open then adding yours might only add 1MB on top of that.

It only seems bad if you are using that amount of a RAM for a single application, if its shared between every Python application its not so bad anymore. But is it?

I would check myself but I never did get to grips with Linux memory management, I just assume it works. ;-)
 
Posts: 29 | Thanked: 17 times | Joined on Oct 2009
#6
Due to bug #5232 even with a N900 I cannot properly test this to answer your question Alex. The only thing I can do now is manually start up two python interpreters which will each create those 12MB processes. Perhaps when that bug is fixed and the widgets are added the normal way the result will be different.

For now I plan to port this to C. Any other thoughts on a GUI or other funcitonality?
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#7
Originally Posted by Alex Atkin UK View Post
It only seems bad if you are using that amount of a RAM for a single application, if its shared between every Python application its not so bad anymore. But is it?
i don't think so - that's the overhead required for the python runtime interpreter. it's required for every instance of every python app. welcome to scripting languages

too bad there's no ARMel port of psyco... but that probably wouldn't help much with the memory issue anyway.
 
Posts: 9 | Thanked: 1 time | Joined on Dec 2009 @ Italy
#8
Hello,

is there any progress on that?

I think this app would be very loveable for quick 3G connections from laptop.
I used it a lot of times with my previous phone, it's very effective when you have to quickly check a web page or emails from laptop w/out remove the phone from your pocket.

In the meantime, i tried to manually launche a DUN script but i'm really a linux newbie and i'm not sure i did the right procedure.

got root privileges with sudo gainroot
launched the following command from home dir: ./dun.sh
where dun.sh is:
--------------
# !/sbin/ash
sdptool add --channel 1 DUN
while true; do
rfcomm -S -- listen -1 1 /usr/bin/pnatd '{}'
sleep 1
done
----------------

xterm reports: sbin/ash: dun.sh: not found

If i launch it with: ash dun.sh xterm reports: "line 7 unexpected end of file, expecting do" or something similar.

Could you please tell me what am i doing wrong?

Thanks in advance!

Last edited by RinoG; 2009-12-02 at 10:13.
 
Posts: 29 | Thanked: 17 times | Joined on Oct 2009
#9
Are you sure dun.sh is in your current directory? What if you just do "sh dun.sh"?

And no, the widget is not done yet, its still on the todo though. GUPnP stuff has taken precedence lately :/ My guess is sometime before January it'll be done.
 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#10
Did you actually get DUN working? With Windows?

I couldn't get it to connect, but I didn't put the 1 second delay because I couldn't find the chat scripts from Windows (Vista)...
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:30.