From: Jonathan Cameron <jic23@kernel.org>
To: Ibrahim Mattus Neto <ibrahim.neto@gmail.com>,
linux-iio@vger.kernel.org,
Paul Cercueil <paul.cercueil@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: Trying to read data from accelerometer buffer
Date: Sat, 31 Oct 2015 10:29:01 +0000 [thread overview]
Message-ID: <563497ED.5010805@kernel.org> (raw)
In-Reply-To: <CAMajgzy7HpEF7vWWJm0tss4BM_ENcJHaqPHJqvrSemZ9tbf7qQ@mail.gmail.com>
On 29/10/15 10:05, Ibrahim Mattus Neto wrote:
> Hi, I am having issues reading from a accelerometer and I hope yo
> might help me (if I should ask this question elsewhere, please tell
> me)
>
> What I am trying to do is get data from a buffer (I am using the
> source code from iio_readdev as an example) but I can't figure it out
> how to interpret the data properly.
A quick google suggests this is from libiio. Perhaps Paul or Lars
can give more detail.
>
> I was expecting to get a bunch of numbers related to the X axis but
> when it writes to stdout I get a bunch of weird characters, here is
> the output:
>
> @������@������������������������������������������������
>
> How can I get values of x, y and z axes?
The data is in binary, whereas piping it to stdout is presumably going to expect
asci characters. I would imagine, glancing at that example code
that it was meant for piping into some other program that actually interpreted
the stream?
Alternatively, take a look at tools/iio/generic_buffer.c in the kernel source
tree for an example of how to read from the buffers.
>
> Is there anything else I should provide? Is there some information missing?
>
> Thanks in advance!
> Ibrahim
> N�����r��y���b�X��ǧv�^�){.n�+����{��*"��^n�r���z�\x1a��h����&��\x1e�G���h�\x03(�階�ݢj"��\x1a�^[m�����z�ޖ���f���h���~�mml==
>
next prev parent reply other threads:[~2015-10-31 10:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 10:05 Trying to read data from accelerometer buffer Ibrahim Mattus Neto
2015-10-31 10:29 ` Jonathan Cameron [this message]
2015-11-03 11:19 ` Ibrahim Mattus Neto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563497ED.5010805@kernel.org \
--to=jic23@kernel.org \
--cc=ibrahim.neto@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=paul.cercueil@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox