LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 03-23-2012, 01:39 AM   #1
silverair
LQ Newbie
 
Registered: Mar 2012
Posts: 13

Rep: Reputation: Disabled
Sharing character devices between an Android phone and a Linux PC?


I am an amateur and need some help.
I am working on a project, where character devices on an android phone must show up on the /dev directory of a linux PC. It can be shared via bluetooth /wi-fi or maybe USB.

For example character devices like camera and accelerometer of the phone must me shared seamlessly from a Linux PC so that the PC thinks that these devices are its own.

Here is the framework on how to implement it.

http://s17.postimage.org/bwc0aakbf/y_Cuxz_L.jpg[/url]

Server- Phone, Client- PC

This was taken from an IEEE paper called "Remote Virtual Peripheral Framework: Enabling Dynamically Composed Devices". The paper implemented this on a nokia maemo device. I figure, it can be done on an android device too, once its rooted.(I have a Desire HD and going root it)

I don't know where to start. I have looked all over the net, but nothing of this sort is present.
I have learnt about creating device drivers in linux, compiling them and adding them as modules and making them show up in /dev.
Since “everything is a file” on linux, Can it be shared , using bluetooth library or something.
Please direct me where to go next. Thank you.
 
Old 03-31-2012, 05:32 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Did you read the article you posted?
One place to start will be the bibliography for information about CUSE.
http://lwn.net/Articles/308445/

The module is experimental, so you would need to patch both the Android & PC's kernel.
I doubt that using D-BUS as the ieee article suggests could be fast enough for video. Especially over bluetooth which is incredibly slow.
 
Old 04-01-2012, 07:03 AM   #3
silverair
LQ Newbie
 
Registered: Mar 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jschiwal View Post
Did you read the article you posted?
One place to start will be the bibliography for information about CUSE.
http://lwn.net/Articles/308445/
The module is experimental, so you would need to patch both the Android & PC's kernel.]
Yeah. sorry I assumed CUSE was available by default.
Can u tell me how I can patch the kernel of pc and android? I have never done it before.
Quote:
Originally Posted by jschiwal View Post
I doubt that using D-BUS as the ieee article suggests could be fast enough for video. Especially over bluetooth which is incredibly slow.
I dont need to do the camera necessarily. Its just for a proof of concept. May be it can be done via a fast internet connection using tcp/ip as the article suggests? or wifi ?
Can u also tell something about D-bus? Do I need a patch for it too?

And it seems like I have double posted by mistake. http://www.linuxquestions.org/questi....php?p=4634299
If mods can merge it, it will be great thanks.
 
Old 04-01-2012, 07:57 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
IMHO you will hit a brick wall. This is experimental and your final goal is something you will have to program yourself.

Here is a Tux Radar linux kernel howto. http://tuxradar.com/content/how-compile-linux-kernel
Be sure to read the README that is installed with the kernel source for your distro as well. You will also need to cross compile for the Android kernel. Probably from the omap kernel source from Google or your device's manufacturer.
Look for howto's on your particular device. Different android devices have different hardware, and may have patches installed rather than just enabling particular features & modules when configuring the kernel.
 
Old 04-11-2012, 07:42 AM   #5
silverair
LQ Newbie
 
Registered: Mar 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Sorry for the delay. I have read the patching guide,read about git. I have cloned a directory of 3.00.17.
Now, http://lwn.net/Articles/328404/ tells me that i need to apply 6 patches from the patch set.
according to the guide i need tar.bz files to patch. how do i get those say, from here : http://git.kernel.org/?p=linux/kerne...2dfe0866fe0c1e ?
I see the link called patch which shows text when i click it. I understand how the + and - in the patch works.
Should i just copy the text to a file and apply patch as "patch -p1 patchfile" ?
is the patch version independent, since the version no is not mentioned? i.e can it be applied to any kernel version?

Quote:
Originally Posted by jschiwal View Post
IMHO you will hit a brick wall. This is experimental and your final goal is something you will have to program yourself.
Do you mean that the regular programs wont look for these devices and i have to create my own prog to make use of these fake devices? Yeah i understand.
All i need for now is touch coordinates and accelerometer.

Last edited by silverair; 04-11-2012 at 07:47 AM.
 
Old 04-11-2012, 08:04 PM   #6
silverair
LQ Newbie
 
Registered: Mar 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Never mind i installed patch. i used git checkout <head mentioned in patcset description>, then patch p1 patchname (i copied the text to patchfile)

then,
copied my old .config
make -j4 all
make bzImage
make modules_install install


Now, i am having problems with booting from the compiled kernel
It never moves past the boot screen (never stops initializing ram)
 
  


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
Sharing character devices between an Android phone and a Linux PC? silverair Linux - Software 3 03-24-2012 03:30 PM
Tethering Android phone to Linux to PS3 SantaClawZ Linux - Newbie 14 12-02-2010 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 06:47 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
Open Source Consulting | Domain Registration