Showing posts with label NBIoT. Show all posts
Showing posts with label NBIoT. Show all posts

Sunday, February 28, 2021

Komunikasi NB IoT NBIOT NB-IoT TELKOMSEL dengan modem Quectel BG96 Quectel BG-96 GPS GSM GPRS 4 BAND MODULE





 

Reset dan Power ON

Pada saat pertama kali modul disambungkan dengan baterai, sistem BG96 harus diberikan input pulsa reset minimal 500mS. Kemudian dilanjutkan dengan input pulsa Powerkey minimal 200mS.

Modem READY

Setelah power up berhasil maka tunggu sampai modem BG96 apakah sudah siap atau belum. Apabila ada balasan dari port serial berupa data karakter ASCII : "RDY", maka modem siap menerima perintah berikutnya.

    RDY

Respons AT OK

Kemudian lanjut kirim command melalui port serial data karakter ASCII "AT" dan tunggu sampai dibalas "OK"

    AT

    OK

 

Cek Fungsional Modem

AT+CFUN?

+CFUN: 1

OK


Cek SIM Card Status

AT+CPIN?

+CPIN: READY

OK

 

Cek Jaringan Operator Seluler

AT+COPS?

+COPS: 0,0,"Tsel-PakaiMasker",0

OK
 

Cek EPS Network Registration Status

AT+CEREG/

+CEREG: 0,4

OK

 

REBOOT Modules Apabila setelah 90 detik nilai CEREG tidak bernilai 1 atau 5

AT+CFUN=1,1

OK

POWERED DOWN

RDY
 

 

Disable Result Code - Error Message Format

AT+CMEE=0

OK 

 

Disable Time Zone Reporting of changed Event  - Time Zone Reporting
AT+CTZR=0

OK

Enable Automatic Time Zone Update

AT+CTZU=1

OK

Configure  Network  Category  to  be  Searched  under LTE (cat M1, cat NB1, cat M1 & NB1)
AT+QCFG="iotopmode",0,1

OK

Configure RAT(s) to be Searched (Auto , GSM, LTE)
AT+QCFG="nwscanmode",0,1

OK

Configure APN for PDP Context Profile

AT+QICSGP=1,1,"NB1INTERNET","","",0  // APN Telkomsel = NB1INTERNET

OK

Aktivasi PDP Context Profile

AT+QIACT=1                           // Activate context profile 1
 
OK                                             // Activation is successful
    
AT+QIACT?                             // Query context profile status
 
+QIACT: 1,1,1,"10.7.157.1"
 
OK

 

Open a TCP connection to the remote server, TCP Client works in buffer access mode

AT+QIOPEN=1,0,"TCP","202.74.236.117",1883,0,0    // Establish a TCP connection in context 
                                                                                         // profile 1, <connectid> is 0
 OK
 
 +QIOPEN: 0,0                                                                // Connected successfully


Send Data in Buffer Access Mode

AT+QISEND=0       // Send  changeable  length  data.  “SEND  OK”  does  not  mean  the                 
                                 // data has been sent to the server successfully. The host can query
                                 // whether the data has reached the server via AT+QISEND=0,0.
 
>test1<ctrl+Z>
 
SEND OK

AT+QISEND=0,4           //Send fixed length data and the data length is 4bytes.
 
>test
 
SEND OK
 
AT+QISEND=0,0            //Query the length of sent data.
 
+QISEND: 9,9,0

OK


Check the connection state

AT+QISTATE=1,0 //Query the connection status when <connectid> is 0
 

+QISTATE: 0,"TCP","202.74.236.117",1883,16309,2,1,0,0,"uart1"

OK

 

Receive Data from Remote Server in Buffer Access Mode

+QIURC: “recv”,0    // The <connectID> 0 received data.
AT+QIRD=0,1500    // Read data, and the length is 1500bytes.
+QIRD: 5                  // The length of actual received data is 5bytes.
 

test1

OK

AT+QIRD=0,1500
+QIRD: 0                  // No data in buffer.
OK

AT+QIRD=0,0         // Query the total length of received data,
                                 // including read and unreaddata.
+QIRD: 5,5,0

OK

 

Read the server respons

AT+QIRD=0,0

+QIRD: 0,0,0

OK


Cek Signal Modem

AT+QCSQ

+QCSQ: "GSM",-74

OK

 

Board BG96 dapat diorder disini: 

https://tokopedia.com/fawwazzshop/nb-iot-stm32-quectel-bg96-gps-gsm-gprs-4-band-module-modul-for-arduino