473,413 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

ioctl serial port and SIOCGSTAMP

Hi,
Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
(fd = open("/dev/ttyS1",O_RDWR))

Regards,
Jun 27 '08 #1
13 3259
lhommedumatch wrote:
Hi,
Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
(fd = open("/dev/ttyS1",O_RDWR))
YOU ARE
HERE:
comp.lang.c
| +----------+
| | |
+------------+ |
|
+------+
| YOU BELONG
| HERE:
+---------------comp.unix.programmer

--
Eric Sosman
es*****@ieee-dot-org.invalid
Jun 27 '08 #2
Eric wrote:
) lhommedumatch wrote:
)Hi,
)Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
)(fd = open("/dev/ttyS1",O_RDWR))
)
) YOU ARE
) <snip>

Is anyone else getting the feeling that there are suddenly a lot of
very specific off-topic questions in this group ?

Offhand, the questions sound like they're copied from some FAQ list,
perhaps the comp.unix.programmer one, even.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
Jun 27 '08 #3
In article <L5******************************@comcast.com>,
Eric Sosman <es*****@ieee-dot-org.invalidwrote:
>lhommedumatch wrote:
>Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
YOU ARE
HERE:
comp.lang.c
| +----------+
| | |
+------------+ |
|
+------+
| YOU BELONG
| HERE:
+---------------comp.unix.programmer

SIOCGSTAMP does not appear to be part of Unix. It appears to
be primarily Linux.
--
"When we all think alike no one is thinking very much."
-- Walter Lippmann
Jun 27 '08 #4
On 17 Apr 2008 at 13:06, lhommedumatch wrote:
Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
(fd = open("/dev/ttyS1",O_RDWR))
I can't imagine so! The clue is in the question: SIOCGSTAMP is a
*socket IO control* request, giving you access to timestamp information
for a packet. What would it even mean for a serial device?

Jun 27 '08 #5
On 17 Apr 2008 at 15:23, Willem wrote:
lhommedumatch wrote:
Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
(fd = open("/dev/ttyS1",O_RDWR))

Is anyone else getting the feeling that there are suddenly a lot of
very specific off-topic questions in this group ?

Offhand, the questions sound like they're copied from some FAQ list,
perhaps the comp.unix.programmer one, even.
Are you joking? Do you honestly believe a question as bizarre as the
OP's is frequently asked? I'd be surprised if it's ever occurred to
anyone ever before.

Jun 27 '08 #6
Walter Roberson wrote:
In article <L5******************************@comcast.com>,
Eric Sosman <es*****@ieee-dot-org.invalidwrote:
>lhommedumatch wrote:
>>Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
> YOU ARE
HERE:
comp.lang.c
| +----------+
| | |
+------------+ |
|
+------+
| YOU BELONG
| HERE:
+---------------comp.unix.programmer


SIOCGSTAMP does not appear to be part of Unix. It appears to
be primarily Linux.
c.u.p is a very tolerant group!

--
Ian Collins.
Jun 27 '08 #7
On Thu, 17 Apr 2008 15:23:13 +0000 (UTC), Willem <wi****@stack.nl>
wrote in comp.lang.c:
Eric wrote:
) lhommedumatch wrote:
)Hi,
)Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
)(fd = open("/dev/ttyS1",O_RDWR))
)
) YOU ARE
) <snip>

Is anyone else getting the feeling that there are suddenly a lot of
very specific off-topic questions in this group ?

