Wiz-IO / platformio-quectel-examples

Examples for PlatformIO Quectel
29 stars 21 forks source link

threadX example, BG96 dont wake-up after go sleep #1

Closed pawelm87 closed 4 years ago

pawelm87 commented 4 years ago

Hi, I done everything this same as shown at video https://www.youtube.com/watch?v=DS5NEhEv1hA but my module BG96 go sleep and don't wake-up. When I connected PC to UART (PIN 34 i 35) and I used PWRKEY to turn-on module I got message "RDY" and led NETLIGHT turn-on, and then module probably go the sleep, commands AT dont work, led NETLIGHT turn-off. Program QEFS_Explorer is seeing my module "Quectel USB DM Port (COM23)". I choose him, when I push connect button, the program will by closed :/ I dont see folders inside module. Before load example program I had 3 COM ports, after load I have only one. When I turn on module by use PWRKEY, Windows mounted for a while all 3 port and then two ports disapire - module probably go the sleep.

What happens with my module ?

Wiz-IO commented 4 years ago

Hi your APP crash and module make abort() https://github.com/Wiz-IO/platform-quectel/wiki/Framework-ThreadX#notes you need to clear EFS...

pawelm87 commented 4 years ago

Ok, How do it ? I cannot connect to module by Quectel_EFS_Explorer_V1.0.3 :/ please, can you write step by step

Wiz-IO commented 4 years ago

are you read the link?

Reflash ( slow solution )

Reflash only EFS ( fast solution ) Download this python scrypt and read the scrypt beginning for instructions

pawelm87 commented 4 years ago

from script Unpack firmware -> Quectel don't give it ;/ Run this scrypt in firmware 'root' folder, Scrypt will make new folder 'CLEAN_EFS' Load folder 'CLEAN_EFS' as firmware and flash it EFS will be as new ...

Did you have link to firmware ?

Wiz-IO commented 4 years ago

I am not authorized to share Quectel firmwares.... Contact with your local Quectel support and ask firmware BG96MAR02A09M1G_01.011.01.011

pawelm87 commented 4 years ago

Hi, I have got this firmware BG96MAR02A07M1G_01.014.01.014. Will this be good ?

Wiz-IO commented 4 years ago

Hi Must to work .... R02 is SDK 2 - with SDK2 I test BG96 SDK3 and 4 is not testted (maybe will work)

На пт, 16.08.2019 г. в 16:00 ч. Paweł notifications@github.com написа:

Hi, I have got this firmware BG96MAR02A07M1G_01.014.01.014. Will this be good ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Wiz-IO/platformio-quectel-examples/issues/1?email_source=notifications&email_token=ADPGJ4WKOL4CSJDUXBOZ4WTQE2QH7A5CNFSM4IFFYR4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ORTEQ#issuecomment-522000786, or mute the thread https://github.com/notifications/unsubscribe-auth/ADPGJ4S2XKAT7A5ACAVIDA3QE2QH7ANCNFSM4IFFYR4A .

-- -= http://www.wizio.eu/ http://www.tektonika.info/ =-

pawelm87 commented 4 years ago

Ok I reflash BG96 and module is alive (I see 3 COM, and I can use AT command), but when I load my threadX program (from example program just pirnt message by UART) by QFlash I got this same situations. I reset the module and got only one CO (DM PORT)M, QFlash not connect to BG96.

I used slow solution for reflash

I used BG96 on click board

Wiz-IO commented 4 years ago

App crash and DM Port is busy https://github.com/Wiz-IO/platform-quectel/wiki/Framework-ThreadX#notes

or ask Quectel for other solutions

На пт, 16.08.2019 г. в 16:14 ч. Paweł notifications@github.com написа:

Ok I reflash BG96 and module is alive (I see 3 COM, and I can use AT command), but when I load my threadX program (from example program just pirnt message by UART) by QFlash I got this same situations. I reset the module and got only one COM, QFlash not connect to BG96.

