QCSuper icon indicating copy to clipboard operation
QCSuper copied to clipboard

Add TCP mode (without ADB)

Open attah opened this issue 4 years ago • 5 comments

For discussion; you'll likely want something changed or more well abstracted. This "TCP only" mode is useful for e.g. SailfishOS devices, where the user runs adb_bridge themselves.

I do have an issue where it seems only a subset of the expected signalling shows up in Wireshark, but i can't see that i would have caused that. Is this a known issue/symptom of something? The amount of incoming data looks more correct for the number of messages, but only a small part of them show up decoded.

Should I break out TCP handling to a common base class, or is that something you'd want to choose abstractions for? Should adb_bridge perhaps be renamed to diag_bridge?

attah avatar Oct 26 '20 19:10 attah

I'd be grateful to see that - this is useful for accessing modems inside routers, remote embedded Linux boxes, etc, which don't have resources to run QCSuper or Wireshark on board.

Leo-PL avatar Nov 23 '23 18:11 Leo-PL

Unfortunately there hasn't been any interest from the maintainers. :( This also needs rebasing; and that's over changes that improve the ability to enable logging on more modern devices - but that i can't get working for whatever reason. (Even after patching away some of the Androidness it has accumulated)

attah avatar Nov 23 '23 18:11 attah

Hello,

Sorry for dismissing the original pull request initially, IIRC we didn't have the devices that would benefit this kind of option available for testing/we deemed that it required more important documentation and UX work for explaining how this is meant to work to end users

We are currently working on a rework of QCSuper to enable compatibility with Android 12-14 devices that don't include a /dev/diag endpoint anymore (to make it primarily work over mode-switching the device to ADB+diag as most Android devices do). I guess that compatibility with platforms such as SailfishOS may be thought afterwards.

Thank you for your patch anyway, it is useful to know that this is simple enough to have QCSuper modified to work on non-AOSP Qualcomm-integrated handheld devices

Regards,

p1-mmr avatar Nov 24 '23 06:11 p1-mmr

Rebase was fairly trivial, see https://github.com/Leo-PL/QCSuper/tree/tcp

Before that, I got the tool connected with a remote modem, but using a pair of socat instances, one beingsocat tcp-listen:<port> open:/dev/ttyUSB0,cfmakeraw, then tunneled that over SSH - because reasons, doesn't really matter but still can be done. Then I had to run another socat instance on my PC, that would open a PTY for QCSuper to plug into, which would initiate TCP connection: socat pty,link=$PWD/ttyQCDM,wait-slave tcp-connect:<host>:<port>, then I opened QCSuper on ttyQCDM and it worked with a Telit modem.

Besides, QPST can also connect to remote ports over TCP, which can be created using socat exactly the same way, so this would introduce feature parity.

Leo-PL avatar Nov 24 '23 09:11 Leo-PL

Thanks for looking at it!

@Leo-PL Right, the Python parts are trivial; but with the rebase done, we now have a diag_bridge that doesn't work. It has nice improvements for Android, but even patching the conflicting parts of those out; it won't run. IIRC i tried forcing several of the device detection paths, but to no avail.

Hopefully the planned improvements will fix it for me too.

attah avatar Nov 24 '23 17:11 attah