473,785 Members | 2,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ioctl serial port and SIOCGSTAMP

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

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

--
Eric Sosman
es*****@ieee-dot-org.invalid
Jun 27 '08 #2
Eric wrote:
) lhommedumatch wrote:
)Hi,
)Does the ioctl(fd,SIOCGS TAMP,&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.progr ammer 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.invalidwrot e:
>lhommedumatc h wrote:
>Does the ioctl(fd,SIOCGS TAMP,&time_val) function work for serial port?
YOU ARE
HERE:
comp.lang.c
| +----------+
| | |
+------------+ |
|
+------+
| YOU BELONG
| HERE:
+---------------comp.unix.progr ammer

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,SIOCGS TAMP,&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,SIOCGS TAMP,&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.progr ammer 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.invalidwrot e:
>lhommedumatc h wrote:
>>Does the ioctl(fd,SIOCGS TAMP,&time_val) function work for serial port?
> YOU ARE
HERE:
comp.lang.c
| +----------+
| | |
+------------+ |
|
+------+
| YOU BELONG
| HERE:
+---------------comp.unix.progr ammer


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.n l>
wrote in comp.lang.c:
Eric wrote:
) lhommedumatch wrote:
)Hi,
)Does the ioctl(fd,SIOCGS TAMP,&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.progr ammer 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.l earn.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*******@spam cop.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*******@spam cop.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

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

Similar topics

4
9094
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 same port to change the direction of the robot. The trajectory frame is managed by an applet, and the project works good when the applet is called by a html document allocated in the same local machine under W98 where the classes and the serial port...
2
13196
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. However, I'm unsure of how exactly I should be designing the program, I thought I could use threading to start class: class scanner(Thread): def __init__(self,port):
3
5055
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', '\0', '\1', 'Z', '0', '0',
13
4834
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 been told it is not possible to access the serial ports from asp.net. The application is used to control custom hardware. The hardware is connected to a PC through serial ports. Our customer wants to control the hardware from a remote...
4
11207
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. What I would like to do is make the serial port accessible via a web service. The web service and the legacy application would be running on the same machine. The mobile application would access the web service via a network connection. It...
4
17822
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 with this code sample: ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from WIN32_SerialPort");
13
6210
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 am sending a short message to a group of embedded boxes daisy chained via the serial port. When I send a 'global' message, all the connected units should reply with their Id and Ack in this format '0 Ack' To be certain that I didn't miss a...
4
11801
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 you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "read" on the serial port, depending on which part of the protocol I've got to. Sometimes a return character is expected within half a second,...
6
6670
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 '%' to serial port and make sure it reached the serial port. 2. Once confirmed, send another character.
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10330
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10153
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.