2024-10-24 08:31 AM - edited 2024-11-05 03:15 AM
Hello everyone,
Today I'm writing to you because I'm trying to implement a PPPoS connection over the USB CDC Host of a STM32H745. The modem I'm trying to connect to is a SIM7500 of SimCom.
I managed to establish the connection between the modem and the mcu because I can see in the status callback the case PPPERR_NONE.
The problem is that even after establishing the connection, when I try to ping the ip that the SIM has assigned I cannot get a response. I tried to debug and I am able to see the ping received on the MCU side. It tries to respond and it but it never reaches te computer from which I sent the ping. If I'm not in PPP mode and I set up the PDP context I can ping the modem without any problem, so the ip is reachable.
Any ideas how should I proceed to debug that?
Thank you very much in advance
<!!!UPDATE!!!>
Seems like I haven't enabled the checksum generation and checksum control for lwip and I was sending packages with a 0x0 checksum.
For me worked enabling it with those 2 defines:
#define LWIP_CHECKSUM_CTRL_PER_NETIF 1
#define CHECKSUM_GEN_IP 1
Now I'm trying to open a tcp connection but seems like I have a problem with the routing. If anyone have an idea about how can I solve that I would appreciate.
Cheers
Solved! Go to Solution.
2024-11-07 07:17 AM - edited 2024-11-07 08:26 AM
UPDATE
I managed to make it work.
First I had to define LWIP_HOOK_IP4_ROUTE function because I'm using 2 interfaces and the pppos is not the default one.
And second I had to add 2 defines for checksum check tcp and for checksum generate tcp.
#define CHECKSUM_CHECK_TCP 1
#define CHECKSUM_GEN_TCP 1
Now everything is working fine.
Hope this helps if you have the same problem I had!
Cheers!
2024-11-07 07:17 AM - edited 2024-11-07 08:26 AM
UPDATE
I managed to make it work.
First I had to define LWIP_HOOK_IP4_ROUTE function because I'm using 2 interfaces and the pppos is not the default one.
And second I had to add 2 defines for checksum check tcp and for checksum generate tcp.
#define CHECKSUM_CHECK_TCP 1
#define CHECKSUM_GEN_TCP 1
Now everything is working fine.
Hope this helps if you have the same problem I had!
Cheers!
2024-11-12 08:16 AM
Does anyobody knows why I can process the tcp requests but not the http requests and half of the messages are dropped due to bad FCS?
Also, I can send pings of 16 bytes or less, but pings bigger than that are again being dropped.
Did anybody had this problem? Any ideas of how to solve that?
Thanks in advance!
2024-11-14 02:38 AM
Hello again, I managed to solve the issue mentioned before:
Seems like the USB_CDC_Class if its FS(Full Speed) the maximum size that can receive at once is 64 bytes, so bigger frames than that were coming fragmented.
The solution was to detect the begin of a PPP message and wait for the end among the incoming frames.
The begin is a 0x7e and the end is the same.
Hope this helps if you encounter the same problem.
Cheers!
2024-11-28 03:31 AM
Hi again,
I'm having a problem receiving snmpv3 frames.
I do receive them but they are not well processed and seems like they are being returned on the default net interface.
I tried setting the pppos as default interface but still the communication is not working well.
Is there any option that I should be turning on or any other aspect that I should take in consideration?
Thank you very much in advance!
Cheers