Code Monkey home page Code Monkey logo

platformio-quectel-examples's Introduction

Examples for PlatformIO Quectel

PLATFORM

FRAMEWORK

WIKI

Firmwares:

For BC66 you need BC66NBR01A04V01 or BC66NBR01A05V01

For M66 you need M66FAR01A12BT (other comming soon)

Other examples comming soon....

I2C OLED

platformio-quectel-examples's People

Contributors

wiz-io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

platformio-quectel-examples's Issues

BC66 with BC66NBR01A10 - upload errors

thx for working on getting these modules somehow usable... probably I'm just making a stupid mistake, but I can't get any of the examples to work.

1: 0000 0000
V0: 0000 0000 [0001]
00: 0006 000C
01: 0000 0000
U0: 0000 0001 [0000]
T0: 0000 00B4
Leaving the BROM

AT
OK
ATI
Quectel_Ltd
Quectel_BC66
Revision: BC66NBR01A10

This seems to be ok so far. The examples all compile fine, but once I'm about to upload them I get something like this:

Processing bc66 (platform: quectel; board: bc66; framework: arduino)
----------------------------------------------------------------------------------------------------------
Tool Manager: Installing git+https://github.com/Wiz-IO/tool-quectel.git
git version 2.37.1 (Apple Git-137.1)
Cloning into '/Users/arth/.platformio/.cache/tmp/pkg-installing-2m1ocpfj'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 11 (delta 1), reused 11 (delta 1), pack-reused 0
Receiving objects: 100% (11/11), 800.33 KiB | 1.25 MiB/s, done.
Resolving deltas: 100% (1/1), done.
Tool Manager: [email protected]+sha.b65e42d has been installed!
Verbose mode can be enabled via `-v, --verbose` option
<<<<<<<<<<<< QUECTEL BC66 MODULE 2018 Georgi Angelov >>>>>>>>>>>>
CONFIGURATION: https://docs.platformio.org/page/boards/quectel/bc66.html
PLATFORM: Quectel (2.1.3) > Quectel BC66 module
HARDWARE: ARM, MT2625 78MHz, 97.66KB RAM, 195.31KB Flash
DEBUG: Current (uart) On-board (uart)
PACKAGES: 
 - framework-quectel @ 2.1.3+sha.3fd72b4 
 - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
ADD HEADER
Checking size .pio/build/bc66/program.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   3.6% (used 3552 bytes from 100000 bytes)
Flash: [==        ]  20.0% (used 40095 bytes from 200000 bytes)
Configuring upload protocol...
Looking for upload port...
Using manually specified: /dev/cu.SLAB_USBtoUART
Uploading: program
Waiting module for POWER-ON or RESET <========================> DONE
Starting <========
ERROR: EPP Answer
*** [upload] Explicit exit, status 2
======================================= [FAILED] Took 5.98 seconds =======================================

It's probably a super obvious mistake, but I can't find it. Any clues?

Ql_SPI_WriteRead() crashes

Hi, I am trying to use SPI on this device with the MAX31856 converter.
The device is properly wired, and I am calling Ql_SPI_Init and Ql_SPI_Config, which return correctly. I am using HW SPI with the HW SPI pins of the BC66 DevKit from Olimex.
However, when I call Ql_SPI_WriteRead(), the device crashes, the function never returns. Analyzing the signals on the scope, I can see that the CS/MISO/MOSI/CLK pins never change value.
Am I missing anything?
Please see a simplified version of my code below :


void proc_main_task(s32 task_id)
{
    ST_MSG msg;
    s32 ret;

    // Register & open UART port
    Ql_UART_Register(m_my_uart, CallBack_UART_Hdlr, NULL);
    Ql_UART_Open(m_my_uart, 115200, FC_NONE);

    // Disable sleep mode
    Ql_SleepDisable();

    APP_DEBUG("<-- OpenCPU: Starting App-->\r\n");

    Ql_SPI_Init(0, PINNAME_SPI_SCLK, PINNAME_SPI_MISO, PINNAME_SPI_MOSI, PINNAME_SPI_CS, 1);
    Ql_SPI_Config(0, true, 0, 1, 500);

    u8 w_buf[2] = { MAX31856_CONFIG_REG, 0 };
    Ql_SPI_WriteRead(0, MAX31856_CONFIG_REG, 1, w_buf[1], 1);
    while(1)
    {
        // Ql_OS_GetMessage is an important system function which enables the Embedded Application to 
        // retrieve messages from message queue of the task.
        Ql_OS_GetMessage(&msg);

        // Process message
        switch(msg.message)
        {
            // MSG_ID_RIL_READY is a system message that RIL module sends to main task
            case MSG_ID_RIL_READY:
                //Before use the RIL feature, you must initialize it by calling Ql_RIL_Initialize() 
                //After receive the 'MSG_ID_RIL_READY' message.
                Ql_RIL_Initialize();
                break;
            
            // MSG_ID_URC_INDICATION is a system message that indicates a new URC was received
            case MSG_ID_URC_INDICATION:
                msg_process(&msg);
                break;

            default:
                break;
        }
    }
}

