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
Post a Comment