python - How to send AT commands using to USB modem on Ubuntu -


like command: *342*55*225*5#

i installed ubuntu , minicom on it. tried follow guide written in this article, blocked because when entered @ , clicked enter, did not respond...

on python following method when entered command

comport = serial.serial('ttyusb4') 

i got error :

self.fd = os.open(self.portstr, os.o_rdwr|os.o_noctty|os.o_nonblock) oserror: [errno 2] no such file or directory: 'ttyusb4' 

try provide full path device:

comport = serial.serial('/dev/ttyusb4') 

but prefer udev paths, not change if plug in devices in other order:

comport = serial.serial('/dev/serial/by-id/<nameofyourdevice>') 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -