Iot Hub Connection Refused #312
Replies: 10 comments 10 replies
-
|
Hi @Shotariusii This could be the device ID being wrong, or your SAS key or client certificate being wrong. Can you give more details on what kind of authentication you are using? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for replay. I use Sim7600 for TLS TCP/IP stack. So after Socket connection, when Sdk tries first MQTT connection i am getting what is wrote in my previous question. |
Beta Was this translation helpful? Give feedback.
-
|
Okay i will send you a email |
Beta Was this translation helpful? Give feedback.
-
|
Yes i supplied new TLS/TCP with Sim7600 module.
here is connection string :
HostName=rdsoftwareiothub.azure-devices.net;DeviceId=hardware-test-device-1;SharedAccessKey=PijADCJbscMCr0GTMJ1mH4dp/m9erzEyF2lDsYorUm8=
i extract all of that data from here.
…On Wed, Jan 11, 2023 at 3:53 PM Dane Walton ***@***.***> wrote:
And have you supplied new TLS/TCP code which isn't in our SDK?
If you'd like to, you can send the connection info to my email address in
my profile to test (hub, device id, and sas key). Just know that you should
roll the primary key over to a new value if you do that for security
purposes.
—
Reply to this email directly, view it on GitHub
<#312 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV22L7CUN224D2UCGZPXIUDWR3CM5ANCNFSM6AAAAAATVL2BNY>
.
You are receiving this because you were mentioned.Message ID:
<Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4657211
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
I use the library which was placed in sample code. (As i remember name
Mdbtls folder)
Actually there was just names for libraries, I could not find it and then i
download it
…On Wed, 11 Jan 2023, 23:38 Dane Walton, ***@***.***> wrote:
I'm able to connect using those credentials.
*NOTE you shared those publicly so you should roll the SharedAccessKey.*
Did you write your own HMAC function for the SAS key?
—
Reply to this email directly, view it on GitHub
<#312 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV22L7BBDJ2NPMC2MOHZ72LWR4Y6RANCNFSM6AAAAAATVL2BNY>
.
You are receiving this because you were mentioned.Message ID:
<Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4661532
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
I have time function which returns time in milliseconds since MCU runs.
I know i have to use Unix epoch time in seconds, but i didnt think that
would be a problem. Can be that a problem ?
…On Fri, 13 Jan 2023, 19:24 Dane Walton, ***@***.***> wrote:
It could possibly be your time function which is not creating a valid
Linux epoch time for the password. It's hard for me to tell since the
credentials work for me on our sample.
—
Reply to this email directly, view it on GitHub
<#312 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV22L7FMPX7FFEIMRT7Q25DWSF6THANCNFSM6AAAAAATVL2BNY>
.
You are receiving this because you were mentioned.Message ID:
<Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4679591
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
I am using freertos sdk, which runs on stm32 microcontroller.
Our software team member, who is working on web development side, idk
exactly how, but he simulate device and successfuly connected to iot hub
with that credential
…On Sat, 14 Jan 2023, 00:02 Dane Walton, ***@***.***> wrote:
As long as it's getting a valid epoch time, that part of the SAS token
should be okay. Are you able to run the sample just fine using those
credentials and running our Linux sample?
—
Reply to this email directly, view it on GitHub
<#312 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV22L7H6V5POVWYPZN2Z3DDWSGYEHANCNFSM6AAAAAATVL2BNY>
.
You are receiving this because you were mentioned.Message ID:
<Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4681297
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Sorry i couldn't get it.
Can i use time, since MCU runs in milliseconds for Time function.
Or it has to be unix epoch time?
…On Sat, 14 Jan 2023, 04:15 shota tchilaia, ***@***.***> wrote:
I am using freertos sdk, which runs on stm32 microcontroller.
Our software team member, who is working on web development side, idk
exactly how, but he simulate device and successfuly connected to iot hub
with that credential
On Sat, 14 Jan 2023, 00:02 Dane Walton, ***@***.***> wrote:
> As long as it's getting a valid epoch time, that part of the SAS token
> should be okay. Are you able to run the sample just fine using those
> credentials and running our Linux sample?
>
> —
> Reply to this email directly, view it on GitHub
> <#312 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AV22L7H6V5POVWYPZN2Z3DDWSGYEHANCNFSM6AAAAAATVL2BNY>
> .
> You are receiving this because you were mentioned.Message ID:
> <Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4681297
> @github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
|
Yes its works. Thanks for helping me.
One more question, when i send cloud to device message, in twin JSON file
cloudtodevice variable increments, but i am getting on my device that
message, but in the twins JSON files the variable doesn't decrease and
stays same or just increments. And after some times it sets to 0.
This is bc i am hendling the message wrong way ?
…On Wed, 18 Jan 2023, 23:36 Dane Walton, ***@***.***> wrote:
It must be epoch time
—
Reply to this email directly, view it on GitHub
<#312 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV22L7FZ6NYLKR7USZIPFF3WTBA33ANCNFSM6AAAAAATVL2BNY>
.
You are receiving this because you were mentioned.Message ID:
<Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4720915
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Hello Dane
As you remember i am using Azure Freertos SDK for communication to Iot
Hub.
I was wondering, Does this SDK, (mqtt or TLS/SSL layer) guarantee that
data will be sent and received as its original form ?
or do i need to add CRC or similar method to guarantee data correctness?
…On Thu, Jan 19, 2023 at 10:45 PM Dane Walton ***@***.***> wrote:
Hmm I'm not sure. If the payload generation is adding the variable, then
you should see the variable value in the JSON. If the payload is hardcoded,
you won't see it changed.
—
Reply to this email directly, view it on GitHub
<#312 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV22L7GOWCYXJHO2C4HVLODWTGDUZANCNFSM6AAAAAATVL2BNY>
.
You are receiving this because you were mentioned.Message ID:
<Azure-Samples/iot-middleware-freertos-samples/repo-discussions/312/comments/4730770
@github.com>
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I implement Azure Freertos Sdk into my device and supply the TLS and TCP/IP stacks.
I connected to socket successfully and When Device first Tries to connect Azure IoT hub, MQTT returns 'Connection Refused'.
as see Connack value got back from Server, is " Connection Refused : connection refused not authorised " .
what can be a problem ?
Beta Was this translation helpful? Give feedback.
All reactions