I used slow solution for reflash

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Wiz-IO/platformio-quectel-examples/issues/1?email_source=notifications&email_token=ADPGJ4SYG5LRPC66WTT4BHLQE2R3RA5CNFSM4IFFYR4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4OSQLY#issuecomment-522004527, or mute the thread https://github.com/notifications/unsubscribe-auth/ADPGJ4VBYNCGC4RH3R5D7LLQE2R3RANCNFSM4IFFYR4A .

-- -= http://www.wizio.eu/ http://www.tektonika.info/ =-

pawelm87 commented 4 years ago

Verbose mode can be enabled via -v, --verbose option ?[32m<<<<<<<<<<<< QUECTEL BG96 MODULE 2018 Georgi Angelov >>>>>>>>>>>> CONFIGURATION: https://docs.platformio.org/page/boards/quectel/bg96.html PLATFORM: Quectel 2.0.3 #328eb42 > Quectel BG96 module HARDWARE: ARM, MDM9206 1200MHz, 3.00MB RAM, 3.00MB Flash DEBUG: Current (uart) On-board (uart) PACKAGES: framework-quectel 3b001cc, toolchain-gccarmnoneeabi 1.70201.0 (7.2.1) CORE bg96 SDK2 RO_BASE = 0x40000000 HEAP = 1048576 LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 0 compatible libraries Scanning dependencies... No dependencies ADD HEADER .pio\build\bg96\program.bin Checking size .pio\build\bg96\program.elf Memory Usage -> http://bit.ly/pio-memory-usage DATA: [ ] 0.1% (used 2616 bytes from 3145729 bytes) PROGRAM: [ ] 1.1% (used 34549 bytes from 3145729 bytes)

This is from terminal when I build default program. and I see that I used SDK2 yes?

Wiz-IO commented 4 years ago

CORE bg96 SDK2 RO_BASE = 0x40000000 HEAP = 1048576

you can put other settings in project platformio.ini file https://github.com/Wiz-IO/platform-quectel/wiki/Framework-ThreadX#project-ini-file

На пт, 16.08.2019 г. в 16:27 ч. Paweł notifications@github.com написа:

Verbose mode can be enabled via -v, --verbose option ?[32m<<<<<<<<<<<< QUECTEL BG96 MODULE 2018 Georgi Angelov >>>>>>>>>>>> CONFIGURATION: https://docs.platformio.org/page/boards/quectel/bg96.html PLATFORM: Quectel 2.0.3 #328eb42 > Quectel BG96 module HARDWARE: ARM, MDM9206 1200MHz, 3.00MB RAM, 3.00MB Flash DEBUG: Current (uart) On-board (uart) PACKAGES: framework-quectel 3b001cc, toolchain-gccarmnoneeabi 1.70201.0 (7.2.1) CORE bg96 SDK2 RO_BASE = 0x40000000 HEAP = 1048576 LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 0 compatible libraries Scanning dependencies... No dependencies ADD HEADER .pio\build\bg96\program.bin Checking size .pio\build\bg96\program.elf Memory Usage -> http://bit.ly/pio-memory-usage DATA: [ ] 0.1% (used 2616 bytes from 3145729 bytes) PROGRAM: [ ] 1.1% (used 34549 bytes from 3145729 bytes)

This is from terminal when I build default program. and I see that I used SDK2 yes?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Wiz-IO/platformio-quectel-examples/issues/1?email_source=notifications&email_token=ADPGJ4QADVOSNWLQWSPHIELQE2TNTA5CNFSM4IFFYR4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4OTPWA#issuecomment-522008536, or mute the thread https://github.com/notifications/unsubscribe-auth/ADPGJ4QQYYASF3SXEFLYW6DQE2TNTANCNFSM4IFFYR4A .

-- -= http://www.wizio.eu/ http://www.tektonika.info/ =-

pawelm87 commented 4 years ago

Yest I read all you documentation but for now I don't want change default setting for now. I want just run threadX program

In your example program You used "QAPI_UART_PORT_002_E" in 49 line, BG96 has 3 COM. Why this, enum "qapi_UART_Port_Id_e" has 24 UART ?

pawelm87 commented 4 years ago

In QUECTEL_QUECOPEN_V1---> QAPI_UART_PORT_001_E : Map to Chip's UART3, Module's Pin 34(RXD) & Pin 35(TXD) QAPI_UART_PORT_002_E : Map to Chip's UART5, Module's Pin 22(RXD) & Pin 23(TXD) QAPI_UART_PORT_003_E : Map to Chip's UART1, Module's Pin 28(RXD) & Pin 27(TXD) In QUECTEL_QUECOPEN_V2---> QAPI_UART_PORT_001_E : Map to Chip's UART6, Module's Pin 6(RXD) & Pin 5(TXD) QAPI_UART_PORT_002_E : Map to Chip's UART5, Module's Pin 22(RXD) & Pin 23(TXD) QAPI_UART_PORT_003_E : Map to Chip's UART1, Module's Pin 28(RXD) & Pin 27(TXD)

this is ok ? QUECTEL_QUECOPEN_V1 / V2 ?? how check or what is it ? may this is the problem different com and app crash ?

Wiz-IO commented 4 years ago

If you use only ThreadX SDK for applications you can use ALL firmwares... there is only 3 uarts for user apps... i use "debug" port

Wiz-IO commented 4 years ago

App crash from bad memory allocations

pawelm87 commented 4 years ago

ok can I change it by hand ?

Wiz-IO commented 4 years ago

What to change User uarts/enumerations is constant Look Api doc or ask Quectel where is pin mapped Im faraway from office. ..

pawelm87 commented 4 years ago

You write "App crash from bad memory allocations" and can I manualy change memory allocations ?

Wiz-IO commented 4 years ago

Send me your code via email Or use examples from sdk https://github.com/Wiz-IO/platformio-quectel-examples/tree/master/ThreadX/bg96

Wiz-IO commented 4 years ago

EVB Board User UARTs UART1_TX is PCM_SYNC_CODEC when board switch is set to UART UART1_RX is PCM_IN_CODEC when board switch is set to UART

UART2 is Debug Port on EVB

UART3_TX is SPI_MOSI UART3_RX is SPI_MISO

pawelm87 commented 4 years ago

I used default program when I created new project at PlatformIO. I done everything which I can see in this tutorial

Wiz-IO commented 4 years ago

there is nothing special about this example.... it is basic code from Quectel SDK examples I dont know where is your problem.... try original Quectel SDK or ask your local support for help .... and not work as movie?

Wiz-IO commented 4 years ago

put sim card - with sim card module not sleep

Wiz-IO commented 4 years ago

ah, this board not use BG96 USB, + 4 UARTs USB support plus 4 COM ports, one DM, one AT and one debug, one NMEA and 3 hardware uarts Main, debug and other if you start ThreadX application the core will multiplex uart from normal AT service to ThreadX application

Wiz-IO commented 4 years ago

look this board https://www.rakwireless.com/en/wislink_cellular

or get original Quectel BG96 EVB board https://www.quectel.com/product/umtsevb.htm

pawelm87 commented 4 years ago

I don't understandy you, the problem is board - LTE IOT 2 CLICK have BG96 module ? SIM card is connect to board. I connected this board by USB and programed by USB - I got 3 COM ports. In QFlash I choose one of then. BG96 has 3 UART and this board has 3 par of pins for these UARTS.

If this board is the problem explain why ? don't matter this board or other, the module BG96 is important.

pawelm87 commented 4 years ago

I will compare the schemes of these boards.

Wiz-IO commented 4 years ago

Your application print "data" on uart?

pawelm87 commented 4 years ago

No, when I load app with threadX after reboot all COM disappere only one is but that COM don't print annything.

Wiz-IO commented 4 years ago

I dont know this board - ask vendor or Quectel