WiFi Plus Click

General discussion on Libstock website & codes posted on this website.
Post Reply
Author
Message
TrediElettronica
Posts: 17
Joined: 06 Sep 2016 08:33

WiFi Plus Click

#1 Post by TrediElettronica » 09 Sep 2021 11:57

Hi
i have a question.
i have developed a firmware that comunicate via wifi with a MQTT broker.
I have enstabilished a connection with a wifi router a after i have created a TCP socket to connect with the MQTT broker.
My code below

CreateSocket(char * SC_RemoteIP, int SC_RemotePort, int SC_LocalPort) {
unsigned int SC_SocketResponse;
unsigned char SC_BindResponse;
unsigned char SC_ConnectResponse;

do {
SocketHandle = 0;
SC_SocketResponse = Net_Wireless_MCW1001_SocketClose(SocketHandle);

Net_Wireless_MCW1001_TimeToWait = 30;

Net_Wireless_MCW1001_SocketClose(SocketHandle);
SC_SocketResponse = Net_Wireless_MCW1001_SocketCreate(&SocketHandle, _NET_WIRELESS_MCW1001_SOCKET_TYPE_TCP); // Create TCP socket
SC_SocketResponse = Net_Wireless_MCW1001_SocketBind(SocketHandle, &SC_LocalPort, &SC_BindResponse); // Bind socket to the listen port
} while ((SC_SocketResponse != 0) || (SocketHandle > 253));

do {
SC_SocketResponse = Net_Wireless_MCW1001_TCP_Connect(SocketHandle, SC_RemotePort, SC_RemoteIP, &SC_ConnectResponse);
Delay_Ms(200);
} while(SC_ConnectResponse != 0);

SocketCreate = True;
}


So all work fine.

The broker that i use actually have a static ip address.

Now i want to use iot core on AWS and the problem is that the new created aws MQTT broker use non static ip address.
So i can't conect my board with this new broker.
The question is if there a solutionn tu create the TCP socket using the WSS address (alphanumeric) and not via ip address.
If the wifi plus do not match this request, can you incate me a click that can satisfy my request.
thanks
best regards
Tredielettronica

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: WiFi Plus Click

#2 Post by filip » 17 Sep 2021 15:31

Hi,

The library doesn't support on-static addresses, I can recommend yoo using CC3100 module instead :
https://www.mikroe.com/cc3100-click

Regards,
Filip.

Post Reply

Return to “Libstock Discussion”