Page 2
Eseye® and its logos, Eseye Intelligently Connected® and Hera 300™ are trademarks of Eseye Ltd in the United Kingdom and/or other countries. All other marks and names mentioned herein may be claimed as the property of others. Last updated: 12 November 2021 Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Provisioning the Quectel BG96 module Limiting the AWS IoT Core policy Sending data from your thing to the cloud Sending data from the cloud to your thing Interacting with the AWS IoT shadow Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 4
General AT Commands for the Quectel BG96 module AT Command syntax Types of AT Commands and responses ETM Management AT commands ETMCFG – read and write configuration file values ETMCFGCHECK – checks if a new ETM configuration file is available ETMHFWCONF –...
Page 5
Installing the Windows USB drivers Connecting to the Quectel BG96 module Updating the modem firmware Installing ETM files on the Quectel BG96 module using Windows 10 Updating the modem firmware using Linux Connecting to the Quectel BG96 module Checking the existing Linux USB drivers...
This guide is designed to help you connect one or more things to Amazon Web Services (AWS) for data collection, storage and analysis purposes, using the Eseye-enabled Quectel BG96 module. You will also learn how to control the modem using AT commands.
Italics in a command depicts values or examples that need replacing CommandValue with your specific parameters. [CommandOptionalEntry] Square brackets display optional entries. ATCommandResponse Returned responses to AT Commands are displayed in monospaced bold typeface. <ASCIICHARACTERS> Returned ASCII characters are in uppercase. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
You use an AT-command interface to send and receive telemetry data to and from the cloud service. The Quectel BG96 module buffers publish data in non-volatile flash memory until it is delivered to the cloud. The flash memory queues messages when there is no network connection, and protects against data loss in the event of a power failure.
PWRKEY and the main AT UART and DTR line if power control is required. Do not disconnect the power supply to the Quectel BG96 module at any time, as the module requires power at all times, even during sleep mode.
If the configuration file [operation] <mode> is set to , then ETM automatically starts MQTT after mqtt power up. If the <mode> is not set, after each reboot you must send again. AT+ETMSTATE=startmqtt Eseye-enabled Quectel BG96 module Developer Guide v1.8...
9. Your system is now ready. Use AT commands to configure how data is sent and received between the cloud and the modem. For more information, see General AT Commands for the Quectel BG96 module on page 31. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
After deploying resources, you can use AnyNet IRIS to review the status of your things in each region in a specified time period, view the deployed Cloud Formation template contents, as well as manage configuration and updates. For more information, see Reviewing thing connectivity using AnyNet IRIS. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
AWS IoT Core. 1. Log into your AWS account. 2. Go to AnyNet Cellular Connectivity for AWS IoT. AnyNet Cellular Connectivity for AWS IoT opens in the AWS Marketplace. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 14
Welcome page on the facing page. Next, set up an AWS IAM user account with specific IAM permissions. For more information, see Creating a dedicated IAM user account for AnyNet IRIS on page 9. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
8. In the Having issues signing up for your product? box, select click here to view the Welcome page. Make a note of the CustomerID to help you configure AnyNet IRIS. 9. If required, select the relevant download. For more information, see Getting Started: preparing the cloud on page 6. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Any previously created IAM users are listed in the right-hand pane. 4. Select Add User. 5. Type the user name for the new user. This is the sign-in name for AWS, for example: anynetuser. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 17
AWS security credentials - programmatic access. 11. Click Download.csv to store the keys locally on your computer. 12. Select Close. Next, you must attach the required policies to this IAM user account. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
AnyNet IRIS app and AnyNet Cellular Connectivity for AWS IoT service. Additionally, it enables IAM role creation and policy attachment. For more information, see: Testing IAM policies with the IAM policy simulator. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
5. On the Permissions tab, select Add permissions. 6. Under Grant permissions, select Attach existing policies directly. 7. Using the Search box, search for: AmazonEC2ReadOnlyAccess. 8. Select the check box alongside the returned result. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 20
If you select the wrong policy, clear the check mark alongside it. 10. Select Next: Review. The selected policies are displayed. 11. Select Add permissions. The updated Summary page appears. 12. Select Add inline policy. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 21
"Resource": "*" 14. In the JSON text, replace <customer_id> with your AnyNet Cellular Connectivity for AWS IoT Customer ID. If you cannot remember your Customer ID, see Viewing the AnyNet IRIS Welcome page. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 22
17. Select Create policy. The IAM user account Permissions policies updates to include the inline policy. After you have completed creating the IAM user and have attached the essential policies, next you must install and configure AnyNet IRIS. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
3. Drag the AnyNet IRIS icon into the Applications folder. 4. In the Applications folder, double-click the AnyNet IRIS application to open it. 5. Next, configure AnyNet IRIS. For more information, see Configuring AnyNet IRIS on the next page. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
The options displayed in the drop-down list depend on the IAM permissions and regions you set up when you created the custom IAM user account. 5. If required, select Stack Preview to expand the preview and ensure the stack is compliant with your organisation's stack requirements. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 25
13. Select Review to view Configuration, Status and Updates information. For information about using AnyNet IRIS, including viewing and setting parameters, see Reviewing thing connectivity. Continue configuring your system to send and receive data. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
To create a thing in AWS IoT Core: 1. Sign in to the AWS Management Console: aws.amazon.com/console 2. In the AWS Services section, find the IoT Core service. 3. In the left-hand AWS IoT menu, select Manage > Things. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 27
12. In the Device Shadow section, select Unnamed shadow (classic). 13. Select Next. The Configure device certificate – optional page appears. Eseye manages the certificate process so you don't have to. 14. Select Skip creating a certificate at this time. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
The socket is a push-to-insert, push-to-release type socket. When the SIM is properly inserted, it clicks into place and sits flush with the edge of the SIM slot. 2. Combine the LTE IoT 2 click and the Click USB adapter. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 29
The LTE IoT 2 click powers on. The PWR (Power) LED light illuminates on the USB adapter, and three LED lights illuminate on the LTE IoT 2 click. The LTE IoT 2 click connects to a cellular network using the Quectel BG96 module, and is now ready to receive security and identity information from AWS.
Provisioning normally takes 5-10 minutes to complete, although the process may take up to an hour. If your Quectel BG96 module has not connected in 24 hours, contact Support: support@eseye.com. Use a terminal emulator to observe when the device is ready. You will see the following URC:...
, which restricts the connection to a thing using a thing name registered in the AWS Resource IoT registry and authenticated against the ARN. For example: ["arn:aws:iot: Region:123456789012:client/${iot:Connection.Thing.AWSThingName}"] For more detailed examples of how to adjust policies to manage resource access, see: AWS IoT Core policies. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
• Using a terminal emulator, send an command to ensure that the smart terminal can AT<CR> receive AT commands. For more information, see General AT Commands for the Quectel BG96 module on page 31. For information about connecting a terminal emulator to the modem, see Connecting to the LTE IoT 2 click.
Page 33
Select Subscribe. A subscription appears, listed in the Subscriptions panel. 3. Publish information to the topics you created in the Quectel BG96 module. You can send a maximum payload of 1000 characters to AWS. a. Using the terminal emulator, type: <return>...
Page 34
If you can see the messages in AWS, then your thing can successfully publish data into the cloud through the Quectel BG96 module. Next, test that the cloud can publish messages to your thing. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
For more information, see Sending data from your thing to the cloud on page 25. To test that AWS can publish information to your thing: 1. Create two subscribe topics in the Quectel BG96 module. a. Using a terminal emulator, type: <return>...
Page 36
View the AWS messages in the terminal emulator, in the following format: +EMQ: <indexnumber>,<messagelength> "message": "<messagetext>" If you can see the messages in the terminal emulator, then AWS can successfully publish data to your thing through the Quectel BG96 module. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Interacting with the AWS IoT shadow Interacting with the AWS IoT shadow You can configure the Quectel BG96 module to provide a persistent representation of your thing in the cloud, for use by applications or devices. You can publish current and updated...
You can find a full set of the Quectel BG96 module AT commands here: BG96 AT Commands Manual PDF Use a terminal emulator to send test, read and write AT commands to the Quectel BG96 module. For terminal emulator configuration information, see Connecting to the LTE IoT 2 click on page 3.
General AT Commands for the Quectel BG96 module AT Command syntax Use the following syntax: AT+<COMMAND><CR> where: • is in upper or lowercase • is a test, read or write command in upper or lower case <COMMAND> • is the end-of-line character marking the end of a command line (alias \r – carriage return) <CR>...
ETM, see About the Eseye Telemetry Module on page 1. ETMCFG – read and write configuration file values Read and write configuration file values. For information about the configuration file parameters, see Using the Quectel BG96 module configuration file on page 62. Type Syntax Response AT+ETMCFG=[<cmd>,][<section>,<parameter>[,<value>]]...
If a new configuration file needs to be applied, the following URC will also appear: +ETM: REBOOT REQUIRED You must reboot the system as soon as possible. – the command failed. ERROR Example AT+ETMCFGCHECK +ETMCFGCHECK:checking... +ETMCFGCHECK:complete Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Response Execute AT+ETMHFWCONF – indicates that the host firmware has not successfully ERROR downloaded onto the Quectel BG96 module. Ensure completed successfully, and you have seen the AT+ETMHFWGET URC. For more information, see +ETMHFWGET:available ETMHFWGET – checks for new host firmware on the facing page.
– no host firmware is available. Ensure +ETMHFWGET:none that the URL is configured and accessible – the latest host firmware is +ETMHFWGET:available downloaded and available ERROR Example AT+ETMHFWGET=862061234567890 +ETMHFWGET:checking... +ETMHFWGET:none Eseye-enabled Quectel BG96 module Developer Guide v1.8...
ETM. ERROR AT+ETMHFWREAD=<offset>,<length> +ETMHFWREAD: Write <offset>,<length>,"<hexdata>" where: • is the number of offset offset bytes where is the returned data in "<hexdata>" hexadecimal • is the number of bytes length read Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 45
ETM Management AT commands Type Syntax Response ERROR are required Offset length parameters. Example To read 48 bytes in 16 byte chunks: AT+ETMHFWREAD=0,16 +ETMHFWREAD: 0,16,"<hexdata>" AT+ETMHFWREAD=16,16 +ETMHFWREAD: 16,16,"<hexdata>" AT+ETMHFWREAD=32,16 +ETMHFWREAD: 32,16,"<hexdata>" Eseye-enabled Quectel BG96 module Developer Guide v1.8...
ETMCFG – read and write configuration file values on page 33. Alternatively, check that the modem can acquire a satellite lock. To do this, ensure you have a GPS antenna connected to the device, with good visibility of the sky. Example AT+ETMINFO=iccid 8944538523020412345 Eseye-enabled Quectel BG96 module Developer Guide v1.8...
ETMRESET – reboot the modem Reboots the modem. Type Syntax Response Execute AT+ETMRESET The module reboots. +ETM:REBOOTING NORMAL POWER DOWN APP RDY +ETM:SYSSTART +ETM:IDLE ERROR Example at+etmreset +ETM:REBOOTING NORMAL POWER DOWN APP RDY +ETM:SYSSTART +ETM:IDLE Eseye-enabled Quectel BG96 module Developer Guide v1.8...
– the device or connections have failed. AT+ETMSTATE? <State> Read ERROR AT+ETMSTATE=<cmd> Write where is the command in After , ETM returns to <cmd> AT+ETMSTATE=stop lowercase, either: idle and the following response occurs: +ETM: IDLE Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 49
– enable state change URC – start AnyNet Secure MQTT startmqtt application – start UDP telemetry startudp application – stop UDP telemetry application. stop Use this to cleanly shutdown before power off. Example AT+ETMSTATE? Eseye-enabled Quectel BG96 module Developer Guide v1.8...
The Eseye Telemetry Module adds the following Eseye URCs to the modem. All ETM URCs are prefixed +ETM: You will continue to observe other URCs from the Quectel BG96 module. For information about all other URCs, see the relevant Quectel documentation. For more information, contact Quectel Wireless Solutions or their channel partner.
Optionally, you can configure a single fixed topic so the Quectel BG96 module need not keep track of topic indices for sending or receiving data. The MQTT client supports QoS 0 and 1, and always connects to the broker as a clean session. All publish messages are queued in a non-volatile flash memory until they are sent to the broker.
+EMQPUBOPEN The publish topic and QoS ( ) are defined in the configuration file. For more singlepubtopicqos information, see the [MQTT] section, Using the Quectel BG96 module configuration file on page 62. The index is not required. Type Syntax Returned Result...
Report a set value to the device shadow/twin. The operation depends on which mode you AWSSHADOW set, either simple complete You set in the Configuration File. For more information, see Using the Quectel BG96 AWSSHADOW module configuration file on page 62. Alternatively, send: , for example: AT+ETMCFG=mqtt,awsshadow,<off/simple/complete> AT+ETMCFG=mqtt,awsshadow,simple AWSSHADOW...
Page 54
AT+EMQPERSIST={"state": {"reported":"{\"key\":value}"}} where is a numeric value, including value decimals and negative numbers. Examples mode: Simple AT+EMQPERSIST="{\"Temperature\":-3.5}" mode, including setting AWSSHADOW to complete: Complete AT+ETMCFG=mqtt,awsshadow,complete AT+EMQPERSIST="{\"state\":{\"reported\":{\"Temperature\":28.0}}}" Eseye-enabled Quectel BG96 module Developer Guide v1.8...
• is the publish topic title <topic> with a maximum length of 246 • – successfully installed the characters. Topic titles cannot publish topic contain special characters. • – socket already in use Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 56
MQTT telemetry AT commands Type Syntax Response – the command failed. Check you ERROR have sent the AT+ETMSTATE=startmqtt command to enable MQTT. Example: AT+EMQPUBOPEN=1,"PublishToCloud1" +EMQPUBOPEN: 1,0 AT+EMQPUBOPEN? 0: PublishToCloud0/AWSThingName 1: PublishToCloud1/AWSThingName Eseye-enabled Quectel BG96 module Developer Guide v1.8...
– subscription cancelled successfully • – broker returned an unsubnack • – no topic was registered for the given index Check you have sent the command AT+ETMSTATE=startmqtt to enable MQTT. Example: AT+EMQPUBCLOSE=0 +EMQPUBCLOSE: 0,0 Eseye-enabled Quectel BG96 module Developer Guide v1.8...
ASCII-hex characters ( ASCII-hex is converted to binary for transmission. ETM handles all other data as text. For text messages, (escape characters) are removed. Example: AT+EMQPUBLISH=1,1,"{\"BatteryPower\": \"Low\"}" SEND OK Eseye-enabled Quectel BG96 module Developer Guide v1.8...
+EMQSUBOPEN: (0-7),<status> /$i] where where: • • is the subscribe index number is a subscribe index number (0-7) (0-7) you selected from the range in the range from 0, up to and including 7. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 60
• – socket already in use – the command failed. Check you ERROR have sent the AT+ETMSTATE=startmqtt command to enable MQTT. Example: AT+EMQSUBOPEN=1,SubscribeFromCloud1 +EMQSUBOPEN: 1,0 AT+EMQSUBOPEN? +EMQSUBOPEN topics: 0 SubscribeFromCloud0 1 SubscribeFromCloud1 Eseye-enabled Quectel BG96 module Developer Guide v1.8...
• is either: status • – subscription cancelled successfully • – broker returned an unsubnack • – no topic was registered for the given index Example: AT+EMQSUBCLOSE=0 +EMQSUBCLOSE: 0,0 AT+EMQSUBOPEN? Eseye-enabled Quectel BG96 module Developer Guide v1.8...
<id>,<len>\r\n"<data>" ASCII-hex format • reports data in text <id>,<len>\r\n<data> format For more information, see Using the Quectel BG96 module configuration file on page 62. +EMQPERSIST:<len> Reports a message from the cloud service indicating something in the persistence service has changed. <JSON>...
Page 63
MQTT telemetry AT commands Description +EMQPERSIST: {"version":186201,"timestamp":1573232068,"state": {"key1":"value1","key2":"value2"},"metadata": {"key1":{"timestamp":1573232068},"key2": {"timestamp":1573232068}}} where are numeric values, including value1 value2 decimals and negative numbers. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Quectel BG96 module AT commands Quectel BG96 module AT commands Quectel supply a large set of AT commands that work with the Quectel BG96 module. A small number of useful AT commands are included in this document. CCID – request unique SIM number (ICCID) This command returns the unique Integrated Circuit Card Identifier (ICCID) of the installed SIM card.
Quectel BG96 module AT commands CREG – request network registration status Verifies the current network registration status of the Quectel BG96 module. First set the Mode to determine which information is displayed, and if it's displayed automatically when a change occurs.
Page 66
You will need to manually check the network registration status. • – Enable network registration unsolicited result code. If there is a change in network registration status, the modem will automatically return a response. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 67
Factors contributing to SIM failure to register on the network may include: • Missing network coverage • Denied network access • No valid roaming agreement between the home network and currently available operators Example AT+CREG=2 AT+CREG? +CREG: 2,5,"54DB","0F6B0578",7 Eseye-enabled Quectel BG96 module Developer Guide v1.8...
For more information, consult the RXQUAL values in the following table: 3Gpp TS 45.008 subclause 8.2.4 • – Not known or not detectable – the command failed. +CME ERROR: <err> Example AT+CSQ +CSQ: 3,99 Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Using the Quectel BG96 module configuration file Using the Quectel BG96 module configuration file The Eseye-enabled Quectel BG96 module operating parameters are contained in the configuration file, which you can find here: /datatx/eseyeconfig.ini If this file does not exist, a backup configuration file is used instead: /datatx/eseyeconfig.bak. If neither file exists, ETM uses internal default configuration parameters.
Page 70
Using the Quectel BG96 module configuration file Section Parameter Definition The default size is intended for devices sending small message payloads. Increase this amount if you are using devices that send large message payloads. For large messages, you must ensure that the maximum NV store size is at least four times the largest expected published message size, plus eight bytes for the storage header.
Page 71
Using the Quectel BG96 module configuration file Section Parameter Definition This is a Quectel BG96 module setting. Refer to the Quectel documentation for more information. iotopmode Enables narrow band internet of things (NBIoT) (default) – iotopmode not enabled – iotopmode is enabled This is a Quectel BG96 module setting.
Page 72
Using the Quectel BG96 module configuration file Section Parameter Definition – LTE only (default) – either 2G or LTE [application] Application parameters fotaport Modem firmware OTA image protocol IP port. Default: fotaurl Modem firmware OTA image URL, either: , or...
Page 73
Using the Quectel BG96 module configuration file Section Parameter Definition (default) – Report only the content of the state reported simple object – Report the complete JSON data complete – Do not report a set value For more information, see EMQPERSIST – report a set value to the device shadow on page 46.
Page 74
Using the Quectel BG96 module configuration file Section Parameter Definition configuration file. mqttsettingstopic Alternative to the AWS IoT shadow for configuring ETM behaviour. Subscription to this single topic enables commands to be sent from the cloud broker to ETM via MQTT. Use: –...
Page 75
Location parameters enable For configuring location, either: (default) – location disabled – location enabled; Quectel BG96 module will always try to establish a GPS/GNSS location while running tracelevel Location trace level (0-4), for Support purposes. Leave as Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Page 76
Using the Quectel BG96 module configuration file Section Parameter Definition (default). Eseye-enabled Quectel BG96 module Developer Guide v1.8...
• A set of X.509 certificates • An encrypted private key – AWS and the Quectel BG96 module use key pairs for signing data The certificates and private key are stored in a secure Java keystore. The end user cannot see or handle the security materials throughout their use.
• A Micro USB cable with data transfer capability for connecting the Quectel BG96 module to the computer. Ensure the cable is connected to the device and the computer. • If required, a jumper wire to power up the Quectel BG96 module, for example if it is part of an LTE IoT 2 click.
Page 79
Upgrading the Quectel BG96 module firmware • Quectel BG96 module firmware for your specific BG96 model (the model number is located at the top of the chip). • If you are using Windows: • Quectel LTE&5G Windows USB Driver • QFlash for Windows •...
4. Select Finish to exit the wizard. Connecting to the Quectel BG96 module Next, you must connect the Quectel BG96 module to the computer and power it up. For more information, see Powering up the Quectel BG96 module on page 2.
If Ports (COM & LPT) does not exist, ensure that you have correctly installed the USB drivers, and that the cable can transfer data. 3. Make a note of the Quectel USB DM Port number, which will vary depending on computer and USB port.
4. In QEFS Explorer, on the left hand side, select 5. If the Please Select DM Port dialog box appears, select File > Device > Quectel USB DM Port to set the DM Port to the connected Quectel BG96 module, then select 6.
1. Using the Linux command terminal, run: sudo dmesg | grep tty If Linux correctly recognized the Quectel BG96 module, then four USB interfaces are listed in consecutive order, for example: If less than four USB interfaces exist, you must install the USB drivers.
5. Restart Linux. 6. Run: sudo dmesg | grep tty This command checks if Linux correctly recognises the Quectel BG96 module. The response should contain four USB interfaces, listed in consecutive order. Updating the modem firmware To update the modem firmware: 1.
If the connection is valid, the firmware version is returned. This should match the version you installed. Installing ETM files on the Quectel BG96 module using Linux To copy ETM application files into /datatx/ on the Quectel BG96 module: 1. Navigate to the extracted QExplorer_BG96_Linux_Android_V<version> folder. 2. Run sudo make This command compiles QExplorer.
• Kernel (Quectel BG96 module operating firmware) • ETM application • Configuration For more information, see Using the Quectel BG96 module configuration file on page 62. Updating host software ETM is preconfigured with the URL for the host software. The host must request ETM to check for updates.
Updating the modem firmware using AWS IoT jobs At any time the AWS IoT Core Device Management service may instruct the Quectel BG96 module to install an OTA update by publishing a job document to the jobs/next topic. When the Quectel BG96 module receives a valid JSON job document, it retrieves the firmware package from the Amazon S3 instance using a pre-signed URL within the job document.
Updating the modem firmware using AWS IoT jobs Example job document Possible operations include: Operation Description firmware_ Updates the ETM application on the Quectel BG96 module. update parameter contains the image file URL. location The image file must exist in Eseye format.
4. Select the I understand that I will continue to be charged for all running software checkbox. 5. Select Yes, cancel subscription. The AnyNet Cellular Connectivity for AWS IoT subscription is removed. Eseye-enabled Quectel BG96 module Developer Guide v1.8...
Need help?
Do you have a question about the BG96 and is the answer not in the manual?
Questions and answers