Hi Lars,
Only difference I see in case of pppd , config request is going with below
options.
Options: (16 bytes), Async Control Character Map(0x00000000), Magic Number,
Protocol Field Compression, Address and Control Field Compression
In case of ofono , none of the options are sent .
So I tried hard coding the option's as ppd , but still no response
+++ b/gatchat/ppp_lcp.c
@@ -119,6 +119,60 @@ static void lcp_generate_config_options(struct lcp_data
*lcp)
lcp->options_len = len;
}
+static void lcp_generate_config_options_modified(struct pppcp_data *pppcp,
struct lcp_data *lcp)
+{
+ guint16 len = 0;
+
+ //if (lcp->req_options & REQ_OPTION_ACCM) {
+ guint32 accm;
+ lcp->accm = 0U;
+ accm = htonl(lcp->accm);
+
+ lcp->options[len] = ACCM;
+ lcp->options[len + 1] = 6;
+ memcpy(lcp->options + len + 2, &accm, sizeof(accm));
+
+ len += 6;
+ //}
+
+ if (lcp->req_options & REQ_OPTION_MRU) {
+ guint16 mru;
+
+ mru = htons(lcp->mru);
+
+ lcp->options[len] = MRU;
+ lcp->options[len + 1] = 4;
+ memcpy(lcp->options + len + 2, &mru, sizeof(mru));
+
+ len += 4;
+ }
+
+ //if (lcp->req_options & REQ_OPTION_ACFC) {
+ lcp->options[len] = ACFC;
+ lcp->options[len + 1] = 2;
+
+ len += 2;
+ //}
+
+ //if (lcp->req_options & REQ_OPTION_PFC) {
+ lcp->options[len] = PFC;
+ lcp->options[len + 1] = 2;
+
+ len += 2;
+ //}
+
+ guint32 magic_number = 123456789;
+ guint32 magic_number1 = htonl(magic_number);
+
+ lcp->options[len] = MAGIC_NUMBER;
+ lcp->options[len + 1] = 6;
+ memcpy(lcp->options + len + 2, &magic_number1, sizeof(magic_number1));
+ len += 6;
+
+
+ lcp->options_len = len;
+}
+
static void lcp_reset_config_options(struct lcp_data *lcp)
{
/* Using the default ACCM */
@@ -392,7 +446,8 @@ struct pppcp_data *lcp_new(GAtPPP *ppp, gboolean is_server)
pppcp_set_data(pppcp, lcp);
- lcp_reset_config_options(lcp);
+ //lcp_reset_config_options(pppcp,lcp);
+ lcp_generate_config_options_modified(pppcp,lcp);
pppcp_set_local_options(pppcp, lcp->options, lcp->options_len);
return pppcp;
Regards,
Rakes
_______________________________________________
ofono mailing list -- [email protected]
To unsubscribe send an email to [email protected]