BC660K-GL UART w/ Arduino Uno

Hello!

Problem: struggling with UART, Arduino Uno & the BC660K-GL dev board.

Please, help me better understand what steps I could try to get basic AT communication established using an Arduino Uno, if possible.

Problem introduction in brief:

Using QCOM or QNavigator I am able to test and develop various AT command sequences: everything works fine. But I cant seem to replicate the same behavior using direct UART from a connected Arduino Uno board.
The documentation (Quectel_BC660K-GL-TE-B_User_Guide_V1.0, assuming similar enough) mentions interfacing a STM Nucleo64 and that the dev board supports a default 115200 baud for AT commands via UART Serial comms.
The conclusion was to try and use the SoftwareSerial library from Arduino IDE to send AT commands thru serial monitor and progressively build a viable prototype through this process.

Device/Test setup:

The BC660K-GL dev board is mounted and installed into the pins header of the Arduino Uno Board.
When uploading to the Arduino, I toggle the J302 switch from

MAIN UART TO MCU

to

MAIN UART TO USB

… otherwise the upload is stuck in a loop and eventually times out. Before opening the Serial monitor in the Arduino IDE, afterwards confirming that the switch had been toggled back to “MAIN UART TO MCU” mode.
The system is powered from the Arduino USB alone.

Behavior description:
This is an example of what is output to the serial monitor:

E⸮ROR
⸮⸮ERROR⸮⸮

kKPMN:⸮REA⸮Vc⸮

+CEREG: 2

M
ESVOR


Q*⸮Jդ⸮

MRROR
⸮

ERROR⸮


ERrOR

M
G^VOR


The serial monitor is set to

No line ending , 115200 baud

In the output there is structure in the reply, similar to one seen both in QCOM / QNavigator testing.
However, the characters are seemingly misread or gibberish is received/sent, which would usually lead to questioning if the baud rates are correctly assigned.

Arduino script in use:
The script with which the above output was received.
The intended behavior was to read what the dev board is sending and display it in the serial monitor.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(1, 0); // RX, TX

String sending;
String receiving;

void atcommand(const String _atcommand) { //WIP
  Serial.print("== ");
  Serial.print(_atcommand);
  mySerial.print(_atcommand);
  delay(1000);
  while (mySerial.available())
    Serial.write(mySerial.read());
};

void setup() {

  Serial.begin(115200); // Open serial comms, wait for port to open...
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  delay(500);

  //Serial.println("- - - UART AT COMMAND PROMPT DEMO - - -");

  mySerial.begin(115200); // set the data rate for the SoftwareSerial port
  delay(500);
  //mySerial.println("AT");

  //atcommand("AT\r\n");
  //atcommand("AT+IPR=9600\r\n"); // to change baud rates...
  //atcommand("AT\r\n");
}

void loop() {
  //delay(500);
  /*if (mySerial.available() > 0) { // Keep reading from BC660K and send to Arduino Serial Monitor
    receiving = mySerial.readStringUntil('\n');
    Serial.println(receiving);
    }*/
  if (Serial.available() > 0) { // Keep reading from Arduino Serial Monitor and send to BC660K
    sending = Serial.readStringUntil('\n');
    //mySerial.println(sending);
    Serial.println(sending);
  }
  //delay(500);
  //atcommand("AT\r\n");
}

In researching these issues, this library was useful as an example implementation…
M2M_Quectel (github)

Current understanding is some key bit of information may be lacking. Both devices work flawlessly independently.

1 Like

Well done. If you still have problems, I suggest you refer to the hardware manual or design reference

1 Like

Hey, thanks for the reply.
I am still stuck with the non-coherent serial comms.
Attached are shots of the setup to better clarify the setup.
It is possible I have been referring to the extension hat as the module or vice versa.
Apologies for the mixup.
Additionally, thanks to a support ticket reply, I checked the voltage level compatibility and I think it checks out.





Seems like this issue has persisted for some time now…
Link to Arduino Forum with similar situation: https://forum.arduino.cc/t/sending-basic-at-commands-to-cellular-gnss-modem/891095
I can’t find any solutions on other forums.

It has been clearly stated on the user guide:
It can also be used in conjunction with an STM32 Nucleo64 development board via the Arduino interface to develop NB-IoT applications based on STM32.

STM32 Nucleo64 mimics the Uno interface but it is far more powerful than Uno. It got multiple hardware ports and it also can download code without using hardware serial port. However Uno uses hardware serial for code loading and so the communication with BC660 needs to use software serial. 11500 is too high for software serial on Uno.

You should not have used Arduino Uno board. If you insist you may try:

  1. lower the baud rate of BC660 to e.g. 9600 by Qcom
  2. revise software serial baud rate to 9600 on Arduino

Good luck.

seems like bad level converter
look RX/TX with oscilloscope

Hey thanks for the reply.
I checked both boards and the level converters are working within spec.

Thanks for helping to resolve my problem.
I share your conclusions and have indeed attempted changing the baud rate using AT+IPR=9600 on QCom/QNav but it didn’t help.
The Arduino Uno has its limitations when it comes to serial comms but I like using it due to its relative simplicity. Attached some screenshots from https://docs.arduino.cc/learn/built-in-libraries/software-serial

Since this problem emerged a week or so ago I had already ordered and got started with a Nucleo 64 F411RE but as it is a new platform for me it will take a bit longer to set up.
An alternative I will explore is w/ ESP32 & Serial2 but have none in stock at the moment.



Screenshot 2022-08-01 090316

Suppose for now I will have to mark this case as closed.
The conclusion for others in this situation is: Arduino not supported, use STM32 instead.

Then there’s no reason it shouldn’t work - check your code ( try manually change BRG to 9600 )
AT commands are sequential - TX - RX answer ( GSM is slave device )
or
TX - URC, RX, URC

switched to Nucleo64 F411RE but got stuck at not being able to establish serial comms properly… cant find adequate resources online on it either
using arduino ide… will prepare a thread on stm32duino forum

get ESP32 or RPI Pico for tests - there is Arduino IDE or PlatformIO

yeah my company terminated the contract because im no longer considered qualified
i suggested using the espressif because i have more experience and there’s much more experience i can draw from there as well
appreciate the feedback, not sure how to close this thread anymore

check and this ( I test with RPI Pico and BC66 )