Serial port sniffing

Questions about Wine on Linux
Locked
billlion
Newbie
Newbie
Posts: 2
Joined: Sat Nov 26, 2016 6:34 am

Serial port sniffing

Post by billlion »

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 didnt 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 a windows port sniffer Serial Port Monitor http://www.eltima.com/products/serial-port-monitor/ (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?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Serial port sniffing

Post by Bob Wya »

Hiya billlion,

This topic is probably best addressed at the winehq-devel mailing list.

I did bring up a similar topic on the winehq-devel mailing list... This question was regarding a parallel port interface - but similar issues.
See the archive: winehq-devel September 2016 archive: Ancient Parallel Port PIC Programmer - support under newer versions of Wine?

Bob
billlion
Newbie
Newbie
Posts: 2
Joined: Sat Nov 26, 2016 6:34 am

Re: Serial port sniffing

Post by billlion »

Bob Wya wrote:Hiya billlion,

This topic is probably best addressed at the winehq-devel mailing list.

I did bring up a similar topic on the winehq-devel mailing list... This question was regarding a parallel port interface - but similar issues.
See the archive: winehq-devel September 2016 archive: Ancient Parallel Port PIC Programmer - support under newer versions of Wine?

Bob
Thanks Bob, I thought the developers' mailing list seemed a bit out of my league ... I dont know anything about how Linux and Windows handle low level calls to serial ports. But if you think it is OK to post it there I can give it a try.

Bill
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Serial port sniffing

Post by Bob Wya »

billlion wrote:
Thanks Bob, I thought the developers' mailing list seemed a bit out of my league ... I dont know anything about how Linux and Windows handle low level calls to serial ports. But if you think it is OK to post it there I can give it a try.

Bill
If you don't spam the list - you can get a very quick response... I got one in a couple of days to my question.

I don't want to malign your writing style... But it's rubbish! My eyes started to glaze over reading your original post... tl;dr :roll:

You want to start with a good summary (first paragraph) of what you are trying to do.
Then you can add on extra stuff you've tried as the Mailing List thread develops.

E.g.
Using Wine / Wine-Staging version xxxx on distribution xxx.
I'm trying to use a AVRT5 APRS amateur radio GPRS tracker which has a serial interface. The device is supplied with a Prolific USB serial converter.
  • Can you access the Prolific USB serial convertor under Linux?? I.e. does it map to a native Linux tty device - if so then say this explicitly.
The bundled GPRS tracker software installs and runs OK under Wine.
Howver the software is unable to see the serial device - when run under Wine - but works correctly when run on Windows 7.
Nobody is going to lose the will to live reading the above... You'll get a response in days vs never!! 8)

Bob
Locked