21 lines
546 B
Python
21 lines
546 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import logging
|
|
from m2m.nbiot.quectel import QuectelModule
|
|
|
|
logger = logging.getLogger('m2m.bg96')
|
|
|
|
class ModuleBG96(QuectelModule):
|
|
"""
|
|
Implementation for Quectel BG96 series modules.
|
|
"""
|
|
|
|
def __init__(self, serial_port: str, baudrate: int = 115200, **kwargs):
|
|
super().__init__(serial_port, baudrate, **kwargs)
|
|
self._setup()
|
|
|
|
def _setup(self):
|
|
self.set_echo_mode(False)
|
|
# Enable Connection Status URC
|
|
self.send_at_command('AT+QCSCON=1')
|