Offhand, the questions sound like they're copied from some FAQ list,
perhaps the comp.unix.programmer one, even.
Perhaps it has to do with the fact that a certain recent regular here
(I don't want to criticize Walter Roberson by mentioning his name) has
made a habit of answering many off-topic questions if they relate to
*NIX systems.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Jun 27 '08 #8
In article <jo********************************@4ax.com>,
Jack Klein <ja*******@spamcop.netwrote:
....
>Perhaps it has to do with the fact that a certain recent regular here
(I don't want to criticize Walter Roberson by mentioning his name) has
But you just did...
>made a habit of answering many off-topic questions if they relate to
*NIX systems.
Jun 27 '08 #9
In article <jo********************************@4ax.com>,
Jack Klein <ja*******@spamcop.netwrote:
>Perhaps it has to do with the fact that a certain recent regular here
(I don't want to criticize Walter Roberson by mentioning his name) has
"recent regular"? I've been a regular poster here since February 2005.
>made a habit of answering many off-topic questions if they relate to
*NIX systems.
Well, that is an interesting hypothesis, but I don't think it is
supportable with very much in the way of facts and statistics.

For example, there have been quite a number of questions about
sockets recently; could you point to any of my comp.lang.c
postings that have provided more than a very basic hint about
socket programming? And then compare that to the number of times
I have said something similar to,

The C standards do not know anything about networking, let alone
NAT. Networking matters are platform dependant. You should ask
in a development newsgroup that supports your operating system.
Perhaps you became confused by a couple of my recent postings in which
I posted SGI IRIX specific answers in an effort to demonstrate concretely
to the OP that they question they asked truly was system dependant
and that the answer for one system was likely to be completely
useless for other systems. I am certainly not the only regular who
sometimes answers questions with correct but system-dependant
information (often for an obscure platform) as a didactic tool
to demonstrate a point.

--
Q: Why did the chicken cross the Mobius strip?

A: There were manifold reasons.
Jun 27 '08 #10
Walter Roberson wrote:
In article <jo********************************@4ax.com>,
Jack Klein <ja*******@spamcop.netwrote:
>>Perhaps it has to do with the fact that a certain recent regular here
(I don't want to criticize Walter Roberson by mentioning his name) has

"recent regular"? I've been a regular poster here since February 2005.
>>made a habit of answering many off-topic questions if they relate to
*NIX systems.

Well, that is an interesting hypothesis, but I don't think it is
supportable with very much in the way of facts and statistics.
Yes. His hypothesis better fits Antoninus Twink, IMO.

<snip>

Jun 27 '08 #11
Walter Roberson said:
In article <jo********************************@4ax.com>,
Jack Klein <ja*******@spamcop.netwrote:
>>Perhaps it has to do with the fact that a certain recent regular here
(I don't want to criticize Walter Roberson by mentioning his name) has

"recent regular"? I've been a regular poster here since February 2005.
That's pretty recent, Walter! :-) (I hail from 1999, and I'm still
reckoned a newbie in some quarters of clc.)

(And yes, I agree with you that Jack may have overcooked his response a
little.)

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Jun 27 '08 #12
On 17 avr, 19:01, Antoninus Twink <nos...@nospam.invalidwrote:
On 17 Apr 2008 at 13:06,lhommedumatchwrote:
Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port?
(fd = open("/dev/ttyS1",O_RDWR))

I can't imagine so! The clue is in the question: SIOCGSTAMP is a
*socket IO control* request, giving you access to timestamp information
for a packet. What would it even mean for a serial device?
Ok, sorry for that and sorry to disturd comp.lang.c.
Jun 27 '08 #13
In article <fu**********@canopus.cc.umanitoba.ca>,
Walter Roberson <ro******@ibd.nrc-cnrc.gc.cawrote:
>In article <jo********************************@4ax.com>,
Jack Klein <ja*******@spamcop.netwrote:
>>Perhaps it has to do with the fact that a certain recent regular here
(I don't want to criticize Walter Roberson by mentioning his name) has
-----------------------------------------------------------^^^-------
>
"recent regular"? I've been a regular poster here since February 2005.
>>made a habit of answering many off-topic questions if they relate to
*NIX systems.

Well, that is an interesting hypothesis, but I don't think it is
supportable with very much in the way of facts and statistics.
Um, whoosh!

Even *I* could tell that Jack was referring to AT.
His reference to you was indeed pretty elliptical, but it was clear you
weren't the one being slimed.

Actually, now that I think about it, I think the point is that the
antecedent of the word "his" (highlighted above) is AT, not WR.

E.g., Johnny did so and so. I won't insult Susie by mentioning his
(meaning Johnny's) last name.

Jun 27 '08 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
2
by: willie | last post by:
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. ...
3
by: collinm | last post by:
hi i send a command to a led display, the led display is suppose to return me some character i write a string on a serial port void ledDisplayExist() { char msg={'\0', '\0', '\0', '\0',...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
4
by: Frank | last post by:
Hello, how to get information about all serial ports in the PC? I use the following code, but i got only the data of the FIRST serial port. All other serial port information are not available...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
4
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when...
6
by: terry | last post by:
Hi, I am trying to send a character to '/dev/ttyS0' and expect the same character and upon receipt I want to send another character. I tired with Pyserial but in vain. Test Set up: 1. Send...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.