Skip to content

Instantly share code, notes, and snippets.

@x29a
x29a / update.sh
Created January 7, 2017 20:41
SPDYN/SPDNS update via bash
#!/bin/bash
# registered domains. might be the same for v4 and v6
DOMAINV4=foobar.my-router.de
DOMAINV6=${DOMAINV4}
# generated token for each domain
TOKENV4=abcd-abcd-abcd
TOKENV6=abcd-abcd-abcd
@x29a
x29a / fds.c
Created December 22, 2020 09:28
SMA Q2 nRF broken filesystem fix
// file location: components/libraries/fds/fds.c
// Initialize the page structure (m_pages), and determine which
// initialization steps are required given the current state of the filesystem.
fds_init_opts_t init_opts = pages_init();
if (init_opts == NO_PAGES)
{
// try a reformat of the flash
init_opts = FRESH_INSTALL;
// instead of returning an error
@x29a
x29a / gist:ebdea9acccca450119e1cc5b04dc36ac
Created February 27, 2021 20:54
SMA Q2 disable secure pairing
diff --git a/ble/ble_watch_service.c b/ble/ble_watch_service.c
index 78af531..494819c 100644
--- a/ble/ble_watch_service.c
+++ b/ble/ble_watch_service.c
@@ -188,8 +188,17 @@ static uint32_t tx_char_add(ble_watchs_t * p_watchs)
memset(&attr_md, 0, sizeof(attr_md));
- BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(&attr_md.read_perm);
- BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(&attr_md.write_perm);