Author Topic: Missing/Swapped Data Bytes on COM0  (Read 9699 times)

ksmrt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Missing/Swapped Data Bytes on COM0
« on: 2015-04-18, 12:10:21 »
I am trying to use the RRC1258 with a Simoco 9000 radio and Simoco 9030 Head Unit.
This all works fine on the LAN, but as soon as it goes on the WAN only the Audio (RX) is heard.  The dispaly does not have anything on it, not can you PTT.
I have looked at the Serail Data between the Radio and Head unit when connected directly and when connected over the Internet.
Looking at the data, there are constant errors - and the Head Unit doesn't respond because it never gets valid data from the Radio.
The Radio uses the map27 protocol.. Here is the first message sent by the radio:
16 10 02 01 0e 01 01 10 03 8a 09
And this is how it is recieved:
16 10 02 01 0e 01 01 10 8a 09

If you log all the message, there are alsorts of variations in the errors including out of order bytes...
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 0e 01 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 10 8a 09 01
16 10 02 01 01 0e 01 10 8a 09
10 02 16 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 09 8a
16 10 02 01 01 01 03 0e 8a 09
16 10 02 01 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 03 09 8a
16 10 02 01 0e 01 01 03 8a 09
02 16 10 01 0e 01 01 10 09 8a
16 01 10 01 8a 10 0e 01 02 09
16 0e 01 10 10 01 01 8a 02 09
16 10 02 01 0e 01 01 09 10 8a
16 10 02 01 0e 01 01 10 8a 09
16 02 01 10 0e 01 01 10 8a 09
16 10 02 01 0e 01 01 10 8a 09
10 02 16 01 0e 01 01 8a 09 10
10 16 02 01 0e 01 01 10 09 8a 01
16 02 10 0e 01 03 8a 01 09
16 10 02 01 0e 01 01 03 8a 09 10 0e
16 02 01 01 09 01 10 8a
16 10 01 0e 01 02 01 10 8a 09
16 02 10 01 0e 10 8a 01 01 09
16 02 10 01 0e 01 01 10 8a 09 fe
16 10 02 01 0e 01 10 8a 01 09 0e
16 02 01 01 10 01 8a 10 09
16 10 02 01 0e 01 01 10 8a 09 16 01

I know that a collegue of mine from another Mountain Rescue Team has found exactly the same issues - it works on LAN but not on WAN.

Does anyone have any ideas why this may be happening.  The Radio Mode is Transparent, 19200 baud, 1start, 1 stop, no parity bit.
It is curious in that it works fine on the LAN but not WAN.  I would not have expected for example that nearly always the same byte is lost if it were to do with packages missing/lost/ or recieved in the wrong order.

Simoco Radios are the only ones that allow our GPS system to work, so this is why we are trying to get a Simoco Radio to work with remoterig rather than ditching it for a supported radio.

Sincerely,
Adrian
Kirkby Stephen Mountain Rescue, UK.


Jan (Microbit)

  • Software Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #1 on: 2015-04-20, 10:39:26 »
Is the logged data from the serial ports? Not from "sniffing" the network?

The transparent mode is "difficult" since it causes a lot of overhead on the network as it sends one byte per UDP packet. It has to be that way since the RRC does not know about the protocol used. So due to the nature of the Transparent mode seeing such behavior is possible.

It would most likely work much better if the RRC had a "map 27" mode since it seems every message starts with:

16 10 02

and ends with:

10 03 XX XX

where XX XX is a two bytes CRC.

Always include type of hard/software and version when asking for support.

ksmrt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #2 on: 2015-04-20, 14:42:22 »
Hi Jan,

Thank you,

I have since found out that Mode 3 puts all the message bytes together in 1 UDP message.  There is a timeout that determines the end of a message.
It now works !, well almost - now I cannot hear anything when I transmit... I am recieveing and controlling fine !

I wonder if mode 3 afffects the audio  ? or perhaps the UDP audio isn't getting to the radio...

Thanks,
Adrian

