Cannot access http server to get data by cURL in FX30

Hi ,

I want to use fx30 to get data by cURL, but it is failed.

My step is

  1. I try to use cURL in ubuntu, and it worked.
  2. The same command in FX30 then I got error.
*   Trying 211.xx.136.xxx..
* TCP_NODELAY set
* connect to 211.xxx.136.xx port 8081 failed: Connection timed out
* Failed to connect to xxx port 8081: Connection timed out
* Closing connection 0
curl: (7) Failed to connect to xxx port 8081: Connection timed out

Why I can’t use it?
BTW I can ping this address success.
Please help me, thanks!!

how about using wget command?
Is it same result?

What is the return of the following?
ati3
at!impref?
at!gstatus?

What is the return of “cm data” and “cm radio”?

Hi @jyijyi ,

  1. I use wget and I got the same result.
    My commnad is like below
wget -O - 211.xxx.136.xxx:8081/php/read.php?tblname=users > /dev/nul
l 2>&1
  1. ati3
ati3

Manufacturer: Sierra Wireless, Incorporated
Model: FX30(WP7607-1)
Revision: SWI9X07Y_02.18.05.00 000000 jenkins 2018/07/19 17:40:21
IMEI: 352650100109186
IMEI SV:  5
FSN: V2929101461510
+GCAP: +CGSM

at!impref?

!IMPREF:
 preferred fw version:    02.18.05.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_002.041_002
 current fw version:      02.18.05.00
 current carrier name:    GENERIC
 current config name:     GENERIC_002.041_002

at!gstatus?


!GSTATUS:
Current Time:  2435             Temperature: 29
Modem Mitigate Level: 0         ModemProc Mitigate Level: 0
Reset Counter: 1                Mode:        ONLINE
System mode:   LTE              PS state:    Attached
LTE band:      B3               LTE bw:      20 MHz
LTE Rx chan:   1750             LTE Tx chan: 19750
LTE CA state:  INACTIVE
EMM state:     Registered       Normal Service
RRC state:     RRC Idle
IMS reg state: No Srv

PCC RxM RSSI:  -51              RSRP (dBm):  -85
PCC RxD RSSI:  -92              RSRP (dBm):  -135
Tx Power:      0                TAC:         2E19 (11801)
RSRQ (dB):     -13              Cell ID:     033DA40D (54371341)
SINR (dB):      0.2

cm data

Index:                         1
APN:                           internet
PDP Type:                      IPV4
Connected:                     yes
Interface:                     rmnet_data0
Family[IPv4]:                  inet
IP[IPv4]:                      10.234.219.17
Gateway[IPv4]:                 10.234.219.18
Dns1[IPv4]:                    168.95.1.1
Dns2[IPv4]:                    168.95.192.1

cm radio

Power:                         ON
Current Network Operator:      Chunghwa Telecom
Current RAT:                   LTE network (LE_MRC_RAT_LTE)
Status:                        Registered, home network (LE_MRC_REG_HOME)
Signal:                        Very strong signal strength (5)
PS:                            Packet Switched Registered, home network (LE_MRC_REG_HOME)

I don’t see problem, maybe you can upgrade FW:

root@swi-mdm9x28-wp:~# cm info
Device:                        WP7609
IMEI:                          359782080100123
IMEISV:                        E
FSN:                           WA803370311123
Firmware Version:              SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
Bootloader Version:            SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
MCU Version:                   002.015
PRI Part Number (PN):          9908102
PRI Revision:                  001.000
Carrier PRI Name:              GENERIC
Carrier PRI Revision:          002.095_000
SKU:                           1103843
Last Reset Cause:              Power Down
Resets Count:                  Expected: 74     Unexpected: 0
root@swi-mdm9x28-wp:~# pwd
/home/root
root@swi-mdm9x28-wp:~# cm sim
SIM card is inserted and unlocked (LE_SIM_READY).

