DNS resolve issues using GSM/LTE


markus.prager@...
 
Edited

Hi, I am trying to set up a working Internet access via a SIM7000e GSM/LTE module. The LTE connection itself I got working using the GSM sample application. A ping for example is working perfectly (as long as I am addressing an IP directly).

Now I wanted to get the HTTP GET example working. For this however, I need a working DNS. I tried to use the DNS resolve example to figure out how this all works, but sadly it is not working correctly for me for some reason I do not fully  understand.

If I understand the feedback I am getting from my program correctly, my DNS requests are being sent out without a problem, but the reply does not seem to be working correctly or not to be interpreted correctly. I am seeing some sort of reply for my requests, but the reply is not attributed to the right request and is also cut short.

The part about not being attributed to the right request may be because of the delay that LTE has. The ping usually gets ~600ms. That might be a problem? I set DNS_TIMEOUT to SYS_FOREVER_MS to accommodate for this. The bigger problem however seems to be the fact, that the response packets are being cut short by something.

Here are three example HEX dumps from packets that I was able to get from the log: 

ff 03 00 21 45 00 00 48 ee 08 00 00 36 11 b1 01 08 08 08 08 64 6e 71 1d 00 35 de 03 00 34 62 4e d8 16 81 80 00 01 00 01 00 00 00 00 06 67 6f 6f
ff 03 00 21 45 00 00 48 73 47 00 00 76 11 45 56 08 08 08 08 64 71 17 87 00 35 e8 65 00 34 42 7c a9 bc 81 80 00 01 00 01 00 00 00 00 06 67 6f 6f 67 6c 65
ff 03 00 21 45 00 00 48 a5 e1 00 00 75 11 5c 76 08 08 08 08 64 6c ce d1 00 35 9a 41 00 34 24 b4 fb cc 81 80 00 01 00 01 00 00 00 00 06 67 6f 6f 67 6c 65 03

As you can see, they are always cut short at different parts of the frame. All of them are rightly getting an "Invalid FCS" error because of this. I would guess that is also the reason the callback function from the DNS resolve example is not getting called at all (because the response packets are broken). I just do not understand why they are broken and why they always seem to get broken at different points (or rather cut off at different points of the frame).

for reference: here is a healthy frame from another system:
2c b8 ed 61 29 40 cc 48 3a a7 ff 73 08 00 45 00 00 38 f0 a1 00 00 40 11 b2 89 c0 a8 06 d2 08 08 08 08 9f f7 00 35 00 24 d7 bf 66 91 01 00 00 01 00 00 00 00 00 00 06 67 6f 6f 67 6c 65 03 63 6f 6d 00 00 01 00 01

As far as I can see, there is only one function that is cutting away parts of the frame, and that is in </drivers/net/ppp.c>, the function <ppp_process_msg>. It is cutting away the ethernet part of the frame. However, this should not lead to the frame being cut as far as it is being cut (as shown above) and also not lead to it being cut away at randomly different parts of the frame.

Thanks in advance for any help!

Cheers,
Markus