LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 08: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, 09:09 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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, 09:13 AM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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, 10: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, 10: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, 11:00 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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, 11:17 AM   #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, 12:35 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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, 01: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, 02:22 PM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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, 02:35 PM   #11
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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, 03:16 PM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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, 05: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, 05: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, 06:24 AM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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



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 12:26 PM
Outgoing Connectivity problems. Incoming connectivity fine Fionnbharr Linux - Newbie 1 10-02-2008 12:51 PM
bluetooth...mobile connectivity...file transfer problem vineet7kumar Linux - Newbie 1 09-06-2007 08:48 AM
Bluetooth dial-up connectivity issue with Motorola v360 g3n0xp0rt Linux - Hardware 1 01-22-2006 01:46 PM
bluetooth connectivity khushmeet Linux - Wireless Networking 1 09-06-2005 06:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:14 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