root@swi-mdm9x28-wp:~# cm data
Index:                         1
APN:                           smartone
PDP Type:                      IPV4
Connected:                     no
Auth type:                     PAP
User name:
Password:
root@swi-mdm9x28-wp:~# cm radio
Power:                         ON
Current Network Operator:      SmarTone HK
Current RAT:                   LTE network (LE_MRC_RAT_LTE)
Status:                        Registered, home network (LE_MRC_REG_HOME)
Signal:                        Very strong signal strength (5)
PS:                            Packet Switched Registered, home network (LE_MRC_REG_HOME)

root@swi-mdm9x28-wp:~# cm data connect &
root@swi-mdm9x28-wp:~# Setting up profile 1
Connecting ... ok
Checking if device 'rmnet_data0' is up ... ok
Routing inet ... ok
Updating /etc/resolv.conf ... ok
Updating /etc/resolv.conf ... ok
Testing connection ...
root@swi-mdm9x28-wp:~# cm data
Index:                         1
APN:                           internet
PDP Type:                      IPV4
Connected:                     yes
Interface:                     rmnet_data0
Family[IPv4]:                  inet
IP[IPv4]:                      182.153.89.41
Gateway[IPv4]:                 182.153.89.42
Dns1[IPv4]:                    10.30.23.130
Dns2[IPv4]:                    10.30.25.130
root@swi-mdm9x28-wp:~# ping www.google.com
PING www.google.com (172.217.24.228): 56 data bytes
64 bytes from 172.217.24.228: seq=0 ttl=117 time=33.745 ms
64 bytes from 172.217.24.228: seq=1 ttl=117 time=49.221 ms
^C
--- www.google.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 33.745/41.483/49.221 ms
root@swi-mdm9x28-wp:~# wget http://122.123.123.123/index.php
Connecting to 122.123.123.123 (122.123.123.123:80)
index.php            100% |*******************************|  4026   0:00:00 ETA
root@swi-mdm9x28-wp:~#

Hi @jyijyi ,

I try to use FDT@ or swiflash to download “FX30_WP76xx_full_R16.0.1.006-generic-SWI9X07Y_02.37.03.00.cwe”

FDT command:

 .\fdt2.exe -d wpspk -f .\FX30_WP76xx_full_R16.0.1.006-generic-SWI9X07Y_02.37.03.00.cwe

Result:

FDT version: 2.0.2012.0
Awaiting adapter ...
Firmware download failed.
Primary error code: 14 - No MBN adapter available.
Secondary error code: 0 - Not applicable.
Device error code: 0x0 - Unknown device error code.

Preexisting images information:
        Current:
                Firmware:
                        ImageId:
                        BuildId:
                Configuration:
                        ImageId:
                        BuildId:
Final images information:
        Current:
                Firmware:
                        ImageId:
                        BuildId:
                Configuration:
                        ImageId:
                        BuildId:

OEM PRI:

IMEI:

Total time elapsed: 140 ms.


Images downloaded:


Press Enter to continue ...

swiflash command:

swiflash -m wp76xx -i ./FX30_WP76xx_full_R16.0.1.006-generic-SWI9X07Y_02.37.03.00.cwe 
Detecting USB of the target
DONE
Communicating with the target
DONE
Switching to firmware download mode
..............DONE
Downloading the firmware
.............................................................................................................................................................................................................................................................

but It seems not work.

How can I download this FW?

how did you do in the past?
As in the past, you can download by fdt2.exe:

Another method is to transfer the spk file to /tmp of module by SCP command, after that you can type “fwupdate download /tmp/xxx.spk” to upgrade FW.

Hi @jyijyi ,

I got it and I updated success, but it still not work to get data

ati3

Manufacturer: Sierra Wireless, Incorporated
Model: FX30(WP7607-1)
Revision: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
IMEI: 352650100109186
IMEI SV: 14
FSN: V2929101461510
+GCAP: +CGSM

at!impref?

!IMPREF:
 preferred fw version:    02.37.03.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_002.095_000
 preferred subpri index:  000
 current fw version:      02.37.03.00
 current carrier name:    GENERIC
 current config name:     GENERIC_002.095_000
 current subpri index:    000

at!gstatus?

!GSTATUS:
Current Time:  477              Temperature: 31
Modem Mitigate Level: 0         ModemProc Mitigate Level: 0
Reset Counter: 2                Mode:        ONLINE
System mode:   LTE              PS state:    Attached
IMS reg state: UNKNOWN          IMS mode:    Not Support
IMS Srv State: UNKNOWN SMS,UNKNOWN VoIP
LTE band:      B1               LTE bw:      15 MHz
LTE Rx chan:   525              LTE Tx chan: 18525
LTE CA state:  INACTIVE
EMM state:     Registered       Normal Service
RRC state:     RRC Idle

PCC RxM RSSI:  -50              RSRP (dBm):  -83
PCC RxD RSSI:  -90              RSRP (dBm):  -136
Tx Power:      --               TAC:         2E19 (11801)
RSRQ (dB):     -13              Cell ID:     0346841A (54952986)
SINR (dB):      3.0

OK

cm data

Index:                         1
APN:                           internet
PDP Type:                      IPV4
Connected:                     yes
Interface:                     rmnet_data0
Family[IPv4]:                  inet
IP[IPv4]:                      10.236.143.184
Gateway[IPv4]:                 10.236.143.185
Dns1[IPv4]:                    168.95.1.1
Dns2[IPv4]:                    168.95.192.1

cm radio

Power:                         ON
Current Network Operator:      Chunghwa Telecom
Current RAT:                   LTE network (LE_MRC_RAT_LTE)
Status:                        Registered, home network (LE_MRC_REG_HOME)
Signal:                        Very strong signal strength (5)
PS:                            Packet Switched Registered, home network (LE_MRC_REG_HOME)

I try to download same as your test

wget http://122.123.123.123/index.php

I can ping success google.

But it still not work.

Please help me. Thanks.

122.123.123.123 is fake IP address, you need to set up your own http server to test this.
You can capture the wireshark log in server side to see what happens.

Hi @jyijyi ,

I try to get google response

command like below:

curl -v www.google.com
or 
wget www.google.com

Both command in ubuntu and FX30 the result is different.

In Ubuntu:

curl:

curl -v www.google.com
* Rebuilt URL to: www.google.com/
*   Trying 142.251.43.4...
* TCP_NODELAY set
* Connected to www.google.com (142.251.43.4) port 80 (#0)
> GET / HTTP/1.1
> Host: www.google.com
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Thu, 13 Oct 2022 07:50:01 GMT
< Expires: -1
< Cache-Control: private, max-age=0
< Content-Type: text/html; charset=ISO-8859-1
< P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< Server: gws
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN

wget

--2022-10-13 15:51:29--  http://www.google.com/
Resolving www.google.com (www.google.com)... 142.251.43.4, 2404:6800:4012:3::2004
Connecting to www.google.com (www.google.com)|142.251.43.4|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html              [ <=>                ]  15.16K  --.-KB/s    in 0.02s   

2022-10-13 15:51:30 (923 KB/s) - ‘index.html’ saved [15526]

In FX30:
curl

curl -v www.google.com
* Rebuilt URL to: www.google.com/
*   Trying 172.217.163.36...
* TCP_NODELAY set
*   Trying 2404:6800:4012:2::2004...
* TCP_NODELAY set
* Immediate connect fail for 2404:6800:4012:2::2004: Network is unreachable
*   Trying 2404:6800:4012:2::2004...
* TCP_NODELAY set
* Immediate connect fail for 2404:6800:4012:2::2004: Network is unreachable
*   Trying 2404:6800:4012:2::2004...
* TCP_NODELAY set
* Immediate connect fail for 2404:6800:4012:2::2004: Network is unreachable
*   Trying 2404:6800:4012:2::2004...
* TCP_NODELAY set
* Immediate connect fail for 2404:6800:4012:2::2004: Network is unreachable

wget
Stuck in here.

root@fx30:~# wget www.google.com
Connecting to www.google.com (142.251.42.228:80)

Please try with another SIM card and operator.
I think your network has some problem.

Why you think this ?

I can ping 8.8.8.8 and www.google.com

then you can capture wireshark log on module side and see what happens inside.

BTW, you can also try to shutdown the firewall:

iptables -I INPUT -j ACCEPT

Hi @jyijyi ,

I execute command:

iptables -I INPUT -j ACCEPT

I seem worked.