LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2010, 09:35 AM   #1
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Rep: Reputation: 0
bluetooth connectivity


Hi Guys,
I am very new to linux and I have been given a school project that involves getting my windows pc talking to a linux single board computer that I have. It can be found here...

http://glomationinc.com/product_9260.html

I have two bluetooth usb dongles, one to plug into my pc and one to plug into my linux board, I know that both work as I have tried talking to them both using my mobile/cell phone. Also when i plug the dongle into my linux board it recognises something has been plugged in. However I am unsure where to go from here. I have tried "searching" for the device using my windows pc, but it will only find my cell phone and not my linux board. I also tried mounting it similar to how i would mount a usb drive e.g. mount dev/sda etc.

Could anyone offer any suggestions on how to setup the linux board for bluetooth communications?

Any help would be greatly appreciated
 
Old 02-24-2010, 10:09 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,933

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by tomas632 View Post
Hi Guys,
I am very new to linux and I have been given a school project that involves getting my windows pc talking to a linux single board computer that I have. It can be found here...

http://glomationinc.com/product_9260.html

I have two bluetooth usb dongles, one to plug into my pc and one to plug into my linux board, I know that both work as I have tried talking to them both using my mobile/cell phone. Also when i plug the dongle into my linux board it recognises something has been plugged in. However I am unsure where to go from here. I have tried "searching" for the device using my windows pc, but it will only find my cell phone and not my linux board. I also tried mounting it similar to how i would mount a usb drive e.g. mount dev/sda etc.

Could anyone offer any suggestions on how to setup the linux board for bluetooth communications?

Any help would be greatly appreciated
What version/distro of Linux is it running??? How are you talking to the board? Normally, you could run something like blueman, kbluetoothd, etc., click search, then click pair, and you're done.

Look at the hcitool and rfcomm commands. You can scan for devices, and open communications channels with them. There should also be an rfcomm.conf in /etc/bluetooth, where you can add devices to 'auto-pair' and connect.
 
Old 02-24-2010, 10:13 AM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Do you know which version of BlueZ is running on the board? The setup for BlueZ 3 is very different than BlueZ 4, especially pairing. What kind of communication are you looking to do exactly? File transers, or do you need to actually login over BT?

File transfers are easy with OBEXFTP, and you can even use OBEXFS to mount the remote device with FUSE. For logins you can establish an RFCOMM link and then run the getty of your choice over it as if it was a normal serial line.
 
Old 02-24-2010, 11:34 AM   #4
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi Guys,
Thanks for your quick responses. In answer to your questions...

i think that its running emdebian, but im not 100% sure.
I am talking to the board through windows hyperterminal and an rs232 cable
I'm not sure what blueZ is and therefore not sure which version, but I will try and find this out
The kind of comms I'm looking to do is just send packets of information in both directions, but the windows pc will be analysing the packets sent back. Is this possible? No need to login over bluetooth though, the board will be a self running application once it is finished and have no user input.
What do you mean by "getty"?

I will now try your suggestions and see how i get on. Thanks for your help.
 
Old 02-24-2010, 11:51 AM   #5
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
right, i have tried some of your methods. please bear in mind i am a complete linux newbie.

I tried "hcitool" and this command wasn't recognised, see below...

/ # hcitool scan
-sh: hcitool: not found

I presume this might be because I don't have a version of this blueZ you spoke about? Maybe my bluetooth adapter is not linux compatible?

I couldn't find a folder called /etc/bluetooth, it didn't exist in my directory. Maybe this is because BlueZ isnt there?
 
Old 02-24-2010, 12:00 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,933

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by tomas632 View Post
right, i have tried some of your methods. please bear in mind i am a complete linux newbie.

I tried "hcitool" and this command wasn't recognised, see below...

/ # hcitool scan
-sh: hcitool: not found

I presume this might be because I don't have a version of this blueZ you spoke about? Maybe my bluetooth adapter is not linux compatible?

I couldn't find a folder called /etc/bluetooth, it didn't exist in my directory. Maybe this is because BlueZ isnt there?
Most probably. Without the bluetooth stack and associated commands, you've got nothing to work with.
 
Old 02-24-2010, 12:17 PM   #7
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi TB0ne
Thanks for your reply. I have found that my kernel 2.6.30 has a blueZ module in the kernel, but it is useless without a userspace module. I have downloaded and untar'd this module, but I don't have a clue how to install this? Any ideas?
Thanks
Tom
 
Old 02-24-2010, 01:35 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,933

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by tomas632 View Post
Hi TB0ne
Thanks for your reply. I have found that my kernel 2.6.30 has a blueZ module in the kernel, but it is useless without a userspace module. I have downloaded and untar'd this module, but I don't have a clue how to install this? Any ideas?
Thanks
Tom
Nope, and I doubt anyone here will, since you're working with a small, embedded Linux system that most folks haven't seen before.

If they came with instructions, a README, etc., I'd try to follow them.
 
Old 02-24-2010, 02:11 PM   #9
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi Just found a readme file, this is what it says...

Compilation and installation
============================

In order to compile Bluetooth utilities you need following software packages:
- Linux Bluetooth protocol stack (BlueZ)
- GCC compiler
- D-Bus library
- GLib library
- USB library (optional)
- Lexical Analyzer (flex, lex)
- YACC (yacc, bison, byacc)

