richonguzman / LoRa_APRS_iGate

LoRa APRS iGATE for ESP32 Based Board with Rx + Tx capabilities
MIT License
208 stars 65 forks source link

Bugfix/mic-e not gated #120

Closed F4FXL closed 3 months ago

F4FXL commented 3 months ago

Hi,

These 2 commit fix some issues with Mic-E und Base 91 packets not being igates/digipeated.

richonguzman commented 3 months ago

thanks a lot!

wb2osz commented 3 months ago

The last line of this doesn't look right to me.

                auto packetInfoFieldBeginIndex = packet.indexOf(':');
                if (packetInfoFieldBeginIndex >= 0
                    && packetInfoFieldBeginIndex < packet.length()
                    && packet[packetInfoFieldBeginIndex + 1] == '}'
                    && packet.indexOf("TCPIP") > 0) {   // 3rd Party 

A third-party packet has "}" as the first character of the information part. That is the only necessary condition.

In the case where an IS-to-RF IGate generated the third party packet, the inner (encapsulated) digipeater list will contain TCPIP. However third-party packets are more general and could be used in other situations.

F4FXL commented 3 months ago

The last line of this doesn't look right to me.

                auto packetInfoFieldBeginIndex = packet.indexOf(':');
                if (packetInfoFieldBeginIndex >= 0
                    && packetInfoFieldBeginIndex < packet.length()
                    && packet[packetInfoFieldBeginIndex + 1] == '}'
                    && packet.indexOf("TCPIP") > 0) {   // 3rd Party 

A third-party packet has "}" as the first character of the information part. That is the only necessary condition.

In the case where an IS-to-RF IGate generated the third party packet, the inner (encapsulated) digipeater list will contain TCPIP. However third-party packets are more general and could be used in other situations.

Yes, this came to my mind after submitting the PR. I was able to break the code by sending a status frame like F4FXL>APRS:>This breaks the code TCPIP @richonguzman said he'll refactor the code on his side.