View Full Version : bluetooth advertising
adalal
11-15-2010, 04:02 PM
I was wondering if there's a way to enable bluetooth advertising. I'm no good at coding for any such things :P .. but, what'd be cool is if the n900 was a portable bluetooth advertising server, and in the future, it could probably have a database of all the bluetooth devices it would've sent content to, and possibly avoid them ...
just a thought...
Crogge
11-15-2010, 04:14 PM
I like the idea :)
klepto
11-15-2010, 04:20 PM
I don't like that idea :(
djs_tx
11-15-2010, 04:20 PM
Possible and not that hard but it would drain your battery like crazy...
periodically a script would do an hcitool scan of the area then attempt a obex push of your data to the device and then add it to a database of bluetooth MAC's that had been tried.
Obnoxious but in certain environments might be a good idea.
David
smartypants
11-15-2010, 04:32 PM
You can tweak this.
http://gecco.wordpress.com/2009/04/23/bluespampy/
#!/usr/bin/python
import os
import string
import time
while 1>0:
dev_scan = "hcitool scan"
list_dev=os.popen(dev_scan)
tot= list_dev.read()
tot= tot.split("\n")
tot.pop(0)
tot.reverse()
tot.pop(0)
for dev in tot:
dev=dev.split("\t")
#browse_dev_command="sdptool browse " + dev[1]
get_channel = "sdptool browse " +dev[1] + " | tr -s ' ' | grep -e \"Channel\" | sed 's/ Channel: /Channel: /g' | cut -d\ -f2"
#print dev[1] + " - " + dev[2]
channel_scan=os.popen(get_channel)
channel=channel_scan.read()
send_file="obextool push file.txt " + dev[1] + " " + channel
print "sending file to " + dev[2]
send=os.popen(send_file)
time.sleep(5)
-s-
droll
11-15-2010, 04:51 PM
i wrote such an app in uiq before. this originated from something called bluejacking. in short, bad idea. battery drain, privacy issues, etc.
smartypants
11-15-2010, 10:28 PM
Make it use as least power as possible, maybe dbus of bluetooth is the key, i don't know, but moral/privacy issues is not an argument.
Like using it to spread mp3 of the band playing at a concert can be good for humanity.
theonelaw
11-15-2010, 11:12 PM
i wrote such an app in uiq before. this originated from something called bluejacking. in short, bad idea. battery drain, privacy issues, etc.
And not to mention if you make a nuisance there will be
people with ball-peen hammers (http://en.wikipedia.org/wiki/Ball-peen_hammer)
searching for you (your handphone actually)
But that said, of course, it is only code.:rolleyes:
How you use it is another thing altogether.
The battery drain issue is the showstopper,
it might be best to let it run only occasionally,
or if you are distributing widely to have a portable charger.
This app could be very useful for some of us.:D
droll
11-16-2010, 06:53 AM
in the app that i wrote before, it was meant as a sort of cheap-thrill. walk into a room and turn on the bluejacking module and enjoy. so yeah, some people would get pissed. :)
it's easy to write. just do the usual bt scan for devices, get the list of mac addresses, query for services, if obex receive is available, do an obex send. repeat. :) you can implement your own cache of devices found before to speed up the "query for services" part.
If anyone was to spam me via bluetooth, I'd take their phone and stamp on repeatedly until it wasn't able to send any more spam.
Assuming that is, that I could find the lil' f**ker in the first place...
TiagoTiago
11-17-2010, 06:45 PM
I had some programs kinda like that on my N73, never had any issues with battery running out (the battery time on that thing was godlike though, i've even had about 2 days + uptime with heavy use, and forgetting to plug it on the wall never gave me any issues)
smartypants
11-17-2010, 09:13 PM
I cant find or install 'obextool' :(
RenaldoTT
11-17-2010, 09:25 PM
I'd prefer a bluetooth messenger over a bluetooth message pusher of spam
smartypants
11-17-2010, 09:49 PM
spam is relative...
smartypants
11-17-2010, 10:11 PM
in Ubuntu it seams to be the tool 'ussp-push' that do the job of 'obextool push'
is that right? 'ussp-push' is not installable either :(
-s-
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.