[WP7605][cm] No return after "Testing connection.." message

Back Ground:
I faced the issue that module have never been returned after “Testing connection” message by sending “cm data connection”.
[2020-07-02 08:59:17.431] root@swi-mdm9x28-wp:~# cm data connect
[2020-07-02 08:59:24.531] Setting up profile 1
[2020-07-02 08:59:24.548] Connecting … ok
[2020-07-02 08:59:24.707] Checking if device ‘rmnet_data0’ is up … ok
[2020-07-02 08:59:24.803] Routing inet … ok
[2020-07-02 08:59:24.820] mv: can’t remove ‘/etc/resolv.conf’: Device or resource busy
[2020-07-02 08:59:24.841] Updating /etc/resolv.conf … ok
[2020-07-02 08:59:24.841] Updating /etc/resolv.conf … ok
[2020-07-02 08:59:24.841] Testing connection … <== stopped

So I set [ctrl+C] in the timing of "Testing connection". However, module can establish PDP context after that, and succeeded ping. I keep to wait any returns after that, so module was returned "failed" after 10mins from "Testing connection" message. However, module can also establish PDP context after that.

====
I found potential work around that script of “cm” was changed source code(legato/systems/current/apps/tools/read-only/scripts/cm) as follows.

  • comment out Line#212 and #213
    echo -n “Testing connection …”
    curl --silent $TEST_SITE > $LOG 2>&1

As the result, module can be returned “ok” after “Testing connection” quickly.

Q1:
Is there any influence to be comment out as above?

Q2:
Do you know the know behavior of this question?

20200702_WP7605_cmconnect.log (5.1 KB)

Best Regards,

— Hiroki

Cm tool is just for testing purpose.
Not recommend to be used in final product.
If it can establish connection, then it is ok.

As jyijyi indicated, if you can ping after the connect then all is well.

cm tries to connect to https://www.akamari.com which is slow and bulky and in my experience often down. There also seem to be issue with https and curl (not sure yet… seems ipv6 related)

You can change TEST_SITE to http://www.google.com in the cm script to get quick pass result if you want.

TEST_SITE=${TEST_SITE:=“http://www.google.com”}

Hi, jyijyi, fpereriraEWC

Thanks for reply.
I understand that module can be succeeded ping.
However, I could not notify the success of cm data connect, so I could not proceed next sequence.
I don’t focus on NW connection issue.

As jyijyi said, I understand cm command could not use for end production, so I would like to know the influence in the fixing source code point of view.

legato/systems/current/apps/tools/read-only/scripts/cm
// echo -n “Testing connection …”
// curl --silent $TEST_SITE > $LOG 2>&1

Is there any influence to change the source code as above?
Regarding to your comment, I believed it is “No influence”.

If “No” of it, I think to use such work around.

Why don’t just change to google server as TEST_SITE?

Sorry for double check.
It means that you don’t recommend the following source code.

TEST_SITE=${TEST_SITE:=“http://www.google.com”}

In the other words, we can change the following source code (Add comment-out).
// curl --silent $TEST_SITE > $LOG 2>&1

Is my understanding correct?

no, i recommend to use
TEST_SITE=${TEST_SITE:=“[http://www.google.com"}

as this can have faster response according to fpereiralEWC.

Make-sense, I will contact fpereiralEWC about TEST_SITE=${TEST_SITE:=“[http://www.google.com"} changing.

So how about comment-out changing? You did not recommend such changing, right?

it is up to you, see if you want to test the connection.

OK, I understand there is no influence by adding comment out as follows.
legato/systems/current/apps/tools/read-only/scripts/cm
// echo -n “Testing connection …”
// curl --silent $TEST_SITE > $LOG 2>&1

Hi, fpereiraEWC

TEST_SITE=${TEST_SITE:=“http://www.google.com”}

You said the above source code is adding in legato/systems/current/apps/tools/read-only/scripts/cm.

And if I would like to test to connect another server, I change ${TEST_SITE:=“<server_URL>”} every time, depend on server.
Is that right?

ex) connect to httpbin.org case
TEST_SITE=${TEST_SITE:=“http://httpbin.org"}

Hi HIROKI11976

Yes, that is correct.

However as jyijyi indicated, the cm tool is for testing the interface and the script itself should not be used for any type of production solution.

Hi, fpereiraEWC

Thanks for response, well-noted.

comment out Line#212 and #213
echo -n “Testing connection …”
curl --silent $TEST_SITE > $LOG 2>&1

BTW, could you tell me more detail what process does the above operate?
Currently, we try to implement LE function, so we checked source code.

Hi jyijyi

comment out Line#212 and #213
echo -n “Testing connection …”
curl --silent $TEST_SITE > $LOG 2>&1
BTW, could you tell me more detail what process does the above operate?
Currently, we try to implement LE function, so we checked source code.

If you know, could you please let me know it?
Sorry for rushing you.

It is doing connection testing

Hi, jyijyi
Thanks for reply, and please let me know more detail.

It is doing connection testing

CM command have test server in default, and the module try to connect this server in first, in order to establish PDP context.

If my understanding is correct, the module was skipped this connection testing by adding comment-out in this line.

Is that correct?

I agree with your statement

Hi, fpereiraEWC

In the other legato platform, does WP76xx have a source code to test connection to other URL, instead of akamari.com ?

Hi HIROKI11976

There seems to be some confusion, let me summarise.

  1. The CM connect tool is a command line interface to help developers quickly test the data connection.
  2. The CM connect tool is not for any production enviroment, it is a test tool.
  3. The 2 lines you remove simply stop the CM tool from testing the data connection.
  4. At the point where those 2 lines are removed, the PDP connection is already established.
  5. Therefore you don’t need to “test connection” to establish PDP.
  6. Without the 2 lines of code, if all went well prior, you will have an active data connection.

Hi, fpereiraEWC

Yes, I understanding the summarize, but I would like to know your plan whether you will fix the behavior of test connection to akamari.com in future legato version.

Of course, I understand that CM command is used for test purpose, but I concerned whether is any influence due to remaining the behavior of test connection to akamari.com.
(Other Sierra engineer said it seems to be caused MCU busy by analyzing logs, and this “No return” behavior was caused in all of WP7605.

That’s why, I asked it. Sorry for inconvenient you.