Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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?
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...
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.
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.
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.
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
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.
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?
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.