Hi Phil, Thank you for your advise. My program has worked properly after your advise.
Adolfo > -----Original Message----- > From: Phil Wilshire [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, June 20, 2002 3:03 PM > To: [EMAIL PROTECTED] > Subject: Re: [rtl] Serial Programming > > Hi Adolf > If you capture the two bytes 3 and E from the serial port > as a string mystring > > then use > > myint = strtol(mystring,0,16); > > If the data is in a single char (0x3e) then simply cast it as an int > > myint = (int)mychar. > > Hope this helps. > > Phil Wilshire > > Adolf Ahmad MS wrote: > > > > Dear All, > > > > I need a help howto received a byte in hexa format on Serial port in > Linux. > > E.g. If i sent "3E" byte from another PC, how to capture it as "3E" also > > (not "3" and "E"). Because I need to convert it to integer format. > > > > Adolfo > > -- [rtl] --- > > To unsubscribe: > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] > > -- > > For more information on Real-Time Linux see: > > http://www.rtlinux.org/ > > -- > > Embedded Linux Specialists > System Design & Consulting Services, LLC > 630 Springhouse Sq > Leesburg VA 20175 > > t 703 669 9765 > f 703 669 9768 > e [EMAIL PROTECTED] > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] > -- > For more information on Real-Time Linux see: > http://www.rtlinux.org/ -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/