Arduino Uno Serial USB Connection

Hi, I have been trying to connect my UNO to Cayenne for the past few days and every time i run the “cayenne-ser.bat -c COM12” it shows an error,

Help me please.

can you share the code you are using?

#include <CayenneMQTTSerial.h>

char username = “----”;
char password = “”;
char clientID = “----”;

void setup()
{
Cayenne.begin(username, password, clientID);
}

void loop()
{
Cayenne.loop();
}.
CAYENNE_OUT_DEFAULT()
{
Cayenne.virtualWrite(0, millis());
// Some examples of other functions you can use to send data.
//Cayenne.celsiusWrite(1, 22.0);
//Cayenne.luxWrite(2, 700);
//Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
}

// Default function for processing actuator commands from the Cayenne Dashboard.
// You can also use functions for specific channels, e.g CAYENNE_IN(1) for channel 1 commands.
CAYENNE_IN_DEFAULT()
{
//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError(“Error message”);
}

can you connecting to mydevices using telnet telnet mqtt.mydevices.com 1883 so that you can see port 1883 is open and can connect.

sorry what do you mean by telnet mqtt?

so how do i put in code? sorry im a little noob in coding hahaha

follow these steps to activate telnet on windows How to Activate Telnet in Windows 7: 9 Steps (with Pictures).
once done enter the command from my previous post.

alright thanks! i’ll try it out tomorrow! its 8pm over here

Hi, Ive tried out the telnet and i received this error.

that means your port 1883 is not opened. How to open port in Windows – BytesofGigabytes

Ive followed the instructions and the port 1883 that i created didnt show when i run cmd

if you followed the above guide correctly, it should open the port 1883. Not sure what is the issue in your case.

exactly. i followed step by step. ive deleted the inbound rule and tried again and still it didnt show up

notting much i can help here. you may search the net for any solution on your issue.
@adam any idea on this?

@firzation the inbound port will be a random port. Outbound 1883 is the rule you will need to create.

so instead of creating an inbound rule i create an outbound rule?

That is correct. It is also very possible your ISP (or school, etc) is blocking the port. In that case there isn’t much you can do other than contact them and hope they will work with you.

1 Like

alright i’ll try it out tmr. and yes its a school network. thank you @adam and @shramik_salgaonkar for the help. if problem persists, i’ll have to do a 360 change on my final year project then.