Jan (Microbit)

  • Software Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #3 on: 2015-04-20, 14:52:50 »
Mode 3 should not have something to do with the audio. Have you checked the status page on both RRCs?
Always include type of hard/software and version when asking for support.

ksmrt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #4 on: 2015-04-20, 14:58:42 »
Cannot see anything wrong:

This is the Radio Status:

Name   Value
Radio   ON
Connection status   OK
SIP status   Connected/transfering
Last SIP error   None
RTP status   Excellent(59)
UDP cmd status   OK(36)
SIP command timeout   0
Rx Jitter buffer size   4
Rx Jitter delay   3
Dual Rx   0
Current audio packet size   20
Current audio quality   2 - Linear 16 bits 8 kHz
External IP   188.29.19.124
SIP Out port   9301
SIP In port   13000
Audio Out port   9338
Audio In port   13001
Command Out port   9822
Command In port   13002
External SIP In port   13000
External Audio In port   13001
External Cmd In port   13002
Other party   xxx.xxx.xxx.xxx
Input 1   High
Input 2   High
Output 0   Low
Output 1   Low
Output 2   Low
Dynamic DNS status   OK
Ping status (watchdog)   Off
DNS status   OK, remoterig.com = xxx.xxx.xxx.xxx
Active profile   Default
PTT status   OFF
Antenna-Switch (IP)   not connected
Common network settings   No


This is Control:

Name   Value
Control panel   ON
Radio   OFF
Connection status   OK
SIP status   Connected/transfering
Last SIP error   None
RTP status   Excellent(60)
UDP cmd status   OK(45)
SIP command timeout   0
Rx Jitter buffer size   4
Rx Jitter delay   3
Dual Rx   0
Current audio packet size   20
Current audio quality   2 - Linear 16 bits 8 kHz
SIP Out port   13000
SIP In port   13000
Audio Out port   13001
Audio In port   13001
Command Out port   13002
Command In port   13002
External SIP In port   13000
External Audio In port   13001
External Cmd In port   13002
Other party   188.29.19.124
Input 0   High
Input 1   High
Input 2   High
Output 0   High
Output 1   Low
Output 2   Low
DNS status   OK,xxxxxxxxxxxxxxxx.ddns.remoterig.com = xxx.xxx.xxx.xxx
Active profile   Default
PTT status   OFF
Common network settings   No

This again works on teh LAN but not the WAN... the 13001 port is forward on the Radio Side (nothing forwarding on the Control Side). 
Thanks again,
Adrian


ksmrt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #5 on: 2015-04-20, 15:47:53 »
Putting the Radio back on to LAN, audio works in MODE 0, but not in MODE 3...
I think MODE 3 has more going on that just the COM0 serial port databyte format...

Thanks,
Adrian

Jan (Microbit)

  • Software Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #6 on: 2015-04-20, 16:28:55 »
I do not feel sure any longer which "mode" parameter you are referring to? At first you mentioned "Transparent", which only is present in "Radio settings" -> "Program mode", then you started to mention mode 3, which I assumed is found in "Serial settings" -> "COM 1/2 mode"?  ;)
Always include type of hard/software and version when asking for support.

ksmrt

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Missing/Swapped Data Bytes on COM0
« Reply #7 on: 2015-04-20, 19:00:44 »
Thanks,

I have always been refering to the Radio Setting "Program Mode" (COM0), sorry for the confusion.
I have now resolved all the issues.

The Radio Setting Program Mode needs to be in mode 3 (FT-8x7, FT-1000x).
The RTP tx mode needs to be in "Continuous".

There is no PTT signal in the Simoco Radio/Control unit cable, so there is nothing to trigger the audio to be sent when RTP rx mode is "Normal". 
I have found and decoded the messages I need to trigger the PTT... Is there any possibility that they could be added to the firmware to add Simoco Support?, otherwise I will put a PIC microcontroller onto a little daugher board and do it extrnally I'll also setup the staps on the board too. (I've layout the PCB already).

Thanks,
Adrian