To configure run:
./configure --prefix=/usr --mandir=/usr/share/man \
--sysconfdir=/etc --localstatedir=/var --libexecdir=/lib

Configure automatically searches for all required components and packages.

To compile and install run:
make && make install

I'm not sure why I need all those software packages?
Obviously I have the blueZ stack and I have the gcc compiler, but nothing else. tried going into the bluez directory and running the configure file with ./configure, but get an error to do with the path name being missing.

Do i need to run the configure file onboard my linux board or compile it on my pc and transfer over?

Thanks for your help, I really appreciate it.
 
Old 02-24-2010, 03:22 PM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,933

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by tomas632 View Post
Hi Just found a readme file, this is what it says...

Compilation and installation
============================

In order to compile Bluetooth utilities you need following software packages:
- Linux Bluetooth protocol stack (BlueZ)
- GCC compiler
- D-Bus library
- GLib library
- USB library (optional)
- Lexical Analyzer (flex, lex)
- YACC (yacc, bison, byacc)

To configure run:
./configure --prefix=/usr --mandir=/usr/share/man \
--sysconfdir=/etc --localstatedir=/var --libexecdir=/lib

Configure automatically searches for all required components and packages.

To compile and install run:
make && make install

I'm not sure why I need all those software packages?
Obviously I have the blueZ stack and I have the gcc compiler, but nothing else. tried going into the bluez directory and running the configure file with ./configure, but get an error to do with the path name being missing.

Do i need to run the configure file onboard my linux board or compile it on my pc and transfer over?

Thanks for your help, I really appreciate it.
Kind of self explanatory...if it says you need those packages, you NEED those packages. They are makefile processors, linking tools, etc., along with hardware interface libraries.

Again, you've got a small, embedded Linux system, running some version of Linux we're not familiar with. So if it tells you that you need those packages, install them. Have no idea how on that system, though....

And since you want this working on your linux board, you need to compile it there. There are ways to compile on another Linux box, with processor emulation, etc., but probably not a good idea right now.
 
Old 02-24-2010, 03:35 PM   #11
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If there is anyway to get BlueZ packages from your distribution or vendor, I would highly suggest doing that. Compiling anything on a 200 MHz ARM board is not going to be very pleasant.

But without it, there is really nothing you can do. The kernel will be able to recognize the device itself, but without userspace utilities it might as well not be there. If this is a school project, it seems like they would give you instructions on how to actually get the thing completed.

Looking a bit into the future, you say:

Quote:
The kind of comms I'm looking to do is just send packets of information in both directions, but the windows pc will be analysing the packets sent back.
That isn't really how Bluetooth works. Bluetooth communication has to adhere to one of the BT services, or else emulate serial communications over RFCOMM. Communication under Bluetooth is not as free-form as it is with something like Ethernet, where you can just establish sockets between anything you want and pass data however you like.
 
Old 02-24-2010, 04:16 PM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
maybe if you move this post to the hardware embedded forum, you will get better responses.

if you are able to ssh into the board can you post the output of
Code:
uname -a -m -p
lsusb
lsmod
maybe someone will be able to determine what you have and what you need.
 
Old 02-25-2010, 06:04 AM   #13
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hi, thanks for your replies.

i tried uname and got...

~/bluez-4.61 # uname -a -m -p
Linux GESBC 2.6.30 #5 Thu Jul 2 17:42:45 EDT 2009 armv5tejl unknown

i tried lsusb and it didnt recognise that as a command

i tried lsmod and it recognised the command but nothing happened

I doubt this information helps much...
 
Old 02-25-2010, 06:29 AM   #14
tomas632
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Also what would be a great help is dissecting this command for me...

To configure run:
./configure --prefix=/usr --mandir=/usr/share/man \
--sysconfdir=/etc --localstatedir=/var --libexecdir=/lib

at the minute i have just tried ./configure and i'm not sure if this is causing problems. what directories should i be linking to for the prefix, mandir, sysconfir and localstatedir. I really don't understand this. Hope someone can help.
 
Old 02-25-2010, 07:24 AM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,933

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by tomas632 View Post
Also what would be a great help is dissecting this command for me...

To configure run:
./configure --prefix=/usr --mandir=/usr/share/man \
--sysconfdir=/etc --localstatedir=/var --libexecdir=/lib

at the minute i have just tried ./configure and i'm not sure if this is causing problems. what directories should i be linking to for the prefix, mandir, sysconfir and localstatedir. I really don't understand this. Hope someone can help.
Well, the instructions gave you that command, and you're doing something other than what it told you?

If you type in ./configure --help, it'll explain the options. You're specifying the root directory prefix, the man page directory, where your system config files are, your local state path, and where the libs go.

Again...without the necessary packages, it will not work.
 
  


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 NAP, Problems with connectivity via the NAP (network access point) orlov Slackware 1 10-04-2009 01:26 PM
Outgoing Connectivity problems. Incoming connectivity fine Fionnbharr Linux - Newbie 1 10-02-2008 01:51 PM
bluetooth...mobile connectivity...file transfer problem vineet7kumar Linux - Newbie 1 09-06-2007 09:48 AM
Bluetooth dial-up connectivity issue with Motorola v360 g3n0xp0rt Linux - Hardware 1 01-22-2006 02:46 PM
bluetooth connectivity khushmeet Linux - Wireless Networking 1 09-06-2005 07:18 PM


All times are GMT -5. The time now is 08:31 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration