Ai-Thinker-Open / GPRS_C_SDK

Ai-Thinker A9/A9G GPRS (with GPS(A9G)) module C development SDK
https://ai-thinker-open.github.io/GPRS_C_SDK_DOC
MIT License
449 stars 235 forks source link

Wrong Coordinates #486

Open msevimli opened 3 years ago

msevimli commented 3 years ago

1. SDK version(SDK 版本)

{

csdtk42

}


2. In what kind of operation problems appear, and how to reproduce the problem ?(什么样的操作步骤问题会出现,是否是稳定复现,如何复现问题?)

{

Hello there, ,I am working with A9G with my custom circuit and I've serious problem here, everything seems working, i can get phone call, i can send and receive sms but when i want to use i am getting wrong coordinate, if plug out sim card gnd for try, it says : "wait for gprs register complete" at my coolwatcher Trace section, when i plug in it again everything seems working but i am getting wrong coordinate as :

GPS fix mode:1, BDS fix mode:1, fix quality:0, satellites tracked:0, gps sates total:1, is fixed:no fix, coordinate:WGS84, Latitude:90.000000, Longitude:0.000000, unit:degree,altitude:0.000000

I couldn't figure out this problem for weeks, any solution or any way to close to problem i'd be really appricated Thanks

Hardware Version of chip : Chip version: 1.7 Chip synthesis date: 2000-22-00 Chip style: FPGA_USB Chip fab infos: metal ID 2, bond ID 0, production ID 2057/0x809 Chip ROM version: 4.5 (20c0-16-d2)

Software Version of chip :

Name Revision Number Date String
hal_version ffffffff 0xD 2019/12/27 HAL for 8955_chip in debug Branch: none
pal_version ffffffff 0x0 2019/12/27 Hello, I'm PAL! Branch: none
spal_version 86f3 0x5 2016/08/22 SPAL Branch: Sources/chip/branches/gallite441/bcpu/spal
spp_version 86f7 0x5 2016/08/22 SPP Branch: Sources/chip/branches/gallite441/bcpu/spp
spc_version 8700 0x5 2016/08/22 SPC in rom Branch: Sources/chip/branches/gallite441/bcpu/spc
rfd_version ffffffff 0x100000F 2019/12/27 RFD for transceiver xcv_8955, for PA pasw_rda6625 and for switch Branch: none
free1_version -- -- -- --
at_version -- -- -- --
memd_version ffffffff 0x2 2019/12/27 MEMD for flsh_spi32m Branch: none
pmd_version ffffffff 0x0 2019/12/27 PMD for pmu_8955 Branch: none
stack_version 9db8c008 0x0 2018/07/03 stack ps1.01.20 Branch: 1
vpp_version ffffffff 0x0 2019/12/27 Hello, I'm VPP! Branch: none
sx_version ffffffff 0x0 2019/12/27 Hello, I'm SX! Branch: none
std_version ffffffff 0x0 2019/12/27 Hello, I'm STD! Branch: none
lcdd_version -- -- -- --
ars_version ffffffff 0x0 2019/12/27 Hello, I'm ARS! Branch: none
aps_version -- -- -- --
vois_version ffffffff 0x0 2019/12/27 Hello, I'm VOIS! Branch: none
calib_version ffffffff 0xCA1B0208 2019/12/27 Calibration Daemon v(2).(8) Branch: none
gtes_version -- -- -- --
flash_prog_version -- -- -- --
csw_version ffffffff 0x0 2019/12/27 SERVICE version string not defined Branch: none
mmi_version -- -- -- --
aud_version ffffffff 0x0 2019/12/27 AUD version string not defined Branch: none
mdi_version -- -- -- --
btd_version -- -- -- --

}


ZakKemble commented 3 years ago

GPS fix mode:1, BDS fix mode:1, fix quality:0, satellites tracked:0, gps sates total:1, is fixed:no fix

It's telling you that it has no fix because it can only see 1 satellite and tracking 0. It needs to track 3 or 4 satellites to get a fix, which can take a few minutes depending on signal quality. Make sure the GPS antenna has clear view of the sky.

msevimli commented 3 years ago

Hi @zkemble , Thanks for your quick response, even if wait hours there is no success, i have pudding dev board and if i connect same antenna to pudding with same wire and same place, it takes a few minutes to give correct coordinates, on my curcuit ( on breadboard ) i don't have voltage regulator ( SY8089 ) and 2.2UH inductor yet, i am using adj Power Supply for set Voltage : 4.20 volt current : 00.05 A ( sometimes up to 00.12 ) i am really stuck on this and i can't go to next step

