Skip to contentSkip to conversation

Inform Huawei modem using ACCM 0xffffffff to trasmit package. Using my Huawei modem (EM770W) if set ACCM as 0x00000000, the RXJ- event will happend, and PPP link down, when IP package transmit for a while. After I set ACCM as 0xffffffff, the RXJ- event never happen, and the modem can work quite stable. I tested the modem at China Unicom networks.

PATCH In review [email protected] 3 participants 3 messages Jan 10, 2011 – Jan 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Inform Huawei modem using ACCM 0xffffffff to trasmit package. Using my Huawei modem (EM770W) if set ACCM as 0x00000000, the RXJ- event will happend, and PPP link down, when IP package transmit for a while. After I set ACCM as 0xffffffff, the RXJ- event never happen, and the modem can work quite stable. I tested the modem at China Unicom networks.

From: Martin Xu <[email protected]>

---
 gatchat/ppp_lcp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
gatchat/ppp_lcp.c +2 -2
index bc97257..181bc14 100644
@@ -106,7 +106,7 @@ static void lcp_generate_config_options(struct lcp_data *lcp)
 static void lcp_reset_config_options(struct lcp_data *lcp)
 {
 	lcp->req_options = REQ_OPTION_ACCM;
-	lcp->accm = 0;
+	lcp->accm = ~0U;
 
 	lcp_generate_config_options(lcp);
 }
@@ -153,7 +153,7 @@ static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet)
 		 * The Configuration Option is used to inform the peer which control
 		 * characters MUST remain mapped when the peer sends them.
 		 */
-			ppp_set_recv_accm(pppcp_get_ppp(pppcp), 0);
+			ppp_set_recv_accm(pppcp_get_ppp(pppcp), ~0U);
 			break;
 		default:
 			break;
Signature · 1 line
1.7.2.2
#1 lore raw

Hi Martin,

Quoted 6 lines · martin.xu(a)intel.com

From: Martin Xu <[email protected]>

---
 gatchat/ppp_lcp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Can you please fix up your subject? It is simply too long. Make the subject short and use the description field to describe the rest.

Do you have (or can you generate) a pppdump of this happening? What protocol is RXJ- happening on? Does LCP layer accept our ACCM of 0 and then later sends an RXJ-?

gatchat/ppp_lcp.c static void lcp_generate_config_options(struct lcp_data *lcp) · line 110

Quoted 11 lines
gatchat/ppp_lcp.c +1 -1
index bc97257..181bc14 100644
@@ -106,7 +106,7 @@ static void lcp_generate_config_options(struct lcp_data *lcp)
 static void lcp_reset_config_options(struct lcp_data *lcp)
 {
 	lcp->req_options = REQ_OPTION_ACCM;
-	lcp->accm = 0;
+	lcp->accm = ~0U;
 

Strictly speaking, RFC 1662 says this about the default ACCM:

"For other types of links, the default value is 0, since there is
no need for mapping."

In theory we fall into the 'other type' category.

gatchat/ppp_lcp.c static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet) · line 156

Quoted 8 lines
gatchat/ppp_lcp.c +1 -1
 	lcp_generate_config_options(lcp);
 }
@@ -153,7 +153,7 @@ static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet)
 		 * The Configuration Option is used to inform the peer which control
 		 * characters MUST remain mapped when the peer sends them.
 		 */
-			ppp_set_recv_accm(pppcp_get_ppp(pppcp), 0);
+			ppp_set_recv_accm(pppcp_get_ppp(pppcp), ~0U);

See my comment for the previous patch. This part should not be needed.

gatchat/ppp_lcp.c static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet) · line 159

Quoted 3 lines
gatchat/ppp_lcp.c +0 -0
 			break;
 		default:
 			break;

Regards,
-Denis

#2 lore raw

RE: [PATCH 2/2] Inform Huawei modem using ACCM 0xffffffff to transmit package. Using my Huawei modem (EM770W) if set ACCM as 0x00000000, the RXJ- event will happened, and PPP link down, when IP package transmit for a while. After I set ACCM as 0xffffffff.

Hi Denis:

Quoted 15 lines

-----Original Message-----
From: Denis Kenzior [mailto:denkenz(a)gmail.com]
Sent: Wednesday, January 12, 2011 1:11 AM
To: ofono(a)ofono.org
Cc: Xu, Martin
Subject: Re: [PATCH 2/2] Inform Huawei modem using ACCM 0xffffffff to trasmit package. Using my Huawei modem (EM770W) if set ACCM as 0x00000000, the RXJ- event will happend, and PPP link down, when IP package transmit for a while. After I set ACCM as 0xffffffff...

Hi Martin,

Quoted 2 lines · martin.xu(a)intel.com

From: Martin Xu <[email protected]>

Quoted 7 lines
Quoted 4 lines
---
 gatchat/ppp_lcp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Can you please fix up your subject? It is simply too long. Make the subject short and use the description field to describe the rest.

I reinstalled my system, seems like git-send-email has messed up the subject and my description. I will fix that.

Quoted 4 lines

Do you have (or can you generate) a pppdump of this happening? What protocol is RXJ- happening on? Does LCP layer accept our ACCM of 0 and then later sends an RXJ-?

I have generated the pppdump and RXJ- is protocol reject. Protocol code is 0x0045, (if I am not wrong). The RXJ- is totally unreasonable. LCP layer has already accept our ACCM 0.
And oFono never send the Protocol, So the main reason is data transmit error.

Quoted 16 lines

gatchat/ppp_lcp.c static void lcp_generate_config_options(struct

Quoted 6 lines
gatchat/ppp_lcp.c +0 -0
index bc97257..181bc14 100644
@@ -106,7 +106,7 @@ static void lcp_generate_config_options(struct

lcp_data *lcp)

gatchat/ppp_lcp.c static void lcp_generate_config_options(struct lcp_data *lcp) · line 110

Quoted 6 lines
gatchat/ppp_lcp.c +1 -1
 static void lcp_reset_config_options(struct lcp_data *lcp)
 {
 	lcp->req_options = REQ_OPTION_ACCM;
-	lcp->accm = 0;
+	lcp->accm = ~0U;
 

Strictly speaking, RFC 1662 says this about the default ACCM:

Quoted 4 lines

"For other types of links, the default value is 0, since there is
no need for mapping."

In theory we fall into the 'other type' category.

I don't know why we should fall into 'other type'? :-) I think that depends on modem we used.

Quoted 17 lines

gatchat/ppp_lcp.c static void lcp_rca(struct pppcp_data *pppcp, const

Quoted 3 lines
gatchat/ppp_lcp.c +0 -0
 	lcp_generate_config_options(lcp);
 }
@@ -153,7 +153,7 @@ static void lcp_rca(struct pppcp_data *pppcp, const

struct pppcp_packet *packet)

gatchat/ppp_lcp.c static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet) · line 156

Quoted 5 lines
gatchat/ppp_lcp.c +1 -1
 		 * The Configuration Option is used to inform the peer which control
 		 * characters MUST remain mapped when the peer sends them.
 		 */
-			ppp_set_recv_accm(pppcp_get_ppp(pppcp), 0);
+			ppp_set_recv_accm(pppcp_get_ppp(pppcp), ~0U);

See my comment for the previous patch. This part should not be needed.

gatchat/ppp_lcp.c static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet) · line 159

Quoted 3 lines
gatchat/ppp_lcp.c +0 -0
 			break;
 		default:
 			break;

Regards,
-Denis