Results 1 to 3 of 3

Thread: Serial port sniffing

  1. #1

    Join Date
    Sep 2019
    Location
    Berlin
    Posts
    4

    Question Serial port sniffing

    I have a serial device, an AVRT5 APRS amateur radio GPRS tracker. It is made in China and poorly documented although there is a very active user community on a Yahoo group. https://groups.yahoo.com/neo/groups/AP5 ... s/messages

    To configure this device there is a Windows program written it seems in visual basic that simply sends and reads the configuration by serial port. The device comes with a Prolific USB serial converter. The software was no more difficult to run under Wine than Windows (both needed downloading DLL and OCX files and registering them).

    The difficulty came when I tried to reverse engineer the configuration protocol. Under Linux ordinarily, that would be easy. I tried all the usual tools and some unusual ones too. Here are some examples

    socat
    strace
    slsnif https://linux.die.net/man/1/slsnif
    jpnevulator, http://jpnevulator.snarl.nl/

    For some of them, I made a virtual serial port and mapped that to COM3 on wine.

    (I also used WireShark which can intercept USB traffic and that worked fine but I didn't understand the output, maybe there were a lot of control bytes for the USB not just serial data)

    All had the same problem (except WireShark). As soon as the sniffer was active the config program could not communicate with the device. I could intercept the command "SETUP" coming from the program but the device did not reply

    Then I tried windows port sniffer Serial Port Monitor https://www.serial-port-monitor.org/ (free trial version)
    This said it couldn't find a serial port.

    So eventually I tried a Windows 7 computer and Serial Port Monitor worked beautifully. It turned out the config program opened the port on 9600 N81 and sent simple and obvious ASCII strings with a 0xD 0xA termination.

    But why could I not get it to work under Wine when many of these methods work fine for normal Linux programs?

  2. #2

    Default

    I don't know much at all about this but I've tried something similar myself with no luck. The first answer on this link is the reason I have come to accept.

    https://stackoverflow.com/questions/...already-in-use

    However, further down that page is a method that has worked for me. Use a separate port to listen to the traffic, that way there is only one program talking to each port. If you use these UART USB things (which are easy to set up in C# to TX/RX ASCII, should be easy. I've just stumbled on these things so I'm not too good at using them yet (or c# lol), you may need two of them to Rx the traffic from both devices as they talk to each other. Just splice in to the data streams with another RX device.

    if you wanna drop a few bucks on a new toy, I can tell you that Picoscope brand oscilloscopes have a digital decoder option that literally prints the decoded information in the waveform on the screen as it is being received/decoded. Here is a screenshot of what mine can decode.

    digital decode.jpg
    Last edited by brandon lind; Tue 27th Oct 2020 at 17:35.

  3. #3

    Join Date
    Sep 2019
    Location
    Berlin
    Posts
    4

    Default

    Oh ... thank you very much
    ! I will try to do it.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •