我有一个名为dataGridView.DataSource = null;
dataGridView.DataSource = listOfSomething;的div,在pip install python-gsmmodem
pip install simplesms
from gsmmodem.modem import GsmModem
from simplesms import pdu as gsmpdu
PORT = '/dev/ttyUSB0' #Port your gsm modem is connected to.
PIN = None # SIM card PIN (if any)
BAUDRATE = 115200
USSD_STRING = '*140*11#'
modem = GsmModem(PORT, BAUDRATE)
modem.connect(PIN)
modem.waitForNetworkCoverage(10)
#encode ussd string
encoded_ussd_strint = gsmpdu.encode(USSD_STRING)
#send encoded ussd string
response = modem.sendUssd(encoded_ussd_strint)
#decode encoded ussd response
decoded_response = gsmpdu.decode(response.message)
print 'USSD reply received: {0}'.format(decoded_response)
if response