Python Pyserial send command
up vote
0
down vote
favorite
I`m trying to connect to my d-link 1210
I use this code
import os
import sys
import time
import serial
import serial.tools.list_ports
print('Search...')
ports = serial.tools.list_ports.comports(include_links=False)
for port in ports :
print('Find '+ port.device)
ser = serial.Serial(port.device)
if ser.isOpen():
ser.close()
ser = serial.Serial(port.device, 9600, timeout=1)
ser.flushInput()
ser.flushOutput()
print('Connect to ' + ser.name)
ser.write(" rn".encode())
ser.write("sh sw rn".encode())
while True:
response = ser.readline()
print(response)
Response
Response
How to delete symbols from output? And stop transmission without disconnect?
python-3.x windows pyserial
add a comment |
up vote
0
down vote
favorite
I`m trying to connect to my d-link 1210
I use this code
import os
import sys
import time
import serial
import serial.tools.list_ports
print('Search...')
ports = serial.tools.list_ports.comports(include_links=False)
for port in ports :
print('Find '+ port.device)
ser = serial.Serial(port.device)
if ser.isOpen():
ser.close()
ser = serial.Serial(port.device, 9600, timeout=1)
ser.flushInput()
ser.flushOutput()
print('Connect to ' + ser.name)
ser.write(" rn".encode())
ser.write("sh sw rn".encode())
while True:
response = ser.readline()
print(response)
Response
Response
How to delete symbols from output? And stop transmission without disconnect?
python-3.x windows pyserial
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I`m trying to connect to my d-link 1210
I use this code
import os
import sys
import time
import serial
import serial.tools.list_ports
print('Search...')
ports = serial.tools.list_ports.comports(include_links=False)
for port in ports :
print('Find '+ port.device)
ser = serial.Serial(port.device)
if ser.isOpen():
ser.close()
ser = serial.Serial(port.device, 9600, timeout=1)
ser.flushInput()
ser.flushOutput()
print('Connect to ' + ser.name)
ser.write(" rn".encode())
ser.write("sh sw rn".encode())
while True:
response = ser.readline()
print(response)
Response
Response
How to delete symbols from output? And stop transmission without disconnect?
python-3.x windows pyserial
I`m trying to connect to my d-link 1210
I use this code
import os
import sys
import time
import serial
import serial.tools.list_ports
print('Search...')
ports = serial.tools.list_ports.comports(include_links=False)
for port in ports :
print('Find '+ port.device)
ser = serial.Serial(port.device)
if ser.isOpen():
ser.close()
ser = serial.Serial(port.device, 9600, timeout=1)
ser.flushInput()
ser.flushOutput()
print('Connect to ' + ser.name)
ser.write(" rn".encode())
ser.write("sh sw rn".encode())
while True:
response = ser.readline()
print(response)
Response
Response
How to delete symbols from output? And stop transmission without disconnect?
python-3.x windows pyserial
python-3.x windows pyserial
asked Nov 9 at 12:56
Nesty
12
12
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226120%2fpython-pyserial-send-command%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown