LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2006, 12:21 PM   #1
thoyyib
Member
 
Registered: Sep 2005
Distribution: SuSE 10
Posts: 50

Rep: Reputation: 15
Bluetooth


Please help me to find out an opensource application for bluetooth device inquiry and bulk object push(one file to all devices).

Thank you,
THOYYIB
 
Old 05-03-2006, 05:06 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
i use kbluetooth
 
Old 05-03-2006, 06:53 AM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
For the device inquiry, the tools that ship in bluez-utils will be ample and bulk object push, write a short shell script that parses the output of 'hcitool scan' and then pushes your object to all listed devices.

Linux doesn't provide many tools that do everything for you but it provides many small simple tools that allow you to easily build the functionality yourself. Have fun
 
Old 05-03-2006, 01:23 PM   #4
thoyyib
Member
 
Registered: Sep 2005
Distribution: SuSE 10
Posts: 50

Original Poster
Rep: Reputation: 15
Hi,

Thanks Mr.cs-cam. Actually I am looking for a tool that automatically search all blootooth divices in that area and send some files to all. Also i need to continue this process(just for bluetooth advertisement)

Thank you,
THOYYIB
 
Old 05-04-2006, 01:36 AM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
A combination of 'hcitool scan' from bluez-utils and 'obex_test' from OpenOBEX and a very simple shell script could make this a very, very simple task. Try out the above tools to see how they work and you shouldn't have any trouble from there
 
Old 05-04-2006, 05:19 AM   #6
thoyyib
Member
 
Registered: Sep 2005
Distribution: SuSE 10
Posts: 50

Original Poster
Rep: Reputation: 15
Bluez

Hi,

I installed both BlueZ utils and BlueZ-lib. Now I am facing some problem on installation of OBEXServer(openobex-apps-1.0.0). It gives some error in C Program files.

THOYYIB
 
Old 05-04-2006, 06:51 AM   #7
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
If i start getting bluetooth adverts pushed to my phone i'll know where to come, and cause some serious GBH.
 
Old 05-04-2006, 07:46 AM   #8
thoyyib
Member
 
Registered: Sep 2005
Distribution: SuSE 10
Posts: 50

Original Poster
Rep: Reputation: 15
BlueZ

Hi,

I installed Bluez-utils, bluez-libs,bluez-sdp, openopex, and openobex-apps.
Now the problem is I cant start the obexserver. Please help me
THOYYIB
 
Old 05-04-2006, 11:25 PM   #9
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Need to post some error messages bud, we can't read minds here.
 
Old 05-29-2006, 09:05 AM   #10
thoyyib
Member
 
Registered: Sep 2005
Distribution: SuSE 10
Posts: 50

Original Poster
Rep: Reputation: 15
ussp-push

Hi,
I wrote a simple script for bluetooth message broadcasting:

#!/bin/bash
hcid
sdpd
echo ""
echo "INNOVATIVE APPLICATION COMPANY"
echo "Bluetooth broadcasting program"
echo ".............................."

while true
do
echo ""
echo "Searching for Bluetooth devices ........................................................................"
echo ""
count=0
for dev in $(hcitool inq | sed -e '/Inquiring/d' | awk '{print $1}'); do
devname=$(hcitool name $dev)
file="/dev/rfcomm$count"
rfcomm release $file
echo "New device found with bluetooth address: "$dev" ( "$devname" )"
echo "Channel for the device = "$(sdptool search --bdaddr $dev OPUSH | sed -e '/Channel/!d')
channel=$(sdptool search --bdaddr $dev OPUSH | sed -e '/Channel/!d' | awk '{print $2}')
echo $dev" is binding with "$file" using channel "$channel" ........."
rfcomm bind $file ${dev} $channel
echo "Pushing data to "$dev" ........"
./ussp-push $file /home/thoyyib/Desktop/iac.txt IAC
echo "Job finished for device "$dev
echo ""
echo ""
((count++))
sleep 1
done
done




here is the O/P of the script
:

Searching for Bluetooth devices ........................................................................

New device found with bluetooth address: 00:16:4E:0C:55:E0 ( )02Blip )
Channel for the device = Channel: 9
00:16:4E:0C:55:E0 is binding with /dev/rfcomm0 using channel 9 .........
Pushing data to 00:16:4E:0C:55:E0 ........
name=/home/thoyyib/Desktop/iac.txt, size=90
Can' t open tty: No such file or directory
Error while doing OBEX_HandleInput()
__obex_connect: error=-1
Unable to connect to the server
Error
Job finished for device 00:16:4E:0C:55:E0


New device found with bluetooth address: 00:0E:ED:AF:72:73 ( tux )
Channel for the device = Channel: 9
00:0E:ED:AF:72:73 is binding with /dev/rfcomm1 using channel 9 .........
Pushing data to 00:0E:ED:AF:72:73 ........
name=/home/thoyyib/Desktop/iac.txt, size=90
Can' t open tty: Connection refused
Error while doing OBEX_HandleInput()
__obex_connect: error=-1
Unable to connect to the server
Error
Job finished for device 00:0E:ED:AF:72:73


New device found with bluetooth address: 00:15:A0:44:3A:52 ( عذب الكلام )
Channel for the device = Channel: 9
00:15:A0:44:3A:52 is binding with /dev/rfcomm2 using channel 9 .........
Pushing data to 00:15:A0:44:3A:52 ........
name=/home/thoyyib/Desktop/iac.txt, size=90
Can' t open tty: No such file or directory
Error while doing OBEX_HandleInput()
__obex_connect: error=-1
Unable to connect to the server
Error
Job finished for device 00:15:A0:44:3A:52


New device found with bluetooth address: 00:13:FD:B5:AD:AD ( MAS )
Channel for the device = Channel: 9
00:13:FD:B5:AD:AD is binding with /dev/rfcomm3 using channel 9 .........
Pushing data to 00:13:FD:B5:AD:AD ........
name=/home/thoyyib/Desktop/iac.txt, size=90
Can' t open tty: No such file or directory
Error while doing OBEX_HandleInput()
__obex_connect: error=-1
Unable to connect to the server
Error
Job finished for device 00:13:FD:B5:AD:AD



Searching for Bluetooth devices ........................................................................



Please help me to solve these errors

Thank you,
THOYYIB
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth mdk110.1newb Linux - Newbie 19 05-31-2006 03:08 AM
bluetooth stimpsonjcat Debian 1 05-11-2005 11:30 PM
Help me with Bluetooth d4d4n9 Mandriva 1 03-02-2005 03:49 AM
Help with bluetooth pablowablo Linux - Newbie 4 02-12-2005 09:12 PM
How do you use Bluetooth? mikeshn General 7 10-28-2003 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration