Olimex Support Forum

DUINO => ARDUINO => Topic started by: belveder79 on January 13, 2021, 10:57:51 PM

Title: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 13, 2021, 10:57:51 PM
Hi, I tried interfacing the BC66 NB-IoT module (the one without onboard USB) through the debug headers but kind of failed. The baud rate seems to be kind-of 115200, but I get quite some errors...

--- Miniterm on /dev/cu.SLAB_USBtoUART  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
␀␀p5␝␁␀␀���␌␀␀pH␝␁␀␀��@␋␀␀p[␝␁␀␀��␄␀p�␜␁␀␀��␌␏␀␀p␏␝␁␀␀���␎␀␀p#␝␁␀␀���
␀␀pn␝␁␀␀���     ␀␀p�␝␁␀␀��␀␀p�␝␁␀␀���␇␀␀p�␝␁␀␀�� ␆␀␀p�␝␁␀␀��␀␅␀␀p�␝␁␀␀��␁␄␀␀p�␝␁␀␀���␃␀␀p�␝␁␀␀��␀␂␀␀p␆␞␁␀␀��␀␁␀␀p␚␞␁␀␀��␀␀␀p-␞␁␀␁���#␀␀p�)␙␀
␀�␀␄L?�SW b�uild� tim�e: 2�019/�12/1�2 20�:45:�37 G�MT +�08:0�0 ␀␀p␔-␑␀
␀�␀␄L?�MCU �Vers�ion:� NBI�OT_S�DK_V�1.7.�1 ␀␀pF/␎␀
␀�␀␄L?�HW V�ersi�on: �mt26�25_e�vb ␀p�4␐␀

␀�␀␄L?�MCU �cloc�k fr�eque�ncy:� 78 �MHz␀p)7␎␀
␀�␀␄L?�Cali�brat�ion �stat�us: �254␀p�7␞␀
␀�␁␐�!�Syst�em b�oot:� bac�k fr�om l�ong �pres�s sh�utdo�wn o�r sy�s_re�set␀p�~␃␀�԰␀␀X␀��␃␀␀pͅ␃␀�԰␁␀4␂�`␀␀␀p9�␃␀�԰␂␀�H␀␀␀pߍ␃␀�԰␃␀�␗� ␀␀␀p␓�␃␀�԰␄␀�6
␁␀S��␄␁␀␀pB␜␁␀S��␁␃␀␀p�*␁␀S��␏␃␀␀p␇E␁␀S��␁␄␀␀p�N␁␀S��␇␄␀␀p�i␁␀S��␋␄␀␀p�|␁␀S��␁␅␀␀p��␁␀S��␂␅␀␀p��␁␀S��␃␅␀␀p��␁␀S��␄␅␀␀pM�␁␀S��␅␅␀␀pE�␁␀S��␆␅␀␀␂p␅3␁␀
␅␀␀p=�␁␀S��␎␅␀␀p�␁␀S��␏␅␀␀p��␁␀S��␐␅␀␀␂p�>␁␀S��␃␆␀␀p�I␁␀S��␄␆␀␀p�W␁␀S��␁        ␀␀p�X␁␀T��␚␀␀␀␂p3␀
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: LubOlimex on January 14, 2021, 09:40:52 AM
Do you have GND connected?

Try sending AT command few times - just AT and then ENTER to send. There is auto-bauding but some characters might be needed to calibrate.
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 14, 2021, 12:07:38 PM
Yes, I connected GND through from the module to the USB2UART converter - I tried 3 different converters and 3 different modules - same for all combinations...

PS: I was not sure - the RX DBG and TX DBG headers - are they 3.3V or 1.8V? It's not entirely clear to me - anyway I did a quick and dirty implementation of my own level shifter assuming them to be 1.8V instead of 3.3V
 
https://electronics.stackexchange.com/questions/333229/1-8v-uart-with-3-3v-uart

- same thing


PS: just to make sure:

https://www.olimex.com/Products/IoT/NB-IoT/NB-IoT-BC66/resources/NB-IoT-BC66-pinout.pdf

Only the left GND is connected to the UART2USB (as header for right one is missing) - should I GND both? Then the H version should be provided with headers for that as well...




Title: Re: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 14, 2021, 06:43:00 PM
no luck sending AT+Enter multiple times
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 14, 2021, 07:20:24 PM
Ok, probably there is some issue with the baud rate on the preinstalled image, so I could probably fix it by setting Serial baud rate manually. However, it is a bit frustrating as there is essentially no dedicated documentation for the module at all - I have no idea where to start...

Let's say the Arduino examples from Wiz-IO are compiling (see other thread), how do I get them onto the board? I need to get the board into some bootloader state by pressing buttons, but how to do that here?
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: JohnS on January 14, 2021, 09:45:09 PM
Quote from: belveder79 on January 14, 2021, 12:07:38 PMPS: I was not sure - the RX DBG and TX DBG headers - are they 3.3V or 1.8V? It's not entirely clear to me - anyway I did a quick and dirty implementation of my own level shifter assuming them to be 1.8V instead of 3.3V
The datasheet (*) says 1.8V power domain if that helps.

(*) from the manufacturer, Quectel

John
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 15, 2021, 08:50:19 AM
yes, I suspected that, thx. Still, the conversion between 1.8V and 3.3V does not help...
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: LubOlimex on January 15, 2021, 09:48:27 AM
Not sure if it can be worked only with buttons. For auto bauding you need DTR and DTS, inspect the schematic of NB-IoT-DevKit:

https://github.com/OLIMEX/NB-IoT/blob/master/HARDWARE/NB-IoT-DevKit_Rev_B/NB-IoT-DevKit_Rev_B.pdf

You can use ESP-PROG for the task:

https://www.olimex.com/Products/IoT/Programmer/ESP-PROG/open-source-hardware

 or use the schematic as basis to understand better:

https://www.olimex.com/Products/IoT/Programmer/ESP-PROG/open-source-hardware
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: Brian on January 15, 2021, 10:52:32 AM
Quote from: belveder79 on January 13, 2021, 10:57:51 PMHi, I tried interfacing the BC66 NB-IoT module (the one without onboard USB) through the debug headers but kind of failed. The baud rate seems to be kind-of 115200, but I get quite some errors...


Did you try to connect EXT3 - p.9 TXD_MAIN, p.10 RXD_MAIN, p.7 - GND ? I suspect that the problem is not in baud rate but in high output impedance of TXB0108PWR level shifter
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 15, 2021, 11:15:49 AM
actually I did not try that, but I will do so, thx! I just found the schematics

https://www.olimex.com/Products/IoT/NB-IoT/NB-IoT-BC66/resources/NB-IoT-BC66_Rev_B.pdf (https://www.olimex.com/Products/IoT/NB-IoT/NB-IoT-BC66/resources/NB-IoT-BC66_Rev_B.pdf)

and I suspect that the FETs on the top right should make the levels ok for 3.3V for RX_main and TX_main (despite the notion of "levels!" on the left close to the EXT headers). What do you think?

Fun fact: I ordered the board with pre-assembled headers, and they did actually preassemble EXT1 and EXT2, but NOT EXT3. That raises the question if there is an intention behind this...
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: LubOlimex on January 15, 2021, 11:58:46 AM
> Fun fact: I ordered the board with pre-assembled headers, and they did actually preassemble EXT1 and EXT2, but NOT EXT3. That raises the question if there is an intention behind this...

I can confirm this is how all NB-IoT-BC66H variants are done, it is also mentioned on the product page.

This is done because the board was intended for breadboarding and if both EXT3 and EXT2 are placed, you might cause short-circuit placing it in a breadboard. Be careful if placing both headers and using a breadboard.
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: Brian on January 15, 2021, 01:23:10 PM
You have to solder header EXT3 pins up
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: belveder79 on January 15, 2021, 07:06:15 PM
guys you are AMAZING - AT commands working, no additional level shifter - thx a lot!!!!
Title: Re: Quectel BC66 UART Port Baud Rate
Post by: JohnS on January 15, 2021, 09:49:55 PM
Hooray! Thanks for following up - someone else can learn from this :)

John