![]() |
Bluetooth Tethering Widget for N900/Maemo5
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. |
Re: Bluetooth Tethering Widget for N900/Maemo5
This looks good but using windows Ill use the PC Suite so can bluetooth tether using that. Might be handy for linux/mac though.:)
|
Re: Bluetooth Tethering Widget for N900/Maemo5
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. |
Re: Bluetooth Tethering Widget for N900/Maemo5
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.
|
Re: Bluetooth Tethering Widget for N900/Maemo5
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. ;-) |
Re: Bluetooth Tethering Widget for N900/Maemo5
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? |
Re: Bluetooth Tethering Widget for N900/Maemo5
Quote:
too bad there's no ARMel port of psyco... but that probably wouldn't help much with the memory issue anyway. |
Re: Bluetooth Tethering Widget for N900/Maemo5
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! :) |
Re: Bluetooth Tethering Widget for N900/Maemo5
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. |
Re: Bluetooth Tethering Widget for N900/Maemo5
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)... |
Re: Bluetooth Tethering Widget for N900/Maemo5
I havn't tried with windows yet, but it works 100% of the time with Linux for me (using wvdial/gnome-ppp). I don't see any reason it wouldn't work in Windows.
|
Re: Bluetooth Tethering Widget for N900/Maemo5
For how to distribute it. This doesn't need any GUI. It's best if it can be hooked to bluez or somewhere to start automatically (assuming that it doesn't use any CPU when idle). User has just to install DUN support and that's it.
|
Re: Bluetooth Tethering Widget for N900/Maemo5
I may be wrong, but got some feeling that dun script is more a workaround than a proper solution. n900' bluez does support BT network/pan it seems, but that needs to attention as well. I'd like to be able to have n900 as BT gateway to internet, it required - that would just beat all the competitors with their stupid DUN :)
|
Re: Bluetooth Tethering Widget for N900/Maemo5
Quote:
PAN support is what I want too, but DUN seems to be much easier to achieve. |
Re: Bluetooth Tethering Widget for N900/Maemo5
Quote:
her you are: /home # sh dun.sh Unknown service name: DUN ./dun.sh: line 6: syntax error: end of file unexpected (esxpecting "do") /home # cat dun.sh sdptool add --channel 1 DUN while true; do rfcomm -S -- listen -1 1 /usr/bin/pnatd '{}' sleep 1 done /home # Maybe a service is not running as expected? What should i search for? Also it seems my /etc/bluetooth/main.conf is different frome the one reported on: http://wiki.maemo.org/Fremantle_Unsu...tooth_profiles as disableplugins is commented: #List of plugins that should not be loaded on bluetoothd startup #DisablePlugins = network,input,hal Any suggestion? :) Edit: i forgot to add that i can establish bluetooth network connection between win 7 and n900 but it's like not configured, i.i. no ip addresses, no L3 connectivity. i guess at least one service (DUN or PAN) is already running, any way i can check on device? |
Re: Bluetooth Tethering Widget for N900/Maemo5
Quote:
|
Re: Bluetooth Tethering Widget for N900/Maemo5
Bump for my newbie question... any help? :)
|
Re: Bluetooth Tethering Widget for N900/Maemo5
dr00ls at the greek and latin linux jargon
|
Re: Bluetooth Tethering Widget for N900/Maemo5
any progress here? such an app would be strongly needed - just to many clicks to switch bt on/off
|
Re: Bluetooth Tethering Widget for N900/Maemo5
This applet is actually no longer required. A bluetooth-dun upstart script was pushed to extras-devel which enables bluetooth-dun to be always available.
|
Re: Bluetooth Tethering Widget for N900/Maemo5
Hi guys
half a year later and it seems the problem may still persist on a N900 DUN ?? I just configured above script and get the error > dun Dial-Up Networking service registered rfcomm: unrecognized option `--listen' any progress or alternatives - like the DUN widget mentioned earlier |
Re: Bluetooth Tethering Widget for N900/Maemo5
there is an application in Extras called Bluetooth Tethering (or Bluetooth DUN) which works perfectly.
|
All times are GMT. The time now is 20:13. |
vBulletin® Version 3.8.8