diff --git a/en/gnsslib/quecgnss.md b/en/gnsslib/quecgnss.md index 0f4c9eb9776c52e46d84e084de003ce5a8abbc7b..48f2db63a95c4378ac1ec3f73b3ca846ecba2445 100644 --- a/en/gnsslib/quecgnss.md +++ b/en/gnsslib/quecgnss.md @@ -5,7 +5,7 @@ This feature provides the APIs of the built-in GNSS feature. > QuecPython modules list that support built-in GNSS:
> ECX00U AA/LA series
> EG91XU AA series
-> EC800M GA/GB/GC/GD series
+> EC800M GA/GB/GC/GD series
EG810M GA series
EC800G GA series
> BG95M1/M3 model **Example** @@ -15,6 +15,9 @@ import quecgnss def main(): + quecgnss.configSet(0,1)#Set the positioning constellation to GPS + Beidou. + quecgnss.configSet(2,1)#Turn on AGPS + quecgnss.configSet(4,1)#Turn on the backup power supply ret = quecgnss.init() if ret == 0: print('GNSS init ok.') @@ -72,6 +75,190 @@ $GNGLL,3149.324754,N,11706.922338,E,022508.000,A,A*46 $GNGSA,A,3,31,3 ``` +## Overview of GNSS Positioning Data + +```python +NMEA Port Data Classification:: + $GPGGA Global Positioning System Fix Data + $GPGSA GNSS DOP and Active Satellites + $GPGSV GNSS Satellites in View + $GPRMC Recommended Minimum Specific GNSS Data + $GPVTG Course Over Ground and Ground Speed + $GPDTM Datum Reference + $GPGNS GNSS Fix Data +NMEA Sentence Parsing: +The basic format of the GSV sentence is as follows: + + $GPGSV,(1),(2),(3),(4),(5),(6),(7),...,(4),(5),(6),(7)*hh(CR)(LF) + + Field 1: Total number of GSV sentences. + + Field 2: Sequence number of the current GSV sentence. + + Field 3: Total number of satellites in view (00–12, leading zeros are transmitted). + + Field 4: Satellite PRN number (01–32, leading zeros are transmitted). + + Field 5: Elevation of the satellite (00–90 degrees, leading zeros are transmitted). + + Field 6: Azimuth of the satellite (000–359 degrees, leading zeros are transmitted). + + Field 7: Signal-to-noise ratio (00–99 dB; left blank if the satellite is not being tracked) — also referred to as the C/N0 value. + +The basic format of the GGA sentence is as follows: + + $GPGGA,(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12)*hh(CR)(LF) + + Field 1: UTC time, hhmmss.sss (hours, minutes, seconds format). + + Field 2: Latitude ddmm.mmmm (degrees and minutes format, leading zeros transmitted). + + Field 3: Latitude hemisphere — N (North) or S (South). + + Field 4: Longitude dddmm.mmmm (degrees and minutes format, leading zeros transmitted). + + Field 5: Longitude hemisphere — E (East) or W (West). + + Field 6: GPS status — 0 = Invalid, 1 = GPS fix, 2 = DGPS fix, 3 = Invalid PPS, 6 = Estimated. + + Field 7: Number of satellites used (00–12, leading zeros transmitted). + + Field 8: HDOP (Horizontal Dilution of Precision), range 0.5–99.9. + + Field 9: Altitude (-9999.9 to 99999.9). + + Field 10: Altitude unit, meters. + + Field 11: Height of geoid (ellipsoid relative to mean sea level). + + Field 12: Height unit of geoid separation, meters. + +The basic format of the GSA sentence is as follows: + + $GPGSA,(1),(2),(3),(3),,,,,,,,,,(3),(4),(5),(6),(7)*hh(CR)(LF) + + Field 1: Mode — A = Automatic 2D/3D, M = Manual 2D/3D. + + Field 2: Fix type — 1 = No fix, 2 = 2D fix, 3 = 3D fix. + + Field 3: PRN codes — Satellite PRN number(s) being used in the current fix (00; leading zeros transmitted, up to 12 satellites). + + Field 4: PDOP (Position Dilution of Precision), range 0.0–500.0. + + Field 5: HDOP (Horizontal Dilution of Precision), range 0.0–500.0. + + Field 6: VDOP (Vertical Dilution of Precision), range 0.0–500.0. + + Field 7: Satellite system ID. + +The basic format of the VTG sentence is as follows: + + $GPVTG,(1),(2),(3),(4),(5),(6),(7),(8),(9)*hh(CR)(LF) + + Field 1: Course over ground (000–359, leading zeros transmitted). + + Field 2: Reference — T = True North. + + Field 3: Course over ground (000–359, leading zeros transmitted). + + Field 4: Reference — M = Magnetic North. + + Field 5: Horizontal speed (0.00, leading zeros transmitted). + + Field 6: Unit — N = Knots. + + Field 7: Horizontal speed (0.00, leading zeros transmitted). + + Field 8: Unit — K = Kilometers per hour (km/h). + + Field 9: Mode indicator — E = Estimated, A = Autonomous (non-DGPS). + +The basic format of the RMC sentence is as follows: + + $GPRMC,(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13)*hh(CR)(LF) + + Field 1: UTC time, hhmmss.sss format. + + Field 2: Status — A = Valid (fix), V = Invalid (no fix). + + Field 3: Latitude ddmm.mmmm (degrees and minutes format, leading zeros transmitted). + + Field 4: Latitude hemisphere — N (North) or S (South). + + Field 5: Longitude dddmm.mmmm (degrees and minutes format, leading zeros transmitted). + + Field 6: Longitude hemisphere — E (East) or W (West). + + Field 7: Speed over ground, in knots. + + Field 8: Course over ground, in degrees. + + Field 9: UTC date, DDMMYY format. + + Field 10: Magnetic variation (000–180 degrees, leading zeros transmitted). + + Field 11: Magnetic variation direction — E (East) or W (West). + + Field 12: Mode indicator — E = Estimated, A = Autonomous (non-DGPS). + + Field 13: Navigation status — V = Navigation status not provided. + +The basic format of the DTM sentence is as follows: + + $GNDTM,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>*<9>(CR)(LF) + + <1>Local datum code — W84, P90. + + <2>Datum subcode — blank. + + <3>Latitude offset. + + <4>Latitude hemisphere — N (North) or S (South). + + <5>Longitude offset. + + <6>Longitude hemisphere — E (East) or W (West). + + <7>Altitude offset. + + <8>Reference datum code — W84. + + <9>Checksum. + +The basic format of the GNS sentence is as follows: + + $GNGNS,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>.<9>,<10>,<11>,<12>,<13>,*<14>(CR)(LF) + + <1> UTC time: Fix time hhmmss.ss — 000000.00 ~ 235959.99 + + <2> Latitude: ddmm.mmmmm — 0000.00000 ~ 8959.9999 + + <3> Latitude hemisphere: N = North, S = South + + <4> Longitude: dddmm.mmmmm — 0000.00000 ~ 17959.99999 + + <5> Longitude hemisphere: E = East, W = West + + <6> Mode indicator: N = No fix; A = Autonomous; D = Differential; P = Precise; R = RTK Fixed; F = RTK Float; E = Estimated; M = Manual input; S = Simulator + + <7> Satellites used: Number of satellites used in fix, 00–99 + + <8> HDOP: Horizontal Dilution of Precision, 0.5–99.9 + + <9> Altitude: Unit = meters + + <10> Geoid separation: Height of geoid relative to WGS84 ellipsoid + + <11> Differential data age: blank if prefix is “GN” + + <12> Reference station ID: blank if prefix is “GN” + + <13> Navigation status: C = Caution, S = Safe, U = Unsafe, V = Invalid + + <14> Checksum +``` + + ## Initialize GNSS @@ -151,4 +338,212 @@ A tuple `(size, data)` - Successful execution `size` - Size of the data read. `data` - GNSS location data. --1 - Failed execution \ No newline at end of file +-1 - Failed execution + +## GNSS/LTE Priority Settings + +> Currently, this function is only supported by BG95M1/M3 models. + +### `quecgnss.setPriority` + +```python +quecgnss.setPriority(Priority) +``` + +On some modules, GNSS and LTE share RF resources. This interface is used to control the priority of RF resource usage between GNSS and LTE. + +**Parameter** + +`Priority`, integer type, sets the priority value between GNSS and LTE. + +Correspondence of priority levels for GNSS/LTE on different platforms: + +| Priority | BG95M1/M3 | +| ------ | -------- | +| 0 | GNSS>LTE | +| 1 | LTE>GNSS | + +**Return Value** + + `0` - Successful execution + + `-1` - Failed execution + +## Get GNSS/LTE Priority + +> Currently, this function is only supported by BG95M1/M3 models. + +### `quecgnss.getPriority` + +```python +quecgnss.getPriority() +``` + +On some modules, GNSS and LTE share RF resources. This interface is used to read the priority of RF resource usage between GNSS and LTE. + +**Return Value** + +Returns an integer representing the GNSS/LTE priority. + +Correspondence of GNSS/LTE priority across different platforms: + +| Priority | BG95M1/M3 | +| ------ | -------- | +| 0 | GNSS>LTE | +| 1 | LTE>GNSS | + +## Built-in GNSS Configuration Parameter Settings + +> Currently, this function is supported only by the EC800M GA/GB/GC/GD series, EG810M GA series, and ECX00U AA/LA series. + +### `quecgnss.configSet` + +```python +quecgnss.configSet(config_type, config_value) +``` + +Sets GNSS parameters, including satellite system, NMEA sentence types, whether to use AGNSS, APFLASH, etc. + +**Parameter Description** + +* `config_type`,int,The types of GNSS configuration options to be set are as follows: + +| Value | Description | +| ---- | ---------------------- | +| 0 | Configure the satellite system to be used | +| 1 | Configure the types of NMEA sentences to output | +| 2 | Configure whether to enable AGPS | +| 3 | Configure whether to enable APFLASH | +| 4 | Configure whether to enable GNSS backup power | + +* `config_value`,int,The values of GNSS configuration options and their meanings are as follows: + +Satellite System(config_type = 0): + +| Value | Description | +| ----- | ----------------------- | +| 0 | GPS | +| 1 | GPS + BeiDou | +| 3 | GPS + GLONASS + Galileo | +| 4 | GPS + GLONASS | +| 5 | GPS + BeiDou + Galileo | +| 6 | GPS + Galileo | +| 7 | BeiDou | + +NMEA Sentence Types (config_type = 1): This field is represented as a bitmap. Options to be enabled should be set to 1. +For example, to output GGA + RMC + GSV + GSA + VTG, the bitmap should be `011111`, which corresponds to a decimal value of 31. + +| Value | Description | +| ----- | --------------------- | +| 0 | Disable all (000000). | +| 1 | GGA(000001) | +| 2 | RMC(000010) | +| 4 | GSV(000100) | +| 8 | GSA(001000) | +| 16 | VTG(010000) | +| 32 | GLL(100000) | +| 63 | All outputs (111111). | + +Enable AGPS (config_type = 2): When enabled, GNSS will download ephemeris data from the network and attempt to use it at startup to accelerate positioning. + +| Value | Description | +| ----- | ----------- | +| 0 | Disable | +| 1 | Enable | + +Enable APFLASH (config_type = 3): When enabled, GNSS will store ephemeris data on the Quecpython module and attempt to use it at startup to accelerate positioning. + +| Value | Description | +| ----- | ----------- | +| 0 | Disable | +| 1 | Enable | + +Enable Backup Power (config_type = 4): When enabled and backup power is properly connected, the GNSS chip can autonomously store ephemeris data. + +>Backup power is supported on the EC800M GB/GD series. + +| Value | Description | +| ---- | ----------- | +| 0 | Disable | +| 1 | Enable | + +**Return Value** + +int: 0 indicates success; any other value indicates failure. + +## Read Built-in GNSS Configuration Parameters + +> Currently, this function is supported only by the EC800M GA/GB/GC/GD series, EG810M GA series, and ECX00U AA/LA series. + +### `quecgnss.configGet` + +```python +quecgnss.configGet(config_type) +``` + +Reads GNSS parameters, including satellite system, NMEA sentence types, whether AGNSS is used, APFLASH, etc. + +**Parameter Description** + +* `config_type`,int,The types of GNSS configuration options to be read are as follows: + +| Value | Description | +| ---- | ---------------------- | +| 0 | Configure the satellite system to be used | +| 1 | Configure the types of NMEA sentences to output | +| 2 | Configure whether to enable AGPS | +| 3 | Configure whether to enable APFLASH | +| 4 | Configure whether to enable GNSS backup power | + +**Return Value** + +int,Meanings are as follows (–1 indicates failure). + +Satellite System(config_type = 0): + +| Value | Description | +| ----- | ----------------------- | +| 0 | GPS | +| 1 | GPS + BeiDou | +| 3 | GPS + GLONASS + Galileo | +| 4 | GPS + GLONASS | +| 5 | GPS + BeiDou + Galileo | +| 6 | GPS + Galileo | +| 7 | BeiDou | + +NMEA Sentence Types (config_type = 1): This field is represented as a bitmap. Options that are enabled are set to 1. +For example, if GGA + RMC + GSV + GSA + VTG are output, the returned value is 31, which corresponds to the bitmap 011111 in binary. + +| Value | Description | +| ----- | --------------------- | +| 0 | Disable all (000000). | +| 1 | GGA(000001) | +| 2 | RMC(000010) | +| 4 | GSV(000100) | +| 8 | GSA(001000) | +| 16 | VTG(010000) | +| 32 | GLL(100000) | +| 63 | All outputs (111111). | + +Enable AGPS (config_type = 2): When enabled, GNSS will download ephemeris data from the network and attempt to use it at startup to accelerate positioning. + +| Value | Description | +| ----- | ----------- | +| 0 | Disable | +| 1 | Enable | + +Enable APFLASH (config_type = 3): When enabled, GNSS will store ephemeris data on the Quecpython module and attempt to use it at startup to accelerate positioning. + +| Value | Description | +| ----- | ----------- | +| 0 | Disable | +| 1 | Enable | + +Enable Backup Power (config_type = 4): When enabled and backup power is properly connected, the GNSS chip can autonomously store ephemeris data. + +>Backup power is supported on the EC800M GB/GD series. + +| Value | Description | +| ---- | ----------- | +| 0 | Disable | +| 1 | Enable | \ No newline at end of file diff --git a/en/peripherals/ethernet.YT8512H.md b/en/peripherals/ethernet.YT8512H.md index a3018f43b25f150e715890c33ac5220cffda6c92..7d7ad0703b409978a135dc6f5eb7db86f64fa15c 100644 --- a/en/peripherals/ethernet.YT8512H.md +++ b/en/peripherals/ethernet.YT8512H.md @@ -175,3 +175,44 @@ The format is as follows: | `dev` | `bool` | Whether NIC device is normally connected. `True` and `False` respectively indicate that NIC device is connected and is not connected. | | `active`| `bool` | Whether NIC is activated. `True` and `False` respectively indicate enable and disable, which correspond to `set_up` and `set_down`. | | `link` | `bool` | Whether the network cable of NIC is connected. `True` and `False` respectively indicate the network cable is connected and is not connected. | + +### `YT8512H.speed` + +```python +nic.speed() +``` + +Retrieve the current uplink and downlink rates of the network interface. + +**Return Value:** + +Returns a tuple type. + +The format is as follows: +(tx, rx) + +| Parameter | Type | Description | +| ---- | ---- |---------- | +| `tx` | `int` | Represents the current data transmission rate of the network interface, in bps. | +| `rx` | `int` | Represents the current data reception rate of the network interface, in bps. | + +### `YT8512H.node` + +```python +nic.node() +``` + +Retrieve the list of currently connected terminals on the network interface. + +**Return Value:** + +Returns a **list** type. + +The format is as follows: +[(mac, ip, time),] + +| Parameter | Type | Description | +| ---- | ---- |---------- | +| `mac` | `byte` | MAC address of the terminal. | +| `ip`| `str` | IP address of the terminal. | +| `time`| `int` | Connection duration of the terminal, in seconds. | \ No newline at end of file diff --git a/en/peripherals/misc.PWM.md b/en/peripherals/misc.PWM.md index a61f08aa9874baf880699c49e1ca6966b681daf9..cc1f8f243d4f53061203c22ccbb3ffea96a1b5e2 100644 --- a/en/peripherals/misc.PWM.md +++ b/en/peripherals/misc.PWM.md @@ -161,9 +161,34 @@ if __name__ == '__main__': ## Constants -| Constant | Description | Module | -| -------- | ----------- | ------------------------------------------------------------ | -| PWM.PWM0 | PWM0 | EC600S / EC600N / EC100Y/EC600U/EC200U/EC800N/EC600M/EG915U/EC800M/EG912N/EG912U/EG915N | -| PWM.PWM1 | PWM1 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N/EC800K | -| PWM.PWM2 | PWM2 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N/EC800K | -| PWM.PWM3 | PWM3 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EG915N | \ No newline at end of file +| Constant | Description | Module | +| --------- | ----- | ------------------------------------------------------------ | +| PWM.PWM0 | PWM0 | EC600S / EC600N / EC100Y/EC600U/EC200U/EC800N/EC600M/EG915U/EC800M/
EG912N/BG95/EC600E/EC800E/EC600G/EC800G/EC200A/EG912U/EC600K/FCM360W/EG915N | +| PWM.PWM1 | PWM1 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/BG95/EC600E/EC800E/
EC600G/EC800G/EC200A/EC800K/FCM360W/EG915N/ | +| PWM.PWM2 | PWM2 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EC600E/EC800E/EC600G/
EC800G/EC200A/EC600K/FCM360W/EG915N/EC800K| +| PWM.PWM3 | PWM3 | EC600S / EC600N / EC100Y/EC800N/EC600M/EC800M/EG912N/EC600E/EC800E/EC600G/
EC800G/EC600K/FCM360W/EG915N | +| PWM.PWM4 | PWM4 | EC600E/EC800E/EC800G/FCM360W | +| PWM.PWM5 | PWM5 | EC600E/EC800E/EC800G/FCM360W | +| PWM.PWM6 | PWM6 | EC600E/EC800E/EC800G | +| PWM.PWM7 | PWM7 | EC600E/EC800E/EC800G | +| PWM.PWM8 | PWM8 | EC600E/EC800E/EC800G | +| PWM.PWM9 | PWM9 | EC600E/EC800E/EC800G | +| PWM.PWM10 | PWM10 | EC600E/EC800E/EC800G | +| PWM.PWM11 | PWM11 | EC600E/EC800E/EC800G | +| PWM.PWM12 | PWM12 | EC600E/EC800E/EC800G | +| PWM.PWM13 | PWM13 | EC600E/EC800E/EC800G | +| PWM.PWM14 | PWM14 | EC600E/EC800E/EC800G | +| PWM.PWM15 | PWM15 | EC600E/EC800E/EC800G | +| PWM.PWM16 | PWM16 | EC600E/EC800E/EC800G | +| PWM.PWM17 | PWM17 | EC800G | +| PWM.PWM18 | PWM18 | EC800G | +| PWM.PWM19 | PWM19 | EC800G | +| PWM.PWM20 | PWM20 | EC800G | +| PWM.PWM21 | PWM21 | EC800G | +| PWM.PWM22 | PWM22 | EC800G | +| PWM.PWM23 | PWM23 | EC800G | +| PWM.PWM24 | PWM24 | EC800G | +| PWM.PWM25 | PWM25 | EC800G | +| PWM.PWM26 | PWM26 | EC800G | +| PWM.PWM27 | PWM27 | EC800G | +| PWM.PWM28 | PWM28 | EC800G | diff --git a/en/peripherals/misc.Power.md b/en/peripherals/misc.Power.md index d69aceb4096fed07f208773edd22ac130c8ebfd0..962af838189cd325f4ecda171400538aa31f77cc 100644 --- a/en/peripherals/misc.Power.md +++ b/en/peripherals/misc.Power.md @@ -99,4 +99,32 @@ Integer type. Voltage value. >>> Power.getVbatt() 3590 ``` +## CAM_VDD Power Output +### `Power.camVDDEnable` + +```python +Power.camVDDEnable(enable,[vol],[lp_enable]) +``` + +CAM_VDD Pin Power Output Control. + +> Supported only on EC600U/EG912U/EG915U series. + +**Parameter Description:** + +- `enable` Integer type, range 0/1, 0: disable output, 1: enable output +- `[vol]`-Integer type, optional, range: VDD_1V80, VDD_2V50, VDD_2V80, VDD_3V00. These values set the output voltage to 1.8V, 2.5V, 2.8V, and 3.0V respectively. The default output voltage is 2.8V. +- `[lp_enable]`-Integer type, optional. LP_ENABLE: output is enabled in low-power state; LP_DISABLE: output is disabled in low-power state. The default setting is output disabled in low-power state. + +**Return Value:** + +0 indicates success, -1 indicates failure. + +**Example:** + +```python +from misc import Power +Power.camVDDEnable(1,Power.VDD_1V80,Power.LP_ENABLE)#Enable CAM_VDD power output with an output voltage of 1.8V, and keep the output enabled in low-power mode. +Power.camVDDEnable(0)#Disable CAM_VDD power output. +``` diff --git a/en/syslib/fota.md b/en/syslib/fota.md index 0a78f322a87b9974d423925ab6ab09ff4b8d88b7..fb5e6afbb67ac99dbfc863b27c1cfdc872c685e0 100644 --- a/en/syslib/fota.md +++ b/en/syslib/fota.md @@ -190,6 +190,39 @@ fota_obj.httpDownload(url1="ftp://user:password@ip:port/fota.bin",callback=resul fota_obj.httpDownload(url1="http://www.example.com/fota1.bin",url2="http://www.example.com/fota2.bin") ``` +### `fota_obj.ftpDownload` + +```python +fota_obj.ftpDownload(url=, callback=) +``` + +Firmware upgrade including download, write, verification, and reboot. The download protocol is FTP. + +**Parameter:** + +- `url`-Required parameter, URL of the upgrade package, type str. +- `callback`-Optional parameter,Callback function to display download progress and status, type function. The meanings of the callback function parameters are as follows. + +| Parameter | Type | Description | +| --------- | :--- | ------------------------------------------------------------ | +| args[0] | int | Indicates the download status. Returns an integer 0 if the download succeeds; returns a non-zero integer if the download fails, representing the error code. | +| args[1] | int | Indicates the download progress. | + +**Return Value:** + +Returns an integer 0 on success; returns -1 on failure. + +**Example:** + +```python +def result(args): + print('download status:',args[0],'download process:',args[1]) + +fota_obj.ftpDownload(url="ftp://user:password@ip:port/fota.bin",callback=result) #The user, password, ip, and port fields must be filled with the specific FTP server information. +``` + +> FTP download interface supported on the following models: EC200A, UC200A, BG95, BG600L, EC600U, EC200U, EG915U. + ### fota_obj.apn_set ```python diff --git a/en/syslib/modem.md b/en/syslib/modem.md index 11f8694496ec206302f396691dd04241d17a10bd..c8e411af38e755755ff41c3ec607e690d49abdb1 100644 --- a/en/syslib/modem.md +++ b/en/syslib/modem.md @@ -108,3 +108,26 @@ If successful, it returns the device manufacture ID in string type. If failed, i 'Quectel' ``` +## Get Device MAC Address +> Currently only supported on FCM360W modules. + +### `modem.getDevMAC` + +```python +modem.getDevMAC() +``` + +This method retrieves the device's MAC address. + +**Return Value** + +On success - Returns the device MAC address as a string (format: "XX:XX:XX:XX:XX:XX") + +On failure - Returns integer -1 + +**示例** + +```python +>>> modem.getDevMAC() +'e8:24:4:d8:a2:4b' +```