BG96 problem downloading a file via HTTPS

Hello together,

my goal is to find out the data rate in the NB and 2G network using the BG96 module.
For this I want to download a file on a HTTPS page while I’m measuring the time.
I use AT-commands for programming.

my problem:

I figured out that the correct order of certain AT-commands is key in obtaining the desired results.

I’m able to connect to the 2G network and I’m able to visit the website with the file, using the “AT+QHTTPuRL=100,80” -command.
So far so good, but if I want to proceed and download the actual file by using “at+qftpget=“SamplePNGImage_100kb.png”,“com:” “ -command, I get a “not logged in” Error.

Here is the manual I using for downloading the Data:

Here is my Log:

AT+QCFG=“band”,0,0,80000,1
OK
AT+QCFG=“nwscanmode”,1,1
OK
AT+QCFG=“iotopmode”,2,1
OK
AT+QCFG=“servicedomain”,1,1
OK
AT+CGDCONT=1,“IP”,“iot.1nce.net
OK
AT+CFUN=1
OK
AT+COPS=1,2,“26202”,9
OK
AT+QIACT=1
OK
AT+QCFG=“nbsibscramble”,0
OK
AT+QNWINFO
+QNWINFO: “EDGE”,“26201”,“GSM 900”,116
OK
at+qcsq
+QCSQ: “GSM”,-59
OK
AT+QICSGP=1
+QICSGP: 1,“iot.1nce.net”,"","",0
OK
AT+QHTTPuRL=100,80
CONNECT
HTTPS://*******.com/examplePNG100kb.png
DSR:0 CTS:0 RI:0 (DCD:1)
OK
AT+QHTTPGET=60
OK
+QHTTPGET: 0,200
AT+QFTPGET=“SamplePNGImage_100kb.png”,“com:”
+CME ERROR: Not logged in

Can someone tell me what I’m doing wrong? Am I using simply the wrong order for downloading the file or do I have to use other commands instead?

Or maybe there is even something wrong to begin with – do you know what’s responsible for the error “not logged in”?

I need to download the file – How do I do that? Is it possible within NB too?

If somebody knows a better idea to get the data rate you are welcome to tell me :blush:

Thanks a lot for your support, I’ll appreciate your help!

Yours sincerely
Sim

@Sim
Hello,
It seems you are trying to run an FTP command on an HTTP URL. This is not the correct way to download a file from a remote server as far as I know. For downloading via FTP command you need to connect and log in to an FTP server. Also, the second parameter of the FTP get command is file size and it is not a string.
Regards
Altamash

1 Like

Hi Sim,

1.For data rate test ,Pls kindly login with the below link
https:www.speedtest.net.

2.for file download with http , URL will include file path , pls refer to AT+QHTTPURL cmd.

  1. As altamash said , pls do not using FTP cmd here .
1 Like