This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't connect MQTT-subscriber to MQTT-broker running on RaspberryPi3

I can connect the board to the Pi and ping it with a globally valid IPv6.

When trying to connect with the MQTT broker, however, no package is sent from the Chip to the Pi.
After many tests in debugging mode I found out, which probably prevents sending the package:

(mqtt_transport_lwip.c: line 297)
err_t err = tcp_connect((struct tcp_pcb *)p_client->tcp_id, (ip_addr_t *)&p_client->broker_addr, p_client->broker_port, tcp_connection_callback);

The function returns "FFFFFFFC"

If my researches are correct, then this means that the nRF52 first requires a RouterAdvertisementMessage from a globally valid IPv6 address, which it does not receive according to my Wireshark analysis.
If so, how can I get the BT0 interface on the Pi, to do that? It only transmits with the link local IPv6 though it also has a global one.
Or am I completely on the wrong track?

Here my radvd.conf:

interface eth0
{
AdvSendAdvert on;
prefix fd00:b::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
route ::/0
{
};
};

interface bt0
{
AdvSendAdvert on;
prefix fd00:a::/64
{
AdvOnLink off;
AdvAutonomous on;
AdvRouterAddr on;
};
};

I'm running the "iot_mqtt_lwip_subscriber"-example from the SDK15 on nRF52840

I followed the instructions on this two pages, to configure the Raspberry:

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.iotsdk.v0.9.0%2Fiot_sdk_user_guides_radvd.html

http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.iotsdk.v0.9.0%2Fiot_sdk_user_guides_radvd.html&cp=6_1_0_2_3_2&anchor=iot_sdk_radvd_alternatives.

Related