pull up for the AWS iot cloud connection

can you let me know simple example of how to connect to AWS iot cloud (e.g. shadow things) with quectel bg96 module??
It's a little bit hard for me to connect to AWS iot cloud using bg96 mqtt library... thank you

threadX example, BG96 dont wake-up after go sleep

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 ?

Examples outdated?

Hi,

I just got the Olimex NB-IoT-DevKit and trying out your quectel platform. Unfortunately I'm unable to get the examples to work.

The get_info example gives me this error:

src/main.cpp: In function 'void setup()':
src/main.cpp:20:42: error: 'class LDEV' has no member named 'getVersion'; did you mean 'version'?

Changing it to version gives me additional errors:

src/main.cpp:26:7: error: 'class LDEV' has no member named 'waitSimReady'
   Dev.waitSimReady();

I tried other examples as well. The https_internal example complains about not finding #include <nbHttpClient.h>.

Any thoughts?
Using the latest version of the framework with Platform.io
Thanks!

LwM2M example

Would it be possible to add a LwM2M example for Arduino please? As far as I understand, the LwM2M functionality is provided by Quectel. An example how to use it would be very helpful. Thank you very much for this useful project.

APN connection in BG96 examples problem

Hi,

I saw in the Arduino/bg96/bg96_PubSubClient/src/main.cpp file at line 85:

dss.apn("gprs", "user", "pass");

This line is always returning me false. I checked in the file /arduino/libraries/bg96/Dss/src/Dss.cpp at line 139 the apn() function:

if (!handle)
return false;

In my case with the BG96, this was always returning false. I had to call qapi_DSS_Get_Data_Srvc_Hndl before checking the state of handle before it would work. Could this be an issue or did I miss something?

Thank you again!

Can's find an example of SMS

Thank you for your great work!
I have installed Quectel BG96 SDK and could build all the example projects successfully.
I am going to process commands via SMS or UART. Unfortunately, I couldn't get any idea how to deal with them. If you have an example for that, could you please share it?
I really appreciate it. Thanks in advance.

Regard.

Example_timer crashes before timer expires

The https://github.com/Wiz-IO/platformio-quectel-examples/blob/master/BC66_SDK/OpenCPU/example_timer.c example crashes with the following input when using BC66NBR01A10 & SDK v1.5 . Board is Olimex BC66 devkit

I have done other tests and I am not able to make the timer api work

<--OpenCPU: Timer TEST!-->

<--Register: timerId=258, param = 0,ret = 0 -->

<--RegisterFast: timerId=257, param = 0,ret=0 -->

F1: 0000 0000
V0: 0000 0000 [0001]
00: 0006 000C
01: 0000 0000
U0: 0000 0001 [0000]
T0: 0000 00B4

facing problem in fetching data

hello sir,
I am trying the example code of MC60 which is about SPI flash interface but I don't know how to communicate with q navigator using UART what input do I have to send to get communication started, as for now I was sending these inputs but its saying not found your command please check your command, please help me with this I am stuck here.
Thank you

  • If input "Ql_SPI_Init", that will init the SPI channel.
    
  • If input "Ql_SPI_Config", that will configure the SPI parameter.
    
  • If input "Ql_SPI_Write", that will write bytes to slave equipment through SPI interface.
    
  • If input "Ql_SPI_Read", that will read bytes from slave equipment through SPI interface.
    
  • If input "Ql_SPI_WriteRead", that will read and write bytes through SPI interface.
    
  • If input "Ql_SPI_Uninit", that will release the SPI pins.
    

atfwd example compile error

platformio-quectel-examples/ThreadX/bg96/atfwd

Terminal will be reused by tasks, press any key to close it.

Executing task: C:.platformio\penv\Scripts\platformio.exe run <

Processing bg96 (platform: quectel; board: bg96; framework: threadx)

