i have a little issue with a cellular modem. i need to obtain it’s IMEI number automatically on windows and save it as txt file. So, for this is needed to:
-
-Open serial port
-
-Send command > AT+CGSN
-
Read serial port
-
make txt file
-
Close serial port
So…
@echo off
rem Searching modem's port com.
chgport | find "Devicecocdcacm0"
rem This return: COM14 = Devicecocdcacm0
mode COM14 BAUD=115200 PARITY=n DATA=8 STOP=1 XON=ON
i don’t know if am i doing it good. thanks for any help!
Source: Windows Questions