• MQTT Security LTE-M

    MicroPython mqtt
    1
    0 Votes
    1 Posts
    36 Views
    No one has replied
  • simple mqtt and wss

    MicroPython wss mqtt
    14
    0 Votes
    14 Posts
    183 Views
    M
    Hope you managed to solve your problem, OP. You can use TLS encryption to secure the connection on your MQTT broker. I recommend getting more info from here on how to secure your data. This guide was written by the team behind the MQTT broker Mosquitto and is, therefore, reliable and up to date. You can follow their step-by-step guide to configure a professional, secure and performant MQTT broker. I also have several devices in a network and use this encryption system to make sure no one hacks them. Securing data transfer between clients of a network is mandatory.
  • 2 Votes
    4 Posts
    221 Views
    A
    Someone found a workaround - check out this github here: https://github.com/pycom/pycom-micropython-sigfox/issues/424
  • [solved] MQTT and tls

    MicroPython mqtt tls ssl
    9
    1 Votes
    9 Posts
    1k Views
    M
    Just want to share actual working sample. NOTE: Checking server certificate is DISABLED in this case. You need CERT_REQUIRED or CERT_REQUIRED judging from documentation. But, by some reason in my build ussl.CERT_REQUIRED gave "...object has no attribute...". # --------------------------------------------- # Tested setup: # - Traefik Proxy 2.5 (Let's Encrypt Cert) # - Mosquitto 2.0.16 # - MicroPython 1.17 # ---------------------------------------------- from umqtt.simple import MQTTClient HOST = "<HOST>" # Without server_hostname it wan't connect (by some reason) ssl_params = {"server_hostname": HOST} c = MQTTClient("<client_id>", server=HOST, port=8883, user="<username>", password="<password>", # Need keepalive > 0 or got MqttException(2) keepalive=10, ssl=True, ssl_params=ssl_params)
  • OSError -9984

    Issues & Bugs mqtt
    2
    0 Votes
    2 Posts
    354 Views
    K
    That's interesting, I get that same cryptic error when I test directly over an SSL socket with a bogus certificate: >>> s = socket.socket() >>> ss = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED, ca_certs=bad_cert) >>> ss.connect(socket.getaddrinfo(host, 443)[0][-1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: -9984 With other "wrong" certificates I've gotten OSError: [Errno -30592] MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE instead. Not sure why the difference. Anyway, I know this post is old, just putting this here in case it helps someone in the future. K
  • Azure IoTHub MQTT connect issue

    Issues & Bugs azure mqtt mqtt connect wipy
    3
    0 Votes
    3 Posts
    482 Views
    M
    Hello @Paul-Thornton , Glad to here that, it's very important to me to have this possibility with Pycom. All my devices should be connected to Azure. I've done some researching and found out that your MQTT libs are sending bytes that Azure doesn't understand. Short description of this is on the link: https://www.youtube.com/watch?v=pRqpKZ7mO1s
  • is pycom.rgbled thread safe?

    WiPy 2&3 thread aws mqtt mqtt
    1
    0 Votes
    1 Posts
    316 Views
    No one has replied
  • Calling functions in uMQTT

    Discussion umgtt mqtt micropython adafruit io wipy mqtt
    4
    0 Votes
    4 Posts
    510 Views
    P
    @dezert754 We've all had those moments :P glad its all sorted.
  • frozen AWS MQTT

    Discussion aws mqtt mqtt
    7
    0 Votes
    7 Posts
    917 Views
    R
    @martinnn said in frozen AWS MQTT: @robertkeizer What do you mean by 'relative path'? The import statement is from MQTTLib import AWSIoTMQTTClient How do you point this to another source? I added my own copy of the library in the directory AWSIoTPythonSDK, and then was able to use from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTShadowClient or similar. Effectively just add your own copy of the library and then use a from xx import ; As long as you don't use the exact same name as the default one, and the directory exists in /lib you should be able to use another version.
  • The State of MQTTS

    Issues & Bugs mqtt tls mqtt mqtt bugs
    2
    0 Votes
    2 Posts
    422 Views
    P
    Re 1) Soon. Rewriting is slow going as I want to confirm all the code examples and lib's actually function as the documentation states. Im on it. Re 2) I shall see what I can find out. responses may be a little slow whilst people are away for christmas.
  • 0 Votes
    4 Posts
    2k Views
    T
    @paul-thornton said in LoRa (Raw) & MQTT vs. LoRaWAN & private LoRaWAN server: Is this something that has to be completely self hosted? From the current state of things, yes, it has to. I need a solution that can scale up. We think about several hundrets of nodes with several gateways per application. Everything has to be self powered. And also for now, it's not clear if the gateways will have a permanent connection to the higher-level network, or will initially store all the information and load them up in fixed intervals. My first attempt was, to use TTN. But there are opinions that speak against it. Think of areas in the world where the Internet is not as free as it should be. Cheers, Thomas
  • Problem with subscription to MQTT Broker

    LoPy mqtt subscription
    2
    0 Votes
    2 Posts
    463 Views
    T
    Ok, some news: If I publish something to any of my topics with QoS set to 1, I can receive the message from the topic I subsrcibed to, but, unfortunately, only one time. The callback function runs fine, but then, the main loop is blocked. I can see, that the sensor threads are still running fine, but there are no more data published, because of the blocked main loop. Cheers, Thomas
  • Gpy AWS IOT Mqtt

    Guides gpy umqtt aws iot mqtt
    12
    0 Votes
    12 Posts
    2k Views
    R
    @randomrnti Figured out my issue was due to the AWS policy only allowing certain clients for the iot:Connect policy. Changing it to the wildcard * fixed my issue. Another issue though is I can only get it working for Wifi. The moment I attempt this on NB-IoT I'm getting the following errors: AWSIoTMQTTClient Socket create error: [Errno -78] MBEDTLS_ERR_NET_SEND_FAILED simple.py Traceback (most recent call last): File "main.py", line 90, in <module> File "main.py", line 79, in run File "/flash/lib/simple.py", line 56, in connect OSError: [Errno 113] ECONNABORTED This again is on the connect action and I've tried with connecting using both the IP Address and it's domain name.
  • umqtt robust stalls out on FiPy

    FiPy mqtt umqtt fipy errno 104 econnreset
    3
    3
    0 Votes
    3 Posts
    941 Views
    T
    @matt You should consider checking the connection state. ( Various brokers may time the connection out at the other end.) and then possibly explicitly closing the connection and re-connecting. I am using the core of the AWS MQTT package to talk to Losant and had to deal with the connection status and reconnections. That package maintains the connection in a seperate thread and the library doesn't clean up well so it needed some hacking. I have found the robust and simple implementations also needs some tweaking to be reliable on ESP8266 so it doesn't surprise me. You may even find it makes sense to disconnect after sending a message and then reconnecting later. Have a look at what the default timouts and the inactivity timeouts are set for the MQTT service you are talking to,
  • no execution after lora thread

    LoPy lora mqtt threading
    5
    0 Votes
    5 Posts
    835 Views
    C
    @robert-hh Hello there Robert. Thanks for the reply. Both of my threads have 60 sec sleeps inside. The lora thread have other sleeps as well.
  • mqtt in another thread

    LoPy lopy threading lora mqtt mqtt bugs
    1
    0 Votes
    1 Posts
    436 Views
    No one has replied
  • 0 Votes
    2 Posts
    763 Views
    J
    I have the same problem using this library or simple mqtt in another thread with version (1.18/1.19 Pybytes) rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff8028,len:8 load:0x3fff8030,len:1984 load:0x4009fa00,len:0 load:0x4009fa00,len:19112 entry 0x400a05e4 Initializing filesystem as FatFS! Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed) Core 0 register dump: PC : 0x401f27e8 PS : 0x00060c34 A0 : 0x8005582c A1 : 0x3ffc0970 A2 : 0x00000000 A3 : 0x00000001 A4 : 0x800995d1 A5 : 0x3ffea5f0 A6 : 0x0000b030 A7 : 0x3ffea6a4 A8 : 0x8008cc86 A9 : 0x01000000 A10 : 0x07040000 A11 : 0x00000000 A12 : 0x00000013 A13 : 0x00000000 A14 : 0x3ffae270 A15 : 0x00000000 SAR : 0x0000000e EXCCAUSE: 0x00000007 EXCVADDR: 0x00000000 LBEG : 0x40099276 LEND : 0x40099285 LCOUNT : 0x00000000 Core 0 was running in ISR context: EPC1 : 0x40092e5f EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x401f27e8 with the old version (1.17.3.b1 or 1.18.0) the error was different but there was. Connecting to MQTT broker.... 1 2 3 4 ***ERROR*** A stack overflow in task MPThread has been detected. abort() was called at PC 0x4008e66c on core 1 the mqtt library is: https://github.com/yutter/micropython-mqtt Furthermore after updating to the 1.18.0 or 1.19.4.b4 to try to understand if the problem related to the threads and mqtt had been solved I had another problem, I can not load some files ... example of what happens that did not happen before; I added the size of the files in which I have problems Reading file status Failed to read project status, uploading all files Creating dir lib Creating dir www Creating dir www/bootstrap Creating dir www/bootstrap/css Creating dir www/bootstrap/fonts Creating dir www/bootstrap/js Creating dir www/js [1/18] Writing file SI7006A20.py [2/18] Writing file boot.py [3/18] Writing file hal.py [4/18] Writing file lib/mqttserver.pub.pem [5/18] Writing file main.py [6/18] Writing file mqtt.py [7/18] Writing file umqtt.py [8/18] Writing file www/bootstrap/css/bootstrap.min.css "filesize (121.3kb)" Failed to write file, trying again... Failed to write file, trying again... Filecheck failed [9/18] Writing file www/bootstrap/js/bootstrap.min.js "filesize (36.9kb)" Failed to write file, trying again... [10/18] Writing file www/index.html [11/18] Writing file www/js/angular.min.js "filesize (99.0kb)" Failed to write file, trying again... Failed to write file, trying again... Filecheck failed [12/18] Writing file www/js/app.js [13/18] Writing file www/js/jquery-1.11.1.js "filesize (282.8kb)" Failed to write file, trying again... Failed to write file, trying again... Filecheck failed [14/18] Writing file xApp.py Failed to write file, trying again... [15/18] Writing file xConfigureFile.py [16/18] Writing file xHTTPConfigure.py [17/18] Writing file xWebServer.py [18/18] Writing file xWebSocket.py why? waiting for a quick reply best regards Giacomo