Notices


Reply
Thread Tools
Lord Awesome's Avatar
Posts: 47 | Thanked: 24 times | Joined on Nov 2009 @ Bolton, United Kingdom
#31
Just leave the bluetooth name set to Nokia N900. Or if you're feeling a little creative you could add N900 onto whatever it's currently set to.
 
Posts: 526 | Thanked: 99 times | Joined on Sep 2009
#32
that would be the easy way of doing things
__________________
Christopher Stobbs

My Blog
 
Posts: 9 | Thanked: 0 times | Joined on Feb 2010
#33
Originally Posted by stobbsc View Post
that would be the easy way of doing things
so the app should just scan for other devices with N900 in the name and if possible verify that the device name contains this string - I have BT always on.
 
Posts: 526 | Thanked: 99 times | Joined on Sep 2009
#34
Well I was hoping the app could scan for the LAP codes I posted earlier, and if it finds a device with one then you get a message or something.

Also perhaps if someone tries to pair with you can they have one of those lap codes that you get told it's an N900 trying to connect, not sure if that is possible though
__________________
Christopher Stobbs

My Blog
 
Posts: 11 | Thanked: 0 times | Joined on Dec 2009
#35
I changed my bt name as soon as i got my n900, the LAP codes is a good idea. why not incorporate both, as in either. n900 in the name or the 00:BD:3A lap, which seems very common for n900.
 
Posts: 526 | Thanked: 99 times | Joined on Sep 2009
#36
Thats a good idea. I think I covered most if not all the lap codes earlier.
__________________
Christopher Stobbs

My Blog
 
Posts: 9 | Thanked: 0 times | Joined on Feb 2010
#37
Example to detect: 00:BD:3A and 00:BD:3B ... (expand with \| as address separator)

Code:
#!/bin/bash 
a=`hcitool scan --class |\ 
awk '/BD Address/ {print substr($3,0,8)}' |\ 
grep '00:BD:3A\|00:BD:3B'`; 
echo $a; 
if [ "$a" ] 
then 
dbus-send --type=method_call \ 
--dest=org.freedesktop.Notifications \ 
/org/freedesktop/Notifications \ 
org.freedesktop.Notifications.SystemNoteDialog \ 
string:'Pizza! N900 here!' uint32:0 string:'OK' 
fi;
Save code to: ~/n900finder.sh
Make executable: chmod 755 ~/n900finder.sh
and add a shortcut on your desktop or execute from xterminal (~/n900finder.sh).

It shows an alert (Pizza) if found, otherwise it does nothing.

You can schedule using cron or add a loop and a sleep to have it running in the background.
 
Posts: 526 | Thanked: 99 times | Joined on Sep 2009
#38
wow that seemed pretty straight forward.

I've never coded for Maemo beofre but jsut been reading up about MADDE:http://wiki.maemo.org/MADDE

So I guess I should try MADDE out and use/adapt your code to becoming an app ;-)

Thanks for the starting blocks :-)
__________________
Christopher Stobbs

My Blog
 
Posts: 9 | Thanked: 0 times | Joined on Feb 2010
#39
To test execute:

hcitool scan --class

from your Xterminal on N900, copy a BT address (first 6 digits) and replace 00:BD:3A (line #4) with the LAP you copied. Now the alert should appear if that device is discoverable.

Nicer would be to add a handful of python or perl to incorporate the name of the detected device in the alert ...
 
Posts: 9 | Thanked: 0 times | Joined on Feb 2010
#40
Originally Posted by stobbsc View Post
wow that seemed pretty straight forward.

I've never coded for Maemo beofre but jsut been reading up about MADDE:http://wiki.maemo.org/MADDE

So I guess I should try MADDE out and use/adapt your code to becoming an app ;-)

Thanks for the starting blocks :-)
That part is for you, never to late to code!
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:59.