LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-16-2007, 05:25 PM   #1
Shinpou
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
Smile [Vague question] Linux I/O through different media, and delimitation of custom data.


Hi, I'm new here.

The Question(s)
So I have Device 1 on one end, which is an embedded device, and a Linux machine on the other, which will listen to output from Device 1.

Device 1 sends 2 byte data blocks through, say the serial port. Perhaps USB would be better, or ethernet? What exactly is the difference in reading from these media on Linux, and what kind of data should they be used for? It could be safe to say, that Device 1 sends updates to the Linux machine in a perhaps max 30 updates per second aka 60Bps. The communication between Device 1 and Linux machine is not bidirectional, for Device 1 is completely independent and will give data to Linux machine no matter what its state is.

What I'm even more interested about is, that how would one handle custom defined data coming from one of those media with Linux. There is 2 byte data chunks coming through, so how would one read / send those 2 bytes from / to the line without ever having to worry about mixing up the two bytes in the data. Is there a way in which to delimit data when sending, perhaps? If you think about MIDI data, it sends data to a sequencer or a device in 2-3 byte chunks as well, but it never ever mixes up the data in those chunks - even though the bytes can be all the same value.

I'm sorry about the vagueness of the question(s), but I appreciate all ideas you could provide.

If more specifics is needed, I'll be happy to elaborate.


[Rudiment] // Non important sidenote
What the question relates to?
We are making a robot, or actually two of them, which will in the end play real human instruments. We have already done this with a flute last year - it was not easy. Why we are doing this is because our school has this free-to-participate project to teach us about embedded devices and various project related things.

The reason why I'm here is that this year we are going a notch further. Last year our robot device was made so, that it changed MIDI data into electromagnetic finger movement, and somewhere in there was a Linux device feeding MIDI data out into a MIDI line. This Linux device was the Control Unit.

This year we will attach an embedded device to the Control Unit (Linux machine), which will namely read human given music tempo from a stick with a light emitting diode in the end - all this through a camera.

Now, we have defined the interface which will be between the Control Unit and the Image Recognition Unit (IRU), and it will basically work like this:

The IRU will send 2 byte blocks of information to the Linux machine on what the tempo is at a given time. How this data should be read and sent, as it is custom defined binary data, is what I need to figure out - possibly with the help of you guys
[/Rudiment]


Cheers =)

Last edited by Shinpou; 10-16-2007 at 05:28 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building a custom kernel optimizing for media performance vharishankar Linux - General 1 02-22-2006 06:30 AM
linux script question: data bhuwan Linux - Software 3 02-21-2006 11:14 AM
Cannot read package data from installation media. Media error? </m0r1arty> SUSE / openSUSE 2 01-26-2005 07:57 PM
How can I add custom data to my executable bestofmed Programming 3 07-29-2004 03:24 AM
Linux in vague won't record audio. Help. roesingape Linux - Software 2 06-13-2003 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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