natecarlson / quectel-rgmii-configuration-notes

Notes on using a Quectel modem directly connected to Ethernet
68 stars 18 forks source link

Error from AT Command when trying to pass through IP Address #1

Open chansearrington opened 1 year ago

chansearrington commented 1 year ago

I've enabled ethernet mode through the regular (?) way, not the rgmii method.

I've also enabled TTL and changed the local LAN address to work better with my network.

BUT when I try to use the AT command to enable IP passthrough, I get a return of "error"

at+qmap="mpdn_rule",0,1,1,1,1,"FF:FF:FF:FF:FF:FF"
at+qmap="mpdn_rule",0,1,1,1,1,"FF:FF:FF:FF:FF:FF"
ERROR
natecarlson commented 1 year ago

Can you try:

at+qmap="mpdn_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"

I believe I was looking at the RM500 AT commands and testing on my RM500 when I built that part of the docs.. the RM520 docs are different:

<rule_num> Integer type. mPDN rule number. Range: 0–3.

<profileID> Integer type. APN profile ID. Range: 1–16.

<VLAN_ID> Integer type. VLAN ID. Range: 2–255.

<IPPT_mode> Integer type. Enable or disable IPPT mode (IP Passthrough mode).
0 Disable IPPT mode
1 Enable IPPT mode (ETH)
2 Enable IPPT mode (Wi-Fi)
3 Enable IPPT mode (USB-ECM/RNDIS)

<auto_connect> Integer type. Enable or disable automatic data backhaul connectivity.
1 Enable
0 Disable

<IPPT_info> String type.
If <IPPT_mode> is 1 or 2, <IPPT_info> is the peer NIC MAC address bound in IPPT mode.
If <IPPT_mode> is 3, <IPPT_info> is the peer host name bound in IPPT mode.
If <IPPT_mode> is 0, <IPPT_info> does not need to be filled in.
When <IPPT_mode> is not 0, if <IPPT_info> is specified, the bound peer NIC or peer host gets a public IP, and other devices get a private IP; if <IPPT_info> is not specified, only the first connected device gets a public IP, other devices will not be able to get IP.

..so the third field is VLAN, and you'll want 0 for default VLAN.

natecarlson commented 1 year ago

Also interesting:

AT+QMAP="mPDN_status" 

Response
+QMAP: "mPDN_status",<rule_num>,<profileID>,<IPPT_status>,<connect_status>

<rule_num> Integer type. mPDN rule number. Range: 0–3.

<profileID> Integer type. APN profile ID. Range: 1–16.

<IPPT_status> Integer type. Whether IPPT mode is enabled.
0 Enabled
1 Disabled

<connect_status> Integer type. Status of data backhaul connectivity.
0 Disconnected
1 Connected
natecarlson commented 1 year ago

I tried the passthrough on a spare RM520 with the at+qmap="mpdn_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF". Seems to work, for IPv4 at least?

chansearrington commented 1 year ago

Can you try:

at+qmap="mpdn_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF"

I believe I was looking at the RM500 AT commands and testing on my RM500 when I built that part of the docs.. the RM520 docs are different:

I got an accept response on this one "OK"

qy2009 commented 1 year ago

I am on the same boat here.

Tried with at+qmap="mpdn_rule",0,1,0,1,1,"FF:FF:FF:FF:FF:FF" . and failed :(

I noticed you mentioned ipv6, is that why?

Here is my ifconfig: image

natecarlson commented 12 months ago

I haven't tested IPv6 passthrough yet.. v4 did work for me with the command in my comment above, looks like the same one you used. Did the modem return ERROR when executing the command, or is passthrough just still not working?

qy2009 commented 12 months ago

Actually, I have contacted quectel tech support, he told me that IP pass-through only works when you connect to the internet via USB. if you are using ethernet, the IP pass-through won't work. that's why I am seeing the "ERROR" output.

You are using ethernet, not the USB to get the internet, right?

annualstatement commented 11 months ago

How does one reset this back to default if you decide you don't want ip passthrough anymore?

radiomean commented 11 months ago

Hi there,

Glad to hear from you. I've used your very helpful notes in git!

To reset it - short answer is I don't know...

I got the module (with latest firmware) into IPPT with the command -
at+qmap=“mpdn_rule”,0,1,0,4,1,“FF:FF:FF:FF:FF:FF” (note that this is not quite the same as in your notes). I got the latest Quectel_RG520N&RG525F&RG5x0F&RM5x0N_Series_AT_Commands_Manual_V1.0.0_Preliminary_20230731 manual via the Quectel forum. Changing the 4 to 0 should reset it but I now get 'ERROR'.

However, connecting the module to a Gl-inet router (model GL-AXT1800, flashed with OpenWRT) resulted in it reverting to NAT! I want to use my RM520N-GL modules on the WAN port so I'm trying to avoid double-NAT...

So it's a bit of a puzzle.

On Wednesday 09/08/2023 at 23:54, r01510 wrote:

How does one reset this back to default if you decide you don't want ip passthrough anymore? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

radiomean commented 11 months ago

Hi, did I reply to this?

at+qmap=“mpdn_rule”,0 disables IPPT - but I can't get it to work again!

Help!

On Wednesday 09/08/2023 at 23:54, r01510 wrote:

How does one reset this back to default if you decide you don't want ip passthrough anymore? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

dr-dolomite commented 9 months ago

Did anyone here successfully tried to passthrough public IPV6?

My current config is this:

AT+QETH="ipptmac",XX:XX:XX:XX:XX:XX (where XX is my actual WAN MAC)
AT+QETH="RGMII","ENABLE",1,1

It works and I can receive public IPV4 from my modem, however, theres no WAN IPV6 even though I can see it being assigned on my modem (AT+CGCONTRDP=1)

AT+QMAP="MPDN_RULE",0,1,0,1,1,"FF:FF:FF:FF:FF:FF" 

also works for me but I disabled it since the IPV6 wasn’t also working so I tried RGMII mode and sticked with it for now.