27 lines
837 B
Python
27 lines
837 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import logging
|
|
from m2m.nbiot.quectel import QuectelModule
|
|
|
|
logger = logging.getLogger('m2m.bg95')
|
|
|
|
class ModuleBG95(QuectelModule):
|
|
"""
|
|
Implementation for Quectel BG95 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')
|
|
|
|
def set_nb2_mode(self, enable: bool = True) -> bool:
|
|
"""Enables LTE Cat NB2 support (Release 14)."""
|
|
# This typically involves specific band configuration or scan priority
|
|
# which is already covered by high-level 'mode' and 'bands' commands.
|
|
return True
|