max_blogger

/Maximilian Batz

About Maximilian Batz

Keine
So far Maximilian Batz has created 59 blog entries.

Booting Alpine Linux on the Raspberry Pi Compute Module

In our project for a client we are using the Raspberry Pi Compute Module, along with a custom compute module carrier board (called the PCCB – Pi Control Carrier Board) which provides RS485, CAN, RS232, LAN, USB and a step-down for input voltages of 6 – 24 V. (If you are interested in customized hardware [...]

By | Juli 7th, 2019|Alpine Linux, Raspberry Pi Embedded Development|Kommentare deaktiviert für Booting Alpine Linux on the Raspberry Pi Compute Module

Debugging File upload / multipart upload and other HTTP requests

Sometimes you want to see the request as it is received by the server, without any handling / obscuring of the original request.For instance, to see whether different browsers handle file uploads differently. On the other hand, you do not want to write up your own mockup server, just to handle these requests, or install [...]

By | Juli 1st, 2019|Development|Kommentare deaktiviert für Debugging File upload / multipart upload and other HTTP requests

LetsTrust TPM SLB 9670VQ2.0 or SLB 9670XQ2.0?

A customer approached us about the difference between SLB 9670VQ2.0 and SLB 9670XQ2.0.VQ has a standard temperature range of (-20 .. +85°C), and XQ is the enhanced temperature range version (-40 .. + 85°C).As the Raspberry Pi itself has a standard temperature range, we use the VQ version on the LetsTrust TPM.

By | Juni 11th, 2019|Raspberry Pi Blog|Kommentare deaktiviert für LetsTrust TPM SLB 9670VQ2.0 or SLB 9670XQ2.0?

Changing the mountpoint on auth_on_register webhook for VerneMQ

It is possible to pass modifiers along with the “result”: “ok” return value of your webhook for VerneMQ.The official documentation of VerneMQ gives some examples for the syntax. changing the mountpointIt is also possible to change the mountpoint, however the client_id apparently has to be passed in as well!I have raised an issue with the [...]

By | Juni 9th, 2019|VerneMQ|Kommentare deaktiviert für Changing the mountpoint on auth_on_register webhook for VerneMQ

Maximimum length of credentials (username, password, clientid) in MQTT v3.1.1

The CONNECT packetThe MQTT CONNECT Control packet always contains a payload. It is the first packet, which the client must send to the server after the connection is established.It can only be sent once by the client, if a second CONNECT packet is sent, the server (broker) must process it as a protocol violation and [...]

By | Juni 9th, 2019|MQTT, VerneMQ|Kommentare deaktiviert für Maximimum length of credentials (username, password, clientid) in MQTT v3.1.1

Debugging VerneMQ connection / authentication problems for dual authentication with webhooks and vmq_diversity

TL;DRhttps://github.com/vernemq/vernemq/blob/master/apps/vmq_diversity/src/vmq_diversity_plugin.erlincludes a statement which will block authentication / authorization through any other channels if your Lua script returns “false”:will lead to:instead of trying other plugins, as you might have assumed!In order to avoid this problem, simply do not return anything from your Lua script, if you do not want to handle the message!DebuggingVerneMQ has a [...]

By | Juni 4th, 2019|VerneMQ|Kommentare deaktiviert für Debugging VerneMQ connection / authentication problems for dual authentication with webhooks and vmq_diversity

MQTT Topic Tree Design best practices, tips & examples

Generic MQTT BackgroundWith MQTT the sender and receiver are not aware of each other - the broker handles the messaging. This allows the messages to be separated in space, time, and intensity. The sender can send at the speed it wants, and the time it wants. The receiver can pick up the messages at the [...]

By | Mai 29th, 2019|Development, VerneMQ|Kommentare deaktiviert für MQTT Topic Tree Design best practices, tips & examples

VerneMQ: econnrefused & Webhook example

Webhooksactivate webhooks like this in your vernemq.conf.local (.local when running on docker, so that settings at bottom of the file will persist):plugins.vmq_webhooks = onvmq_webhooks.js_auth_on_register.hook = auth_on_register vmq_webhooks.js_auth_on_register.endpoint = http://container_picockpit:1200/example/pathNote that if your webhook is not accessible (econnrefused), the db based authentication will also fail … ! If you get errors like the following:jalpine_morpheus | 17:11:10.394 [...]

By | Mai 20th, 2019|VerneMQ|Kommentare deaktiviert für VerneMQ: econnrefused & Webhook example

envoy serving a static response

Besides routing and redirecting you can serve static responses with Envoy.In this case I want to serve a forbidden response (403)route_config:   virtual_hosts:   - name: picockpit     domains: ["picockpit.local:443", "picockpit.local"]     routes:       - match: { prefix: "/demo" }         direct_response:           status: 403           body:             inline_string: "Forbidden."        - match: {prefix: "/"}         route: {cluster: target_picockpit}It can also serve up files from [...]

By | Mai 20th, 2019|Development|Kommentare deaktiviert für envoy serving a static response

Python Paho MQTT client self-signed certificates websockets, howto

Using Paho in Python with websockets and self-signed certificates for a https:// websocket connection has a couple of pitfalls, so I’m addressing this with some sample code here:import ssl import time import paho.mqtt.client as mqtt class PCPMQTTClient:     def on_connect(self, client, userdata, flags, rc):         self.connection_status = rc         if rc == 0:             self.connected_flag = True             self.connection_error_flag = [...]

By | Mai 19th, 2019|Development, Python|Kommentare deaktiviert für Python Paho MQTT client self-signed certificates websockets, howto