Skip to content

Instantly share code, notes, and snippets.

@j123b567
j123b567 / python_dbus_service_properties.py
Last active March 3, 2022 07:49
Properties support for dbus-python based service
# tested with dbus-python 1.2.18 and python 3.9
# extension to dbus object to support properties
from xml.dom import minidom
import dbus
import dbus.mainloop.glib
import dbus.service
from gi.repository import GLib
@j123b567
j123b567 / paho-mqtt-reconnect.py
Created September 12, 2018 19:07
paho mqtt reconnect with loop()
import paho.mqtt.client as mqtt
import time
def schedule_tasks():
pass
client = mqtt.Client()
client.connect_async("127.0.0.1")
@j123b567
j123b567 / PcapMbrtu.cs
Last active December 17, 2018 08:13
modbus-rtu PCAP reassamble example
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace MbrtuEval
{
public class PcapMbrtu
{
List<Pcap.Packet> packetList = new List<Pcap.Packet>();
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -715,6 +715,10 @@ config I2C_RALINK
tristate "Ralink I2C Controller"
select OF_I2C
+config I2C_MT7621
+ tristate "MT7621/MT7628 I2C Controller"
+ select OF_I2C
+