Python Pyserial Windows No Port Found -


i have tried connect usb mobile send sms through using @ commands. when use pyserial connect in windows os, error not open port, file specified cannot found.

>>> import serial >>> ser = serial.serial(0)  # open first serial port >>> print ser.name          # check port used >>> ser.write("hello")      # write string >>> ser.close()   

even if replace 0 other value, 0 -10 or 'com0','com1' etc, still error file specified not found, port cannot open.

there command listed in pyserial documentation lists ports or allows open port

python -m serial.tools.miniterm

this command supposed list serial ports. shows none.

i have 3 usb ports on system. causing issue.

pyserial not guaranteed detect ports. depends on how device , os communicate , if pyserial designed pick on this. example, pyserial not detect labjack u3-lv or epsom-pos receipt printer plugged in in win8 session (both detected using linux session).

try serial.tools.list_ports.comports() , see gives you.

you @ pyusb module usb connections.

also: recommend being careful when using numbers ports, mapping may not "common-sense" logical (i.e. 0 may not map com0). use explicit string names instead.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -