maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   bluetooth advertising (https://talk.maemo.org/showthread.php?t=65678)

adalal 2010-11-15 21:02

bluetooth advertising
 
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 2010-11-15 21:14

Re: bluetooth advertising
 
I like the idea :)

klepto 2010-11-15 21:20

Re: bluetooth advertising
 
I don't like that idea :(

djs_tx 2010-11-15 21:20

Re: bluetooth advertising
 
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 2010-11-15 21:32

Re: bluetooth advertising
 
You can tweak this.

http://gecco.wordpress.com/2009/04/23/bluespampy/
Code:

#!/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 2010-11-15 21:51

Re: bluetooth advertising
 
i wrote such an app in uiq before. this originated from something called bluejacking. in short, bad idea. battery drain, privacy issues, etc.

smartypants 2010-11-16 03:28

Re: bluetooth advertising
 
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 2010-11-16 04:12

Re: bluetooth advertising
 
Quote:

Originally Posted by droll (Post 874463)
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
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 2010-11-16 11:53

Re: bluetooth advertising
 
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.

jedi 2010-11-16 11:55

Re: bluetooth advertising
 
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 2010-11-17 23:45

Re: bluetooth advertising
 
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 2010-11-18 02:13

Re: bluetooth advertising
 
I cant find or install 'obextool' :(

RenaldoTT 2010-11-18 02:25

Re: bluetooth advertising
 
I'd prefer a bluetooth messenger over a bluetooth message pusher of spam

smartypants 2010-11-18 02:49

Re: bluetooth advertising
 
spam is relative...

smartypants 2010-11-18 03:11

Re: bluetooth advertising
 
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-


All times are GMT. The time now is 10:40.

vBulletin® Version 3.8.8