Do aws_iot_mqtt_client and Bridge conflict each other?

Hello;

I am doing a project using Yun, which main function is receiving messages sending from other devices in same network with UDP protocal, and retransferring these messages to AWS IoT.
First, I seperate the function into two projects:
Project1. Receiving UDP messages.
Project2.Sending messages to ASW IoT,
and then test these two projects, they work perfect, so I integrate them into one project(Project3), and then error happens in setup(): aws_iot_mqtt_client setup fail, error code: -5, the difference between Project2 and Project3 is adding Bridge.begin() in setup segement of Project3.

Could anyone give some advice?

Here is the code of Project3:
#include <aws_iot_mqtt.h>
#include <aws_iot_version.h>
#include <Bridge.h>
#include <FileIO.h>
#include “aws_iot_config.h”

aws_iot_mqtt_client myClient; // init iot_mqtt_client
char msg[32]; // read-write buffer
int cnt = 0; // loop counts
int rc = -100; // return value placeholder
bool success_connect = false; // whether it is connected
char RecVal[100];

void setup()
{
//Bridge.begin();

// Start Serial for print-out and wait until it’s ready
Serial.begin(115200);
while(!Serial);

char curr_version[80];
snprintf_P(curr_version, 80, PSTR(“AWS IoT SDK Version(dev) %d.%d.%d-%s\n”), VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_TAG);
Serial.println(curr_version);

// Set up the client
if((rc = myClient.setup(AWS_IOT_CLIENT_ID)) == 0)
{
// Load user configuration
if((rc = myClient.config(AWS_IOT_MQTT_HOST, AWS_IOT_MQTT_PORT, AWS_IOT_ROOT_CA_PATH, AWS_IOT_PRIVATE_KEY_PATH, AWS_IOT_CERTIFICATE_PATH)) == 0)
{
// Use default connect: 60 sec for keepalive
if((rc = myClient.connect()) == 0)
{
success_connect = true;
}
else
{
Serial.println(F(“Connect failed!”));
Serial.println(rc);
}
}
else
{
Serial.println(F(“Config failed!”));
Serial.println(rc);
}
}
else
{
Serial.println(F(“Setup failed!”));
Serial.println(rc);
}

FileSystem.begin();
uploadScript();

delay(2000);
}

void loop()
{
if(success_connect)
{
Process p;
int len = 0;
p.begin(“python”);
p.addParameter("/tmp/UDP.py");
p.run();
delay(10);
memset(RecVal, 0, 100);
len = Bridge.get(“key”,RecVal,100);
if(0 != len)
{
char stringLen[40];
snprintf_P(stringLen, 40, PSTR(“RecVal Len is %d\n”), len);
Serial.println(stringLen);
SerialUSB.println(RecVal);
if((rc = myClient.publish(“topic1”, RecVal, strlen(RecVal), 1, false)) != 0)
{
Serial.println(F(“Publish failed!”));
Serial.println(rc);
}
Serial.println(F(“Publish OK!”));
}

delay(100);
}
}

// this function creates a file into the linux processor that contains a py script
void uploadScript()
{
// Write py script in /tmp
// Using /tmp stores the script in RAM this way we can preserve
// the limited amount of FLASH erase/write cycles
File script = FileSystem.open("/tmp/UDP.py", FILE_WRITE);

// Shell script header
script.println("#!/usr/bin/python");
script.println(“import socket”);
script.println(“import sys”);
script.println(“sys.path.insert(0, ‘/usr/lib/python2.7/bridge/’)”);
script.println(“from bridgeclient import BridgeClient as bridgeclient”);
script.println(“HOST = ‘192.168.31.112’”);
script.println(“PORT = 1234”);
script.println(“sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)”);
script.println(“sock.bind((HOST,PORT))”);
script.println(“recvmsg=sock.recv(256)”);
script.println(“print recvmsg”);
script.println(“bc = bridgeclient()”);
script.println(“bc.put(‘key’,recvmsg)”);
script.println(“sock.close()”);

script.close(); // close the file

// Make the script executable
Process chmod;
chmod.begin(“chmod”); // chmod: change mode
chmod.addParameter("+x"); // x stays for executable
chmod.addParameter("/tmp/UDP.py"); // path to the file to make it executable
chmod.run();
}