Home/Support/Support Forum/Cellular 3G what are primary and secondary UARTS
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Cellular 3G what are primary and secondary UARTS

0 votes
This code example is from Digi Micropython Programming Quide: Section How To Use The Primary UART.

Question: What is secondary UART?

I do not get this example code to working on Xbee Cellular 3G device properly. I have ATAP=4. If I put line print('READ') the the READ goes to uart, but if I use line u.write('Testing from XBee\n'), nothing happens? Can anyone please give me the working code for this?

from machine import UART
import sys, time
def uart_init():
u = UART(1)
u.write('Testing from XBee\n')
return u
def uart_relay(u):
while True:
uart_data = u.read(-1)
if uart_data:
stdin_data = sys.stdin.buffer.read(-1)
if stdin_data:
u = uart_init()

asked Dec 20, 2018 in Digi Connect Cellular by a.u.jentze New to the Community (2 points)

Please log in or register to answer this question.