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 10-22-2015, 09:30 AM   #1
austinr1028
LQ Newbie
 
Registered: Oct 2015
Posts: 8

Rep: Reputation: Disabled
Starting point for developing GPS/BT linux driver


I'm tasked with writing a GPS and BT driver in linux (v3.3) and am looking for some resources to gain basic knowledge on how to do this. I'm familiar with writing device drivers for linux, but am getting confused when reading about GPS and BT drivers.

I'm looking for an explanation on where the BT/GPS stack/core is located, and explanation of how they work as well. Essentially, I'm looking for how to interface a BT or GPS module with the kernel, and how the kernel handles the data. Other possible helpful info: The BT module will act as the host (supports up to BT 3.0), and the GPS module will be the receiver.

So to clarify: I am looking for a text/code resource that explains

* How Bluetooth works in the kernel (something along the lines of a LDD3 chapter - but for BT)
* How GPS works in the kernel (same info)
* How to interface these mechanisms (via kernel structures) with a specific chip

I realize this is a somewhat broad question, but I believe that is the point of the question. I'm not looking for a specific "how does BT work with chip X", but rather, "what's a resource I can use to learn how BT/GPS works inside the kernel".
 
Old 10-22-2015, 10:39 PM   #2
Norseman01
Member
 
Registered: Nov 2012
Posts: 85

Rep: Reputation: Disabled
Quote:
Originally Posted by austinr1028 View Post
I'm tasked with writing a GPS and BT driver in linux (v3.3) and am looking for some resources to gain basic knowledge on how to do this. I'm familiar with writing device drivers for linux, but am getting confused when reading about GPS and BT drivers.

I'm looking for an explanation on where the BT/GPS stack/core is located, and explanation of how they work as well. Essentially, I'm looking for how to interface a BT or GPS module with the kernel, and how the kernel handles the data. Other possible helpful info: The BT module will act as the host (supports up to BT 3.0), and the GPS module will be the receiver.

So to clarify: I am looking for a text/code resource that explains

* How Bluetooth works in the kernel (something along the lines of a LDD3 chapter - but for BT)
* How GPS works in the kernel (same info)
* How to interface these mechanisms (via kernel structures) with a specific chip

I realize this is a somewhat broad question, but I believe that is the point of the question. I'm not looking for a specific "how does BT work with chip X", but rather, "what's a resource I can use to learn how BT/GPS works inside the kernel".
=======================
OK - let's start with some facts:
...1) BT (bluetooth) is an evolving thing.
...2) GPS hardware is also an evolving thing.

Either of those things is sufficient to keep their code from being mainline kernel.
That means each driver, one for BT and one for GPS needs to be formulated into a module.
The kind that were once called "TSR" (terminate and stay resident)

If you are not familiar with Linux take a look in /lib/modules. Research how they communicate with the kernel and do the same. (many come with source code) It won't be long after you have the modules working that you will be needing to have a few dozen versions of each BT and GPS module. and counting.

About the time the DOD stopped dinking with the sat signals I took a Garmin GPS and attached a serial cable to it and the serial port on a laptop. I then wrote a LISP program to be run from inside AutoCAD to activate a compiled module to read the GPS on the serial line and then strip off the unwanted and write the wanted (in my format) to the disk and then to activate the next sequence (a script). That read the now formatted info from the disk and sent it to a command line program which converted the LAT/LONG to the desired UTM which was then placed on the hard drive and then returned control to the LISP that started the sequence which placed a red donut at my current location on the screen in front of me. Later, just for fun, I wrote another LISP that would run the first every X minutes and move the screen so as to center the new red donut in the middle. In your case, writing to disk isn't needed (and probably not wanted). Nor is it in mine. I keep a copy of last "just in case" and can, in the flow of my stuff activate a read and store of each WhereAmI just to keep people honest.

I have yet to take AutoCAD apart. Don't need to. As time has gone by - the compiled has had a few changes because the hardware has. Latest AutoCAD still runs the LISP unchanged. The LAT/LONG converter still works unchanged. My map still moves. If the GIS Land Use program at State of California isn't getting done it is strictly operator fault. The excuse "We got lost again" don't work. Then. Now.

Linux: modprobe, lsmod might be nice to use/understand.

Best of luck.

Norseman01
 
  


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
Hard to find a starting point to learn linux abbajee Linux - Newbie 20 03-16-2012 02:19 PM
Developing a Linux Driver pieterparker17 Programming 1 05-12-2011 01:29 PM
Help for developing a device driver code for loopback interface in linux sandeepvl Programming 2 01-14-2007 01:46 AM
Please point me in the right direction for developing a command line tool formasfunction Linux - Software 2 03-03-2006 11:13 AM
Starting developing on Linux jpkeisala Programming 3 06-27-2005 12:41 AM

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

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