Implementation of the CellularInterface for u-blox C027 and C030 (non-N2xx flavour) modems that uses the IP stack on-board the cellular modem, hence not requiring LWIP (and so less RAM) and allowing any AT command exchanges to be carried out at the same time as data transfers (since the modem remains in AT mode all the time). This library may be used from mbed 5.5 onwards. If you need to use SMS, USSD or access the modem file system at the same time as using the CellularInterface then use ublox-at-cellular-interface-ext instead.

Dependents:   example-ublox-cellular-interface example-ublox-cellular-interface_r410M example-ublox-mbed-client example-ublox-cellular-interface ... more

TESTS/unit_tests/dynamic/platform_config.py

Committer:
mudassar0121
Date:
2020-01-06
Revision:
42:98808477a691
Parent:
14:e7dcf3388403

File content as of revision 42:98808477a691:

import json
from time import sleep
import sys
import re
import os

myfile = os.path.join('example-ublox-cellular-interface','mbed_app.json')
#with open(myfile, 'r') as f:
#  data = json.load(f)

data={}
  
if 'config' not in data:
  data['config'] = {}
  data['target_overrides'] = {}
  data['config']['debug-on'] = {}
  data['config']['default-pin'] = {}
  data['config']['apn'] = {}
  data['config']['username'] = {}
  data['config']['password'] = {}
  data['config']['ntp-server'] = {}
  data['config']['ntp-port'] = {}
  
  data['config']['debug-on']['value'] = True
  data['config']['default-pin'] = '\"1234\"'
  data['config']['apn'] = 0
  data['config']['username'] = 0
  data['config']['password'] = 0
  data['config']['ntp-server'] = '\"2.pool.ntp.org\"'
  data['config']['ntp-port'] = 123
  
  data['target_overrides']['*'] = {}
  data['target_overrides']['*']['lwip.ppp-enabled'] = True
  data['target_overrides']['*']['platform.stdio-convert-newlines'] = True
  
  
  print('data', data)
else:
  data['config']['debug-on']['value'] = True

  print('debug-on', data['config']['debug-on']['value'])

with open(myfile, 'w') as f:
  json.dump(data, f)