ZakKemble commented 3 years ago

GPS antennas are usually active antennas with a built-in amplifier. They need power which is usually supplied through an inductor - L2 82nH on the pudding dev board schematic. Have you included that in your setup? Best post a schematic or something.

msevimli commented 3 years ago

Hi again, @zkemble Many thanks for your valuable time and attentions I've included L2 82nh inductor and tried two different one is : https://lcsc.com/product-detail/HF-Inductors_EMTEK-HQC0805-82NJ-T_C251939.html

second : https://lcsc.com/product-detail/Inductors-SMD_Chilisin-Elec-CS1008-82NG-S_C285940.html

and also i tried with pudding original antenna and this : https://lcsc.com/product-detail/Antennas_Rainsun-microwave-Tech-GPS1003_C239243.html

result is the same, i will attach my schematic also

msevimli commented 3 years ago

Hi @zkemble And this is my schematic (edit) Schematic_a9g-development_2021-04-05 (1)

ZakKemble commented 3 years ago

The GPS antenna you linked to is a passive antenna, you might need a GPS LNA between the antenna and A9G GPS input (remove the inductor if you're not using an external antenna). You don't have any decoupling capacitors on your power supply, very important, weird things happen with dodgy power - https://github.com/Ai-Thinker-Open/GPRS_C_SDK/issues/421

msevimli commented 3 years ago

Thanks for quick reply and your attentions I will try to edit as your mentions and let you know to result I hope it will solve

msevimli commented 3 years ago

Hi again @zkemble,

After your valuable information and advise i spend over two nights and working with this, finally i could succeed to get coordinates, I added 3 capacitor to VBAT, i am attaching latest schematic,

Schematic_a9g-development_2021-04-07 (1)

When i done this first time with external active antenna ( pudding original antenna ) it was really amazing output as :

GPS fix mode:3, BDS fix mode:3, fix quality:1, satellites tracked:4, gps sates total:15, is fixed:3D fix, coordinate:WGS84, Latitude:55.5XXXXX, Longitude:13.0XXXXX, unit:degree,altitude:0.000000

and it was the most correct coordinates with only a few meters difference than real,

Then after a problem was arised with same circuit connections and same antenna's place I couldn't get the same result, the output as

GPS fix mode:1, BDS fix mode:1, fix quality:0, satellites tracked:0, gps sates total:1, is fixed:no fix, coordinate:WGS84, Latitude:55.5XXXXX, Longitude:13.0XXXXX, unit:degree,altitude:0.000000

Coordinates are close to first one but this time difference is around 120 meters and when gps states total increase about 2-3 it seems to reset itself with:

[00:57:18.272]   MMI 02 : GPS fix mode:1, BDS fix mode:1, fix quality:0, satellites tracked:0, gps sates total:2, is fixed:no fix, coordinate:WGS84, Latitude:55.5XXXXX, Longitude:13.0XXXXX, unit:degree,altitude:0.000000
[00:57:18.346]          : Fn 0796065 T1 0600 T2 23 T3 06 Time 00 20 25 074
[00:57:18.346]   MM 09  : Dump : at 0x8209953D (5/5) : 42 f0 42 ff fe
[00:57:18.346]   MM 09  : Dump : at 0x8209954E (6/6) : 42 f0 42 27 75 00
[00:57:18.347]   MM 09  : Dump : at 0x820994B7 (6/6) : 42 f0 42 27 75 ff
[00:57:18.347]   MM 09  : Dump : at 0x820994C9 (6/6) : 42 f0 42 27 75 00
[00:57:18.347]   MM 09  : Att 1, Service 0x01, NMO 256
[00:57:18.347]   MM 09  : return for PrioAccThr\n
[00:57:18.347]   CSW 02 : CFW_ShellProc [nEvId]0x138d,[nParam1]0x3 [nSimID]0,[nType]02\n
[00:57:18.358]   CSW 02 : Limited Server\n
[00:57:18.358]          : Fn 0796068 T1 0600 T2 00 T3 09 Time 00 20 25 086
[00:57:18.458]   PAL 12 : SynchChange[0,130]
[00:57:19.051]          : Fn 0796218 T1 0600 T2 20 T3 06 Time 00 20 25 779
[00:57:19.151]   RRI 05 : rri_P 0 WARNG: Evt 0x38015 unknown in rri_PLTD\n\n
[00:57:23.188]          : Fn 0797114 T1 0601 T2 06 T3 35 Time 00 20 29 916

i tried to add one more 470 uf Capacitor but the result is same.. May you check it please is there anything that i missed ? Thanks for your all patience and efforts