diff --git a/tests/emcute/tests/01-run.py b/tests/emcute/tests/01-run.py index 4a61c8c881..9414162ed8 100755 --- a/tests/emcute/tests/01-run.py +++ b/tests/emcute/tests/01-run.py @@ -101,6 +101,11 @@ class MQTTSNServer(Automaton): def _check_pkt_qos(self, pkt): qos_types = [mqttsn.PUBLISH, mqttsn.SUBSCRIBE] + # see MQTT-SN 1.2 spec 5.4.12 + if (pkt.type == mqttsn.PUBLISH) and \ + (pkt.qos not in [mqttsn.QOS_1, mqttsn.QOS_2]) and \ + (pkt.mid != 0): + return False return (pkt.type not in qos_types) or (pkt.qos == self._qos_flags) def _get_tid(self, topic_name):