logo资料库

File:SIM7600 Series_Open Linux_Development Guide_V2.00.pdf

第1页 / 共85页
第2页 / 共85页
第3页 / 共85页
第4页 / 共85页
第5页 / 共85页
第6页 / 共85页
第7页 / 共85页
第8页 / 共85页
资料共85页,剩余部分请下载后查看
Version History
This document applies to the following products
Contents
Abbreviation
1SIM7600 Development Platform Overview
1.1System Overview
1.2Open Linux selection and function
1.3Open Linux related PIN definition
2.The environment of Open Linux
2.1Install Windows Embedded Compiler
2.1.1Install ARM GNU/LINUX
2.1.2Install Cygwin
2.2Configure the Linux compilation environment
2.2.1Compilation method
2.2.1.1Compile all
2.2.1.2Compile bootloader
2.2.1.3Compile kernel
2.2.1.4Generate rootfs file system image
2.2.1.5Compile driver module
2.2.1.6Compile demo
2.2.1.7Clear the generated image
2.2.1.8Question
2.2.2Making OTA upgrade package command
2.3Install Windows driver
2.4Debug download tool
2.5Application Compilation and Run
2.5.1Demo application
2.5.2Helloworld application
2.6System partition and file protection
2.7Production line production mode
2.7.1Download APP separately
2.7.2Download the compiled image
3.Programming Guide
3.1System basic API
3.2Embedded AT transceiver
3.2.1Send AT command interface
3.3UART
3.4GPIO
3.5ADC
3.6I2C
3.6.1Write I2C interface
3.6.2Read I2C interface
3.7SD Card/EMMC flash
3.7.1Partition
3.7.2Format
3.7.3Mount
3.7.4CFDISK Command
3.8UIM
3.8.1Check SIM card status
3.8.2Query SIM card ICCID
3.8.3Query SIM card IMSI
3.9SMS
3.9.1SMS initialization
3.9.2Set receive SMS format
3.9.3Send messages
3.9.4Callback function handles message reception
3.10Voice Call
3.10.1Phone initialization
3.10.2Dial number
3.10.3Handle current call
3.10.4Get the status of the specified call
3.10.5Get all call states
3.10.6Callback
3.11NAS
3.11.1Query registration network status
3.11.2Query signal
3.12WDS
3.12.1Query APN
3.12.2Set APN
3.13Data Call
3.13.1Initialize the network
3.13.2Create data link
3.13.3Get data link parameters
3.13.4Release network resources
3.14GNSS
3.14.1Initialize gnss
3.14.2EnableXTRA
3.14.3Prohibit XTRA
3.14.4GNSS Cold Start
3.14.5GNSS Hot Start
3.14.6GPS Stop
3.14.7Callback function output brief location informatio
3.14.8Callback function output NMEA statement
3.15WIFI
3.15.1Get current WIFI mode settings (for W58)
3.15.2Set WIFI mode (for W58)
3.15.3WIFI Power
3.15.4Get WIFI status
3.15.5Set WIFI hotspot name
3.15.6 Get WIFI hotspot name
3.15.7Set AP auth type, encrypt mode, password
3.15.8Get AP auth type, encrypt mode, password
3.15.9 Set up WIFI broadcast switch
3.15.10 Get WIFI broadcast settings
3.15.11 Get DHCP settings
3.15.12 Get the number of connected clients
3.15.13 Get IP Address in STA Mode
3.15.14Get WIFI MACaddress
3.15.15Set IP obtained after the STA connects to the exte
3.15.16 SetSTA's SSID and Password for Connecting to an E
3.15.17Get SSID and password set by the STA
3.15.18WIFI sta Scan available hotspots
3.15.19Set username and password for dialing in cdma mode
3.15.20Get username and passwordfor dialing in cdma mode
3.15.21Get network status
3.15.22Restore wifi settings
3.15.23Set hotpot name, auth type, encrypt mode, password
3.15.24Open/close STA mode (for W58L)
3.15.25Get the state of STA mode (for W58L)
3.15.26Get the operation result code
3.15.27Description of STA-AP function
3.15.28Description of AP-AP function
3.16SPI
3.17USB OTG
3.18Bluetooth
3.18.1Bluetooth interface initialization
3.18.2Bluetooth power
3.18.3Get paired list
3.18.4Search Bluetooth
3.18.5Bluetooth pairing
3.18.6Pairing confirmation request
3.18.7Accept pairing
3.18.8Pairing results
3.18.9Open SPP Server
3.18.10 Query whether the peer Bluetooth is enabled with
3.18.11Initiate SPP connection
3.18.12Cut SPP connection
3.18.13 Non-active connect SPP
3.18.14Non-active cut SPP connections
3.18.15Query the status of the local SPP server
3.18.16Query SPP connection status
3.18.17SPP send data
3.18.18 SPP receive data
3.18.19 Query local Bluetooth name and MAC address
3.18.20Set local Bluetooth name
3.18.21Set PIN code
3.18.22Read PIN code
3.18.23Set BR/EDR inquiry scan and page scan
3.18.24 Query BR/EDR inquiry scan and page scan settings
3.18.25GATT registration
3.18.26 Create database
3.18.27Create 16-bit UUID service
3.18.28Create 128-bit UUID service
3.18.29Create 16-bit characteristics
3.18.30Create 128-bit characteristics
3.18.31Create a descriptor
3.18.32Add the created service to the database
3.18.33Send notification
3.18.34Send indication
3.18.35Return host reads data from local request
3.18.36Return the host to write data requests from the lo
3.18.37Callback
3.19ETH
3.19.1Network card mode settings
3.19.2Network card mode selection
3.19.3Driver install
3.19.4Driver uninstall
3.19.5Read preset MAC address from NV
3.19.6Set MAC address
3.19.7Set IP
3.20Network settings
3.21Network access methods
3.21.1Default route priority preset
3.22ALSA
3.22.1Set the volume of inner speaker
3.22.2Get the volume fo inner speaker
3.22.3Set the mic gain
3.22.4Get the mic gain
3.22.5Switch voice channel
3.22.6Query the current voice channel
3.23Device Control
3.23.1Enter the recovery mode
3.23.2adb setting
3.24DMS
3.24.1Initialization
3.24.2Get imei
3.24.3Get meid
3.24.4Get the firmware version identification code
3.24.5Set the UE work mode
3.24.6Release
4.Customer version mataince
SIM7600 Series_Open Linux_Development Guide LTE Module SIMCom Wireless Solutions Limited Building B, SIM Technology Building, No.633, Jinzhong Road Changning District, Shanghai P.R. China Tel: 86-21-31575100 support@simcom.com www.simcom.com
SIM7600 Series_Open Linux_Development Guide_V2.00 Document Title: Version: Date: Status: GENERAL NOTES SIM7600 Series_Open Linux_Development Guide 2.00 2020.8.6 Released SIMCOM OFFERS THIS INFORMATION AS A SERVICE TO ITS CUSTOMERS, TO SUPPORT APPLICATION AND ENGINEERING EFFORTS THAT USE THE PRODUCTS DESIGNED BY SIMCOM. THE INFORMATION PROVIDED IS BASED UPON REQUIREMENTS SPECIFICALLY PROVIDED TO SIMCOM BY THE CUSTOMERS. SIMCOM HAS NOT UNDERTAKEN ANY INDEPENDENT SEARCH FOR ADDITIONAL RELEVANT INFORMATION, INCLUDING ANY INFORMATION THAT MAY BE IN THE CUSTOMER’S POSSESSION. FURTHERMORE, SYSTEM VALIDATION OF THIS PRODUCT DESIGNED BY SIMCOM WITHIN A LARGER ELECTRONIC SYSTEM REMAINS THE RESPONSIBILITY OF THE CUSTOMER OR THE CUSTOMER’S SYSTEM INTEGRATOR. ALL SPECIFICATIONS SUPPLIED HEREIN ARE SUBJECT TO CHANGE. COPYRIGHT THIS DOCUMENT CONTAINS PROPRIETARY TECHNICAL INFORMATION WHICH IS THE PROPERTY OF SIMCOM WIRELESS SOLUTIONS LIMITED COPYING, TO OTHERS AND USING THIS DOCUMENT, ARE FORBIDDEN WITHOUT EXPRESS AUTHORITY BY SIMCOM. OFFENDERS ARE LIABLE TO THE PAYMENT OF INDEMNIFICATIONS. ALL RIGHTS RESERVED BY SIMCOM IN THE PROPRIETARY TECHNICAL INFORMATION ,INCLUDING BUT NOT LIMITED TO REGISTRATION GRANTING OF A PATENT , A UTILITY MODEL OR DESIGN. ALL SPECIFICATION SUPPLIED HEREIN ARE SUBJECT TO CHANGE WITHOUT NOTICE AT ANY TIME. SIMCom Wireless Solutions Limited Building B, SIM Technology Building, No.633 Jinzhong Road, Changning District, Shanghai P.R. China Tel: +86 21 31575100 Email: simcom@simcom.com For more information, please visit: https://www.simcom.com/download/list-863-en.html For technical support, or to report documentation errors, please visit: https://www.simcom.com/ask/ or email to: support@simcom.com Copyright © 2020 SIMCom Wireless Solutions Limited All Rights Reserved. www.simcom.com 2 / 85
SIM7600 Series_Open Linux_Development Guide_V2.00 Version History Version V2.00 Date 2019.04.01 Owner What is new Update document format www.simcom.com 3 / 85
SIM7600 Series_Open Linux_Development Guide_V2.00 This document applies to the following products The document just appliesfor SIM7600E-H/SIM7600SA-H series www.simcom.com 4 / 85
SIM7600 Series_Open Linux_Development Guide_V2.00 Contents 2.2.1 2.2.2 2.1.1 2.1.2 Version History..................................................................................................................................... 3 This document applies to the following products...................................................................... 4 Contents................................................................................................................................................. 5 Abbreviation........................................................................................................................................10 1 SIM7600 Development Platform Overview...........................................................................11 System Overview.................................................................................................................................. 11 Open Linux selection and function.....................................................................................................12 Open Linux related PIN definition...................................................................................................... 13 2. The environment of Open Linux.............................................................................................16 Install Windows Embedded Compiler............................................................................................... 16 Install ARM GNU/LINUX..............................................................................................................16 Install Cygwin................................................................................................................................ 18 Configure the Linux compilation environment..................................................................................19 Compilation method..................................................................................................................... 19 Making OTA upgrade package command................................................................................ 21 Install Windows driver.......................................................................................................................... 22 Debug download tool........................................................................................................................... 23 Application Compilation and Run.......................................................................................................25 Demo application.......................................................................................................................... 25 Helloworld application.................................................................................................................. 27 System partition and file protection................................................................................................... 27 Production line production mode........................................................................................................28 Download APP separately...........................................................................................................28 Download the compiled image................................................................................................... 29 3. Programming Guide...................................................................................................................30 System basic API..................................................................................................................................30 Embedded AT transceiver................................................................................................................... 30 Send AT command interface.......................................................................................................30 UART.......................................................................................................................................................30 GPIO....................................................................................................................................................... 31 ADC.........................................................................................................................................................34 I2C........................................................................................................................................................... 34 3.6.1 Write I2C interface........................................................................................................................34 Read I2C interface........................................................................................................................34 3.6.2 SD Card/EMMC flash...........................................................................................................................35 Partition...........................................................................................................................................35 Format.............................................................................................................................................35 3.3 3.4 3.5 3.6 2.5.1 2.5.2 2.7.1 2.7.2 3.7.1 3.7.2 3.2.1 1.1 1.2 1.3 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.1 3.2 3.7 www.simcom.com 5 / 85
SIM7600 Series_Open Linux_Development Guide_V2.00 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.7.3 3.7.4 3.8.1 3.8.2 3.8.3 3.9.1 3.9.2 3.9.3 3.9.4 Mount.............................................................................................................................................. 35 CFDISK Command.......................................................................................................................35 UIM..........................................................................................................................................................37 Check SIM card status.................................................................................................................37 Query SIM card ICCID.................................................................................................................37 Query SIM card IMSI....................................................................................................................38 SMS.........................................................................................................................................................38 SMS initialization...........................................................................................................................38 Set receive SMS format...............................................................................................................38 Send messages............................................................................................................................ 39 Callback function handles message reception........................................................................ 39 Voice Call............................................................................................................................................... 40 3.10.1 Phone initialization........................................................................................................................40 3.10.2 Dial number....................................................................................................................................40 3.10.3 Handle current call........................................................................................................................40 3.10.4 Get the status of the specified call.............................................................................................41 3.10.5 Get all call states...........................................................................................................................41 3.10.6 Callback..........................................................................................................................................42 NAS......................................................................................................................................................... 42 3.11.1 Query registration network status.............................................................................................. 43 3.11.2 Query signal...................................................................................................................................44 WDS........................................................................................................................................................44 3.12.1 Query APN..................................................................................................................................... 44 3.12.2 Set APN.......................................................................................................................................... 44 Data Call.................................................................................................................................................45 Initialize the network.....................................................................................................................45 3.13.1 3.13.2 Create data link.............................................................................................................................45 3.13.3 Get data link parameters............................................................................................................. 46 3.13.4 Release network resources........................................................................................................ 46 GNSS......................................................................................................................................................46 Initialize gnss................................................................................................................................. 47 3.14.1 3.14.2 EnableXTRA..................................................................................................................................47 3.14.3 Prohibit XTRA................................................................................................................................47 3.14.4 GNSS Cold Start...........................................................................................................................47 3.14.5 GNSS Hot Start.............................................................................................................................48 3.14.6 GPS Stop....................................................................................................................................... 48 3.14.7 Callback function output brief location information................................................................. 48 3.14.8 Callback function output NMEA statement...............................................................................49 WIFI.........................................................................................................................................................49 3.15.1 Get current WIFI mode settings (for W58)............................................................................... 50 3.15.2 Set WIFI mode (for W58)............................................................................................................ 50 3.15.3 WIFI Power.................................................................................................................................... 51 3.15.4 Get WIFI status............................................................................................................................. 51 3.15.5 Set WIFI hotspot name................................................................................................................51 3.15.6 Get WIFI hotspot name................................................................................................................52 www.simcom.com 6 / 85
SIM7600 Series_Open Linux_Development Guide_V2.00 3.15.7 Set AP auth type, encrypt mode, password............................................................................. 52 3.15.8 Get AP auth type, encrypt mode, password.............................................................................53 3.15.9 Set up WIFI broadcast switch.....................................................................................................53 Get WIFI broadcast settings............................................................................................... 54 3.15.10 Get DHCP settings............................................................................................................... 54 3.15.11 Get the number of connected clients................................................................................ 54 3.15.12 Get IP Address in STA Mode.............................................................................................. 55 3.15.13 Get WIFI MACaddress.........................................................................................................55 3.15.14 Set IP obtained after the STA connects to the external hotspot...................................55 3.15.15 SetSTA's SSID and Password for Connecting to an External AP................................56 3.15.16 Get SSID and password set by the STA...........................................................................56 3.15.17 WIFI sta Scan available hotspots...................................................................................... 56 3.15.18 Set username and password for dialing in cdma mode.................................................57 3.15.19 Get username and passwordfor dialing in cdma mode................................................. 57 3.15.20 Get network status................................................................................................................57 3.15.21 Restore wifi settings............................................................................................................. 57 3.15.22 Set hotpot name, auth type, encrypt mode, password...................................................58 3.15.23 Open/close STA mode (for W58L).....................................................................................58 3.15.24 Get the state of STA mode (for W58L)..............................................................................59 3.15.25 Get the operation result code............................................................................................. 59 3.15.26 Description of STA-AP function..........................................................................................59 3.15.27 Description of AP-AP function............................................................................................ 60 3.15.28 SPI...........................................................................................................................................................61 USB OTG............................................................................................................................................... 61 Bluetooth................................................................................................................................................ 61 3.18.1 Bluetooth interface initialization..................................................................................................63 3.18.2 Bluetooth power............................................................................................................................ 64 3.18.3 Get paired list................................................................................................................................ 64 3.18.4 Search Bluetooth.......................................................................................................................... 64 3.18.5 Bluetooth pairing........................................................................................................................... 65 3.18.6 Pairing confirmation request....................................................................................................... 65 3.18.7 Accept pairing................................................................................................................................65 3.18.8 Pairing results................................................................................................................................66 3.18.9 Open SPP Server......................................................................................................................... 66 Query whether the peer Bluetooth is enabled with SPP Server...................................66 3.18.10 Initiate SPP connection........................................................................................................67 3.18.11 Cut SPP connection............................................................................................................. 67 3.18.12 Non-active connect SPP......................................................................................................67 3.18.13 Non-active cut SPP connections........................................................................................67 3.18.14 Query the status of the local SPP server..........................................................................68 3.18.15 Query SPP connection status.............................................................................................68 3.18.16 SPP send data...................................................................................................................... 68 3.18.17 SPP receive data.................................................................................................................. 68 3.18.18 Query local Bluetooth name and MAC address..............................................................69 3.18.19 Set local Bluetooth name.................................................................................................... 69 3.18.20 3.16 3.17 3.18 www.simcom.com 7 / 85
SIM7600 Series_Open Linux_Development Guide_V2.00 3.18.21 3.18.22 3.18.23 3.18.24 3.18.25 3.18.26 3.18.27 3.18.28 3.18.29 3.18.30 3.18.31 3.18.32 3.18.33 3.18.34 3.18.35 3.18.36 3.18.37 Set PIN code......................................................................................................................... 69 Read PIN code......................................................................................................................70 Set BR/EDR inquiry scan and page scan.........................................................................70 Query BR/EDR inquiry scan and page scan settings.....................................................70 GATT registration..................................................................................................................70 Create database................................................................................................................... 71 Create 16-bit UUID service.................................................................................................71 Create 128-bit UUID service...............................................................................................71 Create 16-bit characteristics...............................................................................................71 Create 128-bit characteristics.............................................................................................72 Create a descriptor...............................................................................................................72 Add the created service to the database..........................................................................72 Send notification................................................................................................................... 73 Send indication......................................................................................................................73 Return host reads data from local request.......................................................................73 Return the host to write data requests from the local.....................................................74 Callback..................................................................................................................................74 ETH......................................................................................................................................................... 75 3.19.1 Network card mode settings....................................................................................................... 75 3.19.2 Network card mode selection..................................................................................................... 76 3.19.3 Driver install................................................................................................................................... 76 3.19.4 Driver uninstall...............................................................................................................................77 3.19.5 Read preset MAC address from NV..........................................................................................77 3.19.6 Set MAC address..........................................................................................................................77 3.19.7 Set IP.............................................................................................................................................. 77 Network settings....................................................................................................................................78 Network access methods.................................................................................................................... 78 3.21.1 Default route priority preset.........................................................................................................79 ALSA....................................................................................................................................................... 80 3.22.1 Set the volume of inner speaker................................................................................................ 80 3.22.2 Get the volume fo inner speaker................................................................................................80 3.22.3 Set the mic gain............................................................................................................................ 80 3.22.4 Get the mic gain............................................................................................................................80 3.22.5 Switch voice channel....................................................................................................................81 3.22.6 Query the current voice channel................................................................................................ 81 Device Control.......................................................................................................................................81 3.23.1 Enter the recovery mode............................................................................................................. 81 adb setting......................................................................................................................................82 3.23.2 DMS........................................................................................................................................................ 82 Initialization.................................................................................................................................... 82 3.24.1 3.24.2 Get imei.......................................................................................................................................... 82 3.24.3 Get meid.........................................................................................................................................83 3.24.4 Get the firmware version identification code............................................................................83 3.24.5 Set the UE work mode.................................................................................................................83 3.24.6 Release...........................................................................................................................................83 3.19 3.20 3.21 3.22 3.23 3.24 www.simcom.com 8 / 85
分享到:
收藏