ELS81-E: invalid dhcp response after SWWAN command | Telit Cinterion IoT Developer Community
December 10, 2020 - 2:07pm, 1533 views
I am using ELS81-E modem with firmware rev 04.000. I observe an issue with PDP context activation when using AT^SWWAN command. As per ELS81-E AT command spec, the sequence is as follows:
- AT+CGDCONT
- AT^SWWAN
According to spec, CGACT is not needed since its context can not be reused for SWWAN. However for this command sequence modem returns invalid DHCP offer to DHCP client attached to the modem USB ethernet interface: offered client ip addr 0.0.0.0, gateway 0.0.0.1, and correct DNS servers. Valid DHCP response is returned for the following sequence: CGDCONT/CGACT/SWWAN. However for the latter case I have troubles with re-activating PDP context in the case of reconnects: AT^SWWAN=0,<cid> returns CME error code 3. Could you please clarify which command sequences should be used for PDP context activation/deactivation for the firmware in use in the case when DHCP is the preferred use-case ?
Regards,
Sergey
Hello,
I'd rather expect SWWAN to fail if the context is already activated. Unless it's the default context in 4G.
Could you check ATI1 reply and also paste a log?
Regards,
Bartłomiej
Hi Bartłomiej,
ATI1 reply:
Cinterion
ELS81-E
REVISION 04.000
A-REVISION 01.000.03
Meanwhile it looks like I figured out the correct approach. My mistake: I did not check the current state before applying the recommended PDP activation sequence. The context was already activated, so the second CGDCONT/SWWAN sequence ended up with invalid DHCP responses. For some reason, CGDCONT/CGACT/SWWAN worked in this case, but failed later on when re-activation was needed.
The right sequence was as follows:
1. Do not repeat CGDCONT if context is already activated
2. Run SWWAN
3. Run DHCP client on USB ethernet
After network reconnects perform the full activation sequence using CGDCONT/SWWAN.
Regards,
Sergey
Hello,
Good that it works now.
In general for SWWAN the context should be defined with CGDCONT but not activated with CGACT. DHCP clinet ***** to be activated after SWWAN execution. You can use SWWAN command to disconnect later.
BR,
Bartłomiej