July 10, 2019 - 11:48pm, 4587 views
I 'am investigating a issue with our pls-8x, where we get an IP from AT+CGPADDR but the linux dhcp client is incapable of getting an ip. How does AT+CGPADDR really work ?
Hello Alexandre,AT+CGPADDR command only allows to check if you have assigned IP address to the module or not. To get IP in your linux with the use of DHCP you should activate WWAN connection - please check AT^SWWAN command.Best regards,Adam
This is precisely what we do. We the use the WWan connectinon using SWANN, this allow the usb0 interface to work as a cdc-ether device. And then we use the dhcp client on that interface.
Most of the time we are capable of getting an IP but, sometime it fails.
OK, understood. Could you please check syslog to see if there is any DHCP communication between module and Linux? You can also paste it here. Command to check it on standard linux distribution is following:tail -f /var/log/syslog | grep -Ei 'dhcp'Best regards,Adam
we dont use syslog. This a strip down embedded linux system. We use pump as a dchp client.
Also the board is situated on the street and we dont have direct or live access.
Which is why ,I guess, I would prefer to understand the underlayer/implementation of CGPADDR...
Hello,Thanks for the feedback. AT+CGPADDR command returns only information about IP address assigned to the module. It is not related to WWAN protocol - only relation is that when you use AT^SWWAN on not active cid, module will send PDP REQUEST message to the network and, if network will accept it, GPADDR starts to return assigned IP address. So, CGPADDR command can be usfeul only for veryfying whether procedure of activating PDP context between module and network ended with succes.
Do you have any chance to check DHCP transmission between module and linux? I'm afraid without it it would be hard to say anything more.Best regards,Adam
Thank ! That information should help a lot !
While digging, we where able to look at the dhcp request between linux and the ****m.
Which bring a few question:
While the ****m is in IP **** and offer the linux network interface usb0 (SWWAN=1,1,1) , does the ****m become the dhcp server (or reply in any way to DCHP request)?
For now using tcpdump I can cleary see that the dhcp request is received and replied.
But talking to AT&T , they told us that they do not provide DHCP ?!
is it normal that the CGCONTTRDP does not return the Gateway ? we only get the DNS and IP
I was not able to get a tcp dump out when the dhcp request does not reply.
I hope you can provide some clarity on some of those point...
Hi Alexandre,exactly, on the module there is DHCP server running. Regarding gateway, is it possible for you to check gateway address on your linux machine instead of using AT+CGCONTRDP command?Have you noticed any relations between lack of dhcp request and not working WWAN on your linux machine?Best regards,Adam
Q - "Have you noticed any relations between lack of dhcp request and not working WWAN on your linux machine?"
A - no not yet. The only time dchp failed , we had confimed network connection to the ISP.
Q- "Regarding gateway, is it possible for you to check gateway address on your linux machine instead of using AT+CGCONTRDP command?"
A- yes , we where able to hand pick a valid gateway address. But this process was manual and not reliable. But when dhcp worked, we where able to get it whitout any issue.
Other then "Ifusing“busybox udhcpc“t oask themodule‘s DHCP server for an IPaddress,the host parameter is required, i.e., mandatory DHCP option 12:
>busybox udhcpc -i usb0 -h `hostname`" is there any other option that would be recomanded to use ?
Should a minimum timeout or number or retry ? Or is there generic guideline udhcpc on linux ?
We are using both linux 3.10.x and 2.6.x with a debian 6.
Thank you very much
© 2013-2022 THALES DIS AIS Deutschland GmbH