Verbose mode can be enabled via -v, --verbose option
<<<<<<<<<<<< QUECTEL BG96 MODULE 2018 Georgi Angelov >>>>>>>>>>>>
CONFIGURATION: https://docs.platformio.org/page/boards/quectel/bg96.html
PLATFORM: Quectel 2.0.14 #ba06662 > Quectel BG96 module
HARDWARE: ARM, MDM9206 1200MHz, 3.00MB RAM, 3.00MB Flash
DEBUG: Current (uart) On-board (uart)
PACKAGES: framework-quectel 02002ee, 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
Building in release mode
Compiling .pio\build\bg96\src\main.o
Linking .pio\build\bg96\program.elf
.pio\build\bg96\src\main.o: In function TXM_MODULE_THREAD_ENTRY': main.c:(.library+0x4c): undefined reference to qapi_atfwd_Pass_Pool_Ptr'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\bg96\program.elf] Error 1
========================================================================================== [FAILED] Took 2.98 seconds ==========================================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

there are two qapi_atfwd.h
bg96>SKD2>qapi>qapi_atfwd.h
bg96>SKD424>qapi>qapi_atfwd.h

Arduino/bc66/i2c_oled

Hi Georgi,

While translating (verbose build) I'm getting the following error message.
Could you please help with it? I'm not an experienced developer.

C:\Users\cskocsis.platformio\lib\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp:482:47: error: 'digitalPinToPort' was not declared in this scope
dcPort = (PortReg *)portOutputRegister(digitalPinToPort(dcPin));
^~~~~~~~~~~~~~~~
C:\Users\cskocsis.platformio\lib\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp:482:28: error: 'portOutputRegister' was not declared in this scope
dcPort = (PortReg *)portOutputRegister(digitalPinToPort(dcPin));
^~~~~~~~~~~~~~~~~~
C:\Users\cskocsis.platformio\lib\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp:483:17: error: 'digitalPinToBitMask' was not declared in this scope
dcPinMask = digitalPinToBitMask(dcPin);
^~~~~~~~~~~~~~~~~~~
*** [.pio\build\bc66\libb45\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp.o] Error 1

How to enable support for M66 - M66FAR02A08BT?

Hi
It's really great to see this platform port for quectel modules.
I am using the latest firmware, can you guide me on how can I enable support for M66 M66FAR02A08BT.

I can contribute back if it's possible to form me.

_htons() in function server() in txMqtt.h of bg96

Hi,

I think I may have found a problem in /arduino/libraries/bg96/Ethernet/src/txMqtt.h at line 85.

The actual code is:
sin4->sin_port = _htons(port);

I am not exactly sure why _htons is used here. I tried the publish_subscribe example and was not able to connect to the eclipse mosquito server. When I print the value of sin4->sin_port after the call of server() I have a strange value in it. I saw that both variables were already uint16_t types so I tried to simply write:

sin4->sin_port = port;

I retried with this line and was able to connect to the eclipse mosquito server. Is this a bug or am I missing something?

Thank you!

DS1820 / DHT Example - pin mapping

Hi,

Are the pin mappings from variant_pins.c up to date?

I have the Olimex NB-IoT devkit Rev B and I have connected the DHT22 sensor's data pin to GPIO 1 (according to this schema - https://raw.githubusercontent.com/OLIMEX/NB-IoT/master/HARDWARE/NB-IoT-DevKit-pinout.png)

I've run the example code https://github.com/Wiz-IO/platformio-quectel-examples/blob/master/BC66_SDK/Arduino/BC66_A11_DS1820_DHT_GPIO/src/main.cpp and set it to the DHT mode.

Based on the variants_pins.c I've set:

#define DHT_A_PIN 9 
#define DHT_M_PIN 28

However, the module is failing to get the data from sensor:

DHT: Failed to get reading from PIN, dying
Temperature = 0.000000, Humidity = 0.000000

What could I do to get it working as expected?
I have also tried running the example with DS1820 sensor and the resistor, but also it looks like the module can't find the sensor attached to the GPIO port, that's why I suspect some problem in the sample code.

Btw. Why do we need to have two port numbers (A_PIN and M_PIN)?

My wiring is pretty much the same as this:
image

But instead of arduino I have the NB-IoT devkit of course.

When I switch it to the DS1820 sensor (with resistor) I receive:

Init Error( 1 )
ID 00 00 00 00 00 00 00 00 
Init Error( 3 )

MQTT reconnect issue

During the mqtt pubsubclient code running, when sim network disconnect and connect it after sometimes the mqtt didn't connect

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.