get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/810497/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 810497,
    "url": "http://patchwork.ozlabs.org/api/patches/810497/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/osmocom-bb/patch/CA+yUT98Mwg+r1Btfn905+5P8tp-cMMBCeD9qDD5ByuC3iJb0bg@mail.gmail.com/",
    "project": {
        "id": 40,
        "url": "http://patchwork.ozlabs.org/api/projects/40/?format=api",
        "name": "Osmocom Baseband development",
        "link_name": "osmocom-bb",
        "list_id": "baseband-devel.lists.osmocom.org",
        "list_email": "baseband-devel@lists.osmocom.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<CA+yUT98Mwg+r1Btfn905+5P8tp-cMMBCeD9qDD5ByuC3iJb0bg@mail.gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-06T10:28:44",
    "name": "SDR_PHY question",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b06e825916157fae939788b1d3e066bc051dcddf",
    "submitter": {
        "id": 72306,
        "url": "http://patchwork.ozlabs.org/api/people/72306/?format=api",
        "name": "Adrian Musceac",
        "email": "kantooon@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/osmocom-bb/patch/CA+yUT98Mwg+r1Btfn905+5P8tp-cMMBCeD9qDD5ByuC3iJb0bg@mail.gmail.com/mbox/",
    "series": [
        {
            "id": 1758,
            "url": "http://patchwork.ozlabs.org/api/series/1758/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/osmocom-bb/list/?series=1758",
            "date": "2017-09-06T10:28:44",
            "name": "SDR_PHY question",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1758/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810497/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810497/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<baseband-devel-bounces@lists.osmocom.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "baseband-devel@lists.osmocom.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "baseband-devel@lists.osmocom.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=lists.osmocom.org\n\t(client-ip=2a01:4f8:191:444b::2:7; helo=lists.osmocom.org;\n\tenvelope-from=baseband-devel-bounces@lists.osmocom.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fQ9G2NSo\"; dkim-atps=neutral",
            "lists.osmocom.org; dmarc=pass header.from=gmail.com",
            "lists.osmocom.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com header.b=fQ9G2NSo",
            "lists.osmocom.org; dmarc=pass header.from=gmail.com"
        ],
        "Received": [
            "from lists.osmocom.org (lists.osmocom.org\n\t[IPv6:2a01:4f8:191:444b::2:7])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnKbQ0M8Yz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 20:30:08 +1000 (AEST)",
            "from lists.osmocom.org (lists.osmocom.org [144.76.43.76])\n\tby lists.osmocom.org (Postfix) with ESMTP id 9A3663801B;\n\tWed,  6 Sep 2017 10:28:48 +0000 (UTC)",
            "from mail-io0-x22c.google.com (mail-io0-x22c.google.com\n\t[IPv6:2607:f8b0:4001:c06::22c])\n\tby lists.osmocom.org (Postfix) with ESMTP id 3F3393BFF9\n\tfor <baseband-devel@lists.osmocom.org>;\n\tWed,  6 Sep 2017 10:28:45 +0000 (UTC)",
            "by mail-io0-x22c.google.com with SMTP id y123so22857100iod.0\n\tfor <baseband-devel@lists.osmocom.org>;\n\tWed, 06 Sep 2017 03:28:45 -0700 (PDT)",
            "by 10.50.33.2 with HTTP; Wed, 6 Sep 2017 03:28:44 -0700 (PDT)"
        ],
        "Received-SPF": "Pass (sender SPF authorized) identity=mailfrom;\n\tclient-ip=2607:f8b0:4001:c06::22c; helo=mail-io0-x22c.google.com;\n\tenvelope-from=kantooon@gmail.com;\n\treceiver=baseband-devel@lists.osmocom.org ",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:from:date:message-id:subject:to;\n\tbh=fGVQW9ZLCRxrlbhyepbDC0CsHbElcMQBnz5AKvR3zBI=;\n\tb=fQ9G2NSoogCncC34pTb5Uig7c73yOJMFt/tlZOJeIeIsItRqOoDhsx2WP9WqWrRPPR\n\t7w9v1x4wzoBxYp7j7YRRyIqXylJ1EI4IkcsErdmlYYv5N66Wi9Zv8gHGS6n1TDJUl4h3\n\tqXZP3grwPNRb2nIPVldcRpHjoW9X18nB/FgVTCkDGPzCJ0lXjrfIelxTUf8J3Knr84IQ\n\tjSkZQkJAJUrcJuIqbQnHmSTSohe9FBZWsBAIQF6M44gXJDsd+pnQQqRLBHfmM+gSNC89\n\tyXaJzk1nO9f1yDGymiLYdI3foj/O+PK7ZVnXiCXqDD4G0JZXhYyngpnUu83MJZR/XT0u\n\tDa8Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:from:date:message-id:subject:to;\n\tbh=fGVQW9ZLCRxrlbhyepbDC0CsHbElcMQBnz5AKvR3zBI=;\n\tb=rNXsCI91/irsvNM8JgGwNdDho4POnAq02Jx9YrqJmu2YTskKtbWD9xB/O7sa4w/kV1\n\tC1KgCY1lvLFf6lVEM+Osw/rDqDWR3XDFY4FmI1C6RzLeiq5e/qls1eSjnkR8BteGtbbN\n\tYrXvQjnPhsMvIVeqbQ7aSmA3trYp8/ccxLwOxSCAZmR0KvLuFVkXL+0xjk4llQN+mN0t\n\txphVXffREzxXtjieSwL2l9ocZmTDuLgNpgjTrZfIbWmdS2+icy8hTtfxE5zpolNWLssi\n\ttlB3ZIFIU3TW4kD27fA1xYqwzzEudl3M94EJjPyHLZvY3bGBMBCVCnjpGna3b0AeYG+3\n\tHw6w==",
        "X-Gm-Message-State": "AHPjjUgG7Tm1Kdu1W49wRAz04r9BNPfKpRAW+bcsDr3CpBQs+eP2herQ\n\t/Wzx00E1CKMgt6BdR3Cgk7WL/MobKrdB",
        "X-Google-Smtp-Source": "AOwi7QAUVHbz1m4mqyMRMmuK2akonbJVmODkt2rxCcWExEWkF/+vJumaglKQ/0FXBi5mmVQ+GPKkSZxnCDN6cO4Ob7Q=",
        "X-Received": "by 10.107.47.93 with SMTP id j90mr2071435ioo.269.1504693724873; \n\tWed, 06 Sep 2017 03:28:44 -0700 (PDT)",
        "MIME-Version": "1.0",
        "From": "Adrian Musceac <kantooon@gmail.com>",
        "Date": "Wed, 6 Sep 2017 11:28:44 +0100",
        "Message-ID": "<CA+yUT98Mwg+r1Btfn905+5P8tp-cMMBCeD9qDD5ByuC3iJb0bg@mail.gmail.com>",
        "Subject": "SDR_PHY question",
        "To": "baseband-devel@lists.osmocom.org",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "X-BeenThere": "baseband-devel@lists.osmocom.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "OsmocomBB - open source GSM baseband firmware\n\t<baseband-devel.lists.osmocom.org>",
        "List-Unsubscribe": "<https://lists.osmocom.org/mailman/options/baseband-devel>, \n\t<mailto:baseband-devel-request@lists.osmocom.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osmocom.org/pipermail/baseband-devel/>",
        "List-Post": "<mailto:baseband-devel@lists.osmocom.org>",
        "List-Help": "<mailto:baseband-devel-request@lists.osmocom.org?subject=help>",
        "List-Subscribe": "<https://lists.osmocom.org/mailman/listinfo/baseband-devel>, \n\t<mailto:baseband-devel-request@lists.osmocom.org?subject=subscribe>",
        "Errors-To": "baseband-devel-bounces@lists.osmocom.org",
        "Sender": "\"baseband-devel\" <baseband-devel-bounces@lists.osmocom.org>"
    },
    "content": "Hello,\n\nI am interested in the sdr_phy work being done currently, and I'm\ntrying to get it set up on my computer. I built osmo-trx from the ms\nbranch and implemented a crude power measurement command. When running\ntrxcon everything works fine, I get power indications for channels,\nand then when the mobile app is trying to sync to an ARFCN I start\nhaving issues.\n\nThe FCCH bursts are decoded fine, and so are the SCH bursts (which I\ncan also see in the osmo-trx terminal). I had to change the code of\ntrxcon in order for SCH to work, because the bit values were inverted\n(0 was 1 and viceversa). I am attaching the changes at the end of the\nmessage.\n\nUnfortunately, the BCCH and CCCH bursts are not decoded:\n<0006> sched_lchan_sch.c:98 Received SCH: bsic=30, fn=1116799, sched_fn=1116798\n<0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116800 ts=0 bid=0\n<0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116801 ts=0 bid=1\n<0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116802 ts=0 bid=2\n<0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116803 ts=0 bid=3\n<0006> sched_lchan_xcch.c:117 Received bad data frame at fn=1116800\n(2/51) for BCCH with 66 errors\n\nIt appears as if the deinterleaving in gsm0503_xcch_decode does not\nwork... could be the order of bursts?\n\nI'd appreciate any help here. I'm also ready to share the changes I've\nmade to osmo-trx/ms and trxcon.\n\nBest regards,\nAdrian\n\n  *\n@@ -392,7 +397,7 @@ int trx_if_cmd_measure(struct trx_instance *trx,\n                LOGP(DTRX, LOGL_ERROR, \"ARFCN %d not defined\\n\", arfcn_start);\n                return -ENOTSUP;\n        }\n-\n+       trx_ctrl_cmd(trx, 1, \"RXTUNE\", \"%d\", freq10 * 100);\n        return trx_ctrl_cmd(trx, 1, \"MEASURE\", \"%d\", freq10 * 100);\n }\n\n@@ -421,6 +426,7 @@ static void trx_if_measure_rsp_cb(struct\ntrx_instance *trx, char *resp)\n                arfcn == trx->pm_arfcn_stop);\n\n        /* Schedule a next measurement */\n+       usleep(50000);\n        if (arfcn != trx->pm_arfcn_stop)\n                trx_if_cmd_measure(trx, ++arfcn, trx->pm_arfcn_stop);\n }\n@@ -558,9 +564,9 @@ static int trx_data_rx_cb(struct osmo_fd *ofd,\nunsigned int what)\n        /* Copy and convert bits {254..0} to sbits {-127..127} */\n        for (i = 0; i < 148; i++) {\n                if (buf[8 + i] == 255)\n-                       bits[i] = -127;\n+                       bits[i] = 127;\n                else\n-                       bits[i] = 127 - buf[8 + i];\n+                       bits[i] = -127 + buf[8 + i];\n        }",
    "diff": "diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c\nindex 6a84af6..def571c 100644\n--- a/src/host/trxcon/trx_if.c\n+++ b/src/host/trxcon/trx_if.c\n@@ -325,6 +325,11 @@ int trx_if_cmd_setslot(struct trx_instance *trx,\nuint8_t tn, uint8_t type)\n        return trx_ctrl_cmd(trx, 1, \"SETSLOT\", \"%d %d\", tn, type);\n }\n\n+int trx_if_cmd_sync(struct trx_instance *trx, uint8_t type)\n+{\n+       return trx_ctrl_cmd(trx, 1, \"SYNC\", \"%d\", type);\n+}\n+\n /*\n  * Tuning Control\n",
    "prefixes": []
}