Shell over UART between nrf52840DK and nrf9160DK not working(SDK v2.6.1)

Hi,
I need to setup shell interface on both sides to exchange sensor data via uart.
 
The connection is as follow:
cable 1: nRF52840DK Pin (TX - P1.02) → nRF9160DK Pin (RX - P0.21)
cable 2: nRF52840DK Pin (RX - P1.01) → nRF9160DK Pin (TX - P0.22)
cable 3: nRF52840DK GND → nRF9160DK GND

Now the issue is
if both cable 1 and 2 are connected, no output from either side.
if only cable1 plugout, nrf52840 can output the data received from nrf9160.
if only cable2 plugout, nrf9160 can output the data received from nrf52840.
I attach the code, can you please test and see how can we fix it?
Note that I have to use the shell interface, because in our custom hardware the DFU(smp, mcumgr) is needed sharing the same uart. After testing, seems that so far only the shell and DFU can coexist. 
Thanks in advance!
/CJ
PS: strange formatting after posting, lots of line spacing is discarded.
Parents Reply Children
Related