473,657 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

anybody know how to use python to communicate with UART?

I want to use python to communicate with UART port in my PC, how can I
achieve this? any modules need to be installed?

Thanks
Jul 18 '05 #1
2 4217
Arnold wrote:
I want to use python to communicate with UART port in my PC, how can I
achieve this? any modules need to be installed?

Thanks

pyserial is the usual solution. See http://pyserial.sourceforge.net/

regards
Steve

--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #2
Have you tried pyserial ?

Regards,

Fuzzy

Jul 18 '05 #3

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

Similar topics

105
5151
by: Peter Hickman | last post by:
Well after all this discussion it would appear that a 'Python like' language has appeared => Prothon. http://www.prothon.org/index.html Very alpha, sort of like Python (if you consider the indenting is what makes Python unique) and sort of Ruby in its use of prefixes to define scoping etc (although there is no reference to this trait being borrowed from Ruby). It also quotes Self as being an influence.
1
2201
by: Yong Wang | last post by:
Hi, All: We have a network management system written in C++, MysQL, and Hp SNMP. It works in Solaris command line. When I wrote a similar python codes which call compiled C++ and mysql codes in solaris command line, the comipled codes work fine in wraped python file. When I change the python codes to web interface in python CGI script, I got message that "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" How can I...
3
1911
by: Dabeule | last post by:
Hello, I have to read/write in the UART to transfer bytes through the serial port. I use Visual C++ 6 and Win2000. When I used Win98, the problem was easy : the functions _inp and _outp (or the file port95nt.dll) allow to read/write on the UART. But these functions (or this DLL) do not work... If anyone knows how to have the rights to access the UART with Win2000 or the functions to use in VC++, please help me !
8
4582
by: Joakim Persson | last post by:
Hello all. I am involved in a project where we have a desire to improve our software testing tools, and I'm in charge of looking for solutions regarding the logging of our software (originating from embedded devices). Currently, we are using a heavyweight, proprietary log tool developed by another part of the company. This tool contains all "standard" logging functionality, but we also need to insert "debug" log points in the software of...
16
3089
by: diffuser78 | last post by:
I want to write a python program and call OS specific commands in it. So basically, instead of typing in on the command line argument I want to have it in a python program and let it do the action. for example. in my program I would want to call the ssh feature like one does on the command line ssh Admin@192.168.2.10 .....etc How can I do this easily ?
5
5902
by: damacy | last post by:
hello, everyone. i am trying to write a program which executes SQL commands stored in ..sql files. i wrote a function called psql() whose contents look like the following. .... os.popen(command)
3
2759
by: sundarr | last post by:
Hi all, I am doing some work on UART. the code to recieve data on my UART from Hyperterminal is as follows: Recieve(Count, Destination) { //Monitor the port to recieve data and continously poll the data. //A data byte recieved will set the LSB in LCR to 1. //Thus the CPU has safely read the data do
0
1328
by: Prashant Bhangre | last post by:
Hello, i want to send a string on my PC serial port. Can u please guide me how can i write a code for that in Python script. I am using Python 1.5.2 version. Plz suggest
2
3110
by: ashishchauhan | last post by:
I am using a linux machine with an USB port and I have to communicate with a temperature controller which has an UART port and for this I am using a USB to UART Serial Adapter. port name on my machine is /dev/ttyUSB0 $port = "/dev/ttyUSB0"; open(SERIALPORT,"+>$port") || die("ERROR SENDING DATA\n"); SERIALPORT->autoflush(); ## in between I am sending data print $FILEHANDLE $data;
0
8427
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
8330
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
8850
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
8746
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...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
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
5649
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
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.