element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum how to use serial port in raspberry pi 3
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 24 replies
  • Answers 6 answers
  • Subscribers 667 subscribers
  • Views 5197 views
  • Users 0 members are here
  • raspberry_pi
Related

how to use serial port in raspberry pi 3

prasadjain05
prasadjain05 over 9 years ago

i had try so many code and thing but i dont get the correct answer for how to transmitter or receive the data through GPIO pin of serial port

  • Sign in to reply
  • Cancel
Parents
  • rew
    0 rew over 9 years ago

    It seems that by default the serialport is now OFF.

    If you want to

    * Have console output go to the serial port

    * AND have a login prompt on the serial port...

    THEN you type "sudo raspi-config" go to "advanced" (next-to-last option) and then look for "serial". Turn it on.

     

    If you want to use the serial port for other things... you can add:

      enable_uart=1

    to /boot/config.txt and then you will have the UART available for other things.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • rew
    0 rew over 9 years ago

    It seems that by default the serialport is now OFF.

    If you want to

    * Have console output go to the serial port

    * AND have a login prompt on the serial port...

    THEN you type "sudo raspi-config" go to "advanced" (next-to-last option) and then look for "serial". Turn it on.

     

    If you want to use the serial port for other things... you can add:

      enable_uart=1

    to /boot/config.txt and then you will have the UART available for other things.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • prasadjain05
    0 prasadjain05 over 9 years ago in reply to rew

    can you provide me a sample code or any tutorial for whole process

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 9 years ago in reply to prasadjain05

    rew is correct, but for a good picture check out https://www.abelectronics.co.uk/kb/article/1035/raspberry-pi-3-serial-port-usage .

    The reason for the changes are related to bluetooth as described at pi 3 - How do I make serial work on the Raspberry Pi3 - Raspberry Pi Stack Exchange . To use the serial port, programming is not needed. Just install minicom talked about here. In just under 20 minutes you can be using the GPIO pins, save for reading and stuff.

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shabaz
    0 shabaz over 9 years ago in reply to rew

    What a mess the whole serial port thing has become.. : (

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shabaz
    0 shabaz over 9 years ago in reply to clem57

    Hi Clem,

     

    Most of the 'net appears to have only part of the picture, we tried to summarize all the findings here (and really it should be in a blog

    rather than buried in a discussion but I'm still not convinced I have all detail, but this is a start) where different options are presented:

     

    https://www.element14.com/community/message/195438/l/re-raspberry-pi-3-und-enocean-pi-kompatibilit%C3%A4tsproblem#195438

     

    Long story short, an option has to be picked and used in order to make sensible use of the serial port. I pick Option 1 from the list generally

    during software development for the pi, but option 1 won't suit everyone.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • rew
    0 rew over 9 years ago in reply to shabaz

    I found out last Friday that the mini-uart doesn't support parity. If you enable parity it is silently ignored. This resulted in a bunch of wasted hours figuring that out....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shabaz
    0 shabaz over 9 years ago in reply to rew

    Hi Roger,

     

    I see.. interesting discovery. That's very useful to know. I'll add this to the discussion thread mentioned above too, so that we know this when deciding which option to take.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • chrisclement
    0 chrisclement over 9 years ago in reply to shabaz

    Agreed. Real industrial settings use traditional protocols that cannot be quickly "upgraded". We need new stuff that can talk to the old stuff.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube