This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bluetooth mesh serial example issues.

Hi,

I tried the serial example on the PCA10028/PCA10031 and PCA10040. I found that this demo will fail on both PCA10031 and PCA10040, like this:

Activating auto-logging. Current session state plus future input saved. Filename : COM6_17-235-13-43.log Mode : backup Output logging : False Raw input log : False Timestamping : False State
: active Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] Type 'copyright', 'credits' or 'license' for more information IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: send(Echo("hello world")) 2017-08-23 13:43:54,579 - INFO - cmd Echo, timeout waiting for event

"Echo, timeout waiting for event" means?

The second issue is that, I can "erase all" on PCA10028 but it will fail when download the "serial" by SEGGER embedded studio. Anybody found the same issue?

Parents
  • You need to disable hardware (RTS/CTS) flow control when init the serial port object.

    class Uart(threading.Thread, Device):
    //def __init__(self, port, baudrate=115200, device_name=None, rtscts=True):
    def __init__(self, port, baudrate=115200, device_name=None, rtscts=False):
        self.events_queue = collections.deque(maxlen=EVT_Q_BUF)
        threading.Thread.__init__(self)
        if not device_name:
            device_name = port
        self.device_name = device_name
        self.logger = logging.getLogger(self.device_name)
        Device.__init__(self, self.device_name)
        self._write_lock = threading.Lock()
        self.logger.debug("log Opening port %s, baudrate %s, rtscts %s", port, baudrate, rtscts)
        self.serial = Serial(port=port, baudrate=baudrate, rtscts=rtscts, timeout=0.1)
        self.keep_running = True
        self.start()
    
Reply
  • You need to disable hardware (RTS/CTS) flow control when init the serial port object.

    class Uart(threading.Thread, Device):
    //def __init__(self, port, baudrate=115200, device_name=None, rtscts=True):
    def __init__(self, port, baudrate=115200, device_name=None, rtscts=False):
        self.events_queue = collections.deque(maxlen=EVT_Q_BUF)
        threading.Thread.__init__(self)
        if not device_name:
            device_name = port
        self.device_name = device_name
        self.logger = logging.getLogger(self.device_name)
        Device.__init__(self, self.device_name)
        self._write_lock = threading.Lock()
        self.logger.debug("log Opening port %s, baudrate %s, rtscts %s", port, baudrate, rtscts)
        self.serial = Serial(port=port, baudrate=baudrate, rtscts=rtscts, timeout=0.1)
        self.keep_running = True
        self.start()
    
Children
Related