Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8555919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:14:05+00:00 2026-06-11T15:14:05+00:00

I write to my device in hexadecimal format using pyserial : ser.write(\x01\x03\x00\x00\x00\x0A\xC5\xCD) data =

  • 0

I write to my device in hexadecimal format using pyserial:

ser.write("\x01\x03\x00\x00\x00\x0A\xC5\xCD")
data = ser.readline()
print data

The output is:

Q,f�    ��
Q.f�    �   
Q8f�    �B
Q5f�    �

My problem is how to show the output in hex format, for instance

01 03 14 50 AD 00 00 00 00 00 00 00 00 00 00 66 DC 00 00 00 09 00 00 A8 42

Also, how can I convert to decimal:

50AD = 20653
66DC = 26332
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:14:06+00:00Added an answer on June 11, 2026 at 3:14 pm

    I guess you have two problems:

    1. The baud rate used by your Python script does not match the baud rate set in you terminal. Try to get them right while sending some printable ASCII values just for testing.
    2. If you want to see the data as hex (not as ASCII characters) look if you can change some settings in your terminal.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to read and write data to the COM ports of a device
I'm trying to write a simple device driver for Windows 7 x64 using the
I write a linux char device driver to simulate a file. The data is
I am using CODE::BLOCKS in windows XP . Tried to write a device driver.
I created a SQLite database on Android device. The program can read/write to database
My gps device writes its data to a text file in my server. Now
I am using a global variable say d_myVar, which will be allocated device memory
I have to write a linux char device, which handles ioctl (without BKL) functions
I want to write a dll for an api of a device. since i
I need to write an user menu for an embedded device (mips linux). The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.