Azure Service Bus Connection - Visual Basic Support - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Azure Service Bus Connection

Service Bus

  • Please log in to reply
18 replies to this topic

#1 MGrontzki

MGrontzki

    New Member

  • Members
  • Pip
  • 3 posts

Posted 09 January 2014 - 11:18 AM

Hello netduino Forum,

 

I'm new here and I'm playing with my Netduino 2 plus since a few days.

 

 

My Problem:

How can I connect my netduino board to my Windows Azure Service Bus Queue, to send an receive BrokeredMessages from my other Clients.

 

In Standard .Net4.0 I use the Azure SDK and a NuGet-Package, so it is very easy.

 

If I can't use this in MF, I must code all by hand, and here is the problem.

 

 

Perhaps sombody else have some sample code to help me a little bit.



#2 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 09 January 2014 - 03:24 PM

This would require SSL support, which is not available for the smaller NETMF boards like Netduino (NETMF supports OpenSSL, but this is about an order of magnitude too large for single-chip microcontrollers).



#3 MGrontzki

MGrontzki

    New Member

  • Members
  • Pip
  • 3 posts

Posted 11 January 2014 - 03:56 PM

I think it must be possible with the netduino plus 2.

I found some samples, but no helping source code, which I could understand.



#4 Paolo Patierno

Paolo Patierno

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationItaly

Posted 13 January 2014 - 08:06 AM

Developing a client for service bus on .Net Micro Framework is one of my future project.

 

If you want to develop it, you need to use HTTP REST Api interface of Service Bus. The documentation is here :

 

http://msdn.microsof...e/hh780717.aspx

 

Paolo.


Paolo Patierno

Microsoft MVP on Windows Embedded & IoT

Azure Advisor

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

Blog : Embedded101
?


#5 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 13 January 2014 - 04:50 PM

Yes, the REST API is the way to go; WCF and AMQP currently seem less realistic for a small device.

 

Do you know of a way to use the Service Bus REST API without HTTPS (except using some intermediate server as a relay)?



#6 Paolo Patierno

Paolo Patierno

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationItaly

Posted 13 January 2014 - 04:53 PM

The best solution could be using MQTT client on Netduino like my M2Mqtt library (http://m2mqtt.codeplex.com) but for now Service Bus doesn't support MQTT. I hope it will support MQTT very soon ! :-)

 

Paolo.


Paolo Patierno

Microsoft MVP on Windows Embedded & IoT

Azure Advisor

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

Blog : Embedded101
?


#7 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 14 January 2014 - 07:11 AM

Hi Paolo

 

Do you have any indication about MQTT becoming supported for ServiceBus? At the moment they seem to focus pretty much on AMQP.

 

Cuno



#8 Paolo Patierno

Paolo Patierno

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationItaly

Posted 14 January 2014 - 07:56 AM

Hi Cuno,

no I haven't any news....I hope that they will support MQTT protocol. AMQP is too heavy for .Net Micro Framework.

 

Paolo.


Paolo Patierno

Microsoft MVP on Windows Embedded & IoT

Azure Advisor

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

Blog : Embedded101
?


#9 MGrontzki

MGrontzki

    New Member

  • Members
  • Pip
  • 3 posts

Posted 16 January 2014 - 05:10 PM

Hi Paolo,

 

this could be the way, if AMQP is to heavy for the netduino.

 

It looks easy with the REST API, but not so easy for me.

 

If anybody have a few lines of example code for me, that I could start in the right way, that would be great!

 

Thanks

Marco



#10 Chad Kittel

Chad Kittel

    New Member

  • Members
  • Pip
  • 4 posts
  • LocationBeaver Dam, WI

Posted 30 April 2014 - 11:27 PM

I did a Netduino -> Azure Service Bus project, but due to the lack of SSL I ended up proxying the connection with a WebAPI that I spun up on Azure Web Sites.  So, unfortunately I was stuck doing message-level encryption for the trip to the web service.  Once the web service picked it up, it then async added the message to Service Bus.  Worked out nice, just needed that broker/proxy service to work as the middleman.

 

Wasn't thrilled about message-level encryption, really would love to see /some/ minimal SSL support on the Netduino at some point.  At least enough for basic client interactions (maybe even with a reduced version support, ie TLS only)



#11 Paolo Patierno

Paolo Patierno

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationItaly

Posted 01 May 2014 - 06:16 AM

Hi Chad,
You are right....we need SSL for communication in the IoT world from Netduino. All the protocols use it for encryption (MQTT, AMQP,...).
Good exercise to connect Netduino to Web API but you haven't connected Netduino to Service Bus because you can't due to lack on SSL. However, good work !

Paolo Patierno

Microsoft MVP on Windows Embedded & IoT

Azure Advisor

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

Blog : Embedded101
?


#12 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 01 May 2014 - 07:46 PM

Wasn't thrilled about message-level encryption, really would love to see /some/ minimal SSL support on the Netduino at some point.  At least enough for basic client interactions (maybe even with a reduced version support, ie TLS only)

I'd like to see a good (i.e., not OpenSSL) and light-weight (i.e., not OpenSSL) open source TLS implementation for NETMF boards like the Netduino as well. Maybe a future revision of TLS will allow for lighter-weight algorithms, as Google proposed here:

https://tools.ietf.o...ha20poly1305-01

 

Since our latest Mountaineer firmware release, we support the NaCl primitives, which include Poly1305. Adding ChaCha20 wouldn't be that hard. As it is, our library at least supports efficient message-level encryption, which is sometimes necessary anyway if end-to-end security is desired. Our NaCl implementation will later become open source, once the beta cycle for the firmware is over:

http://www.mountaine...crypto-library/



#13 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 02 May 2014 - 03:18 PM

I'd like to see a good (i.e., not OpenSSL) and light-weight (i.e., not OpenSSL) open source TLS implementation for NETMF boards like the Netduino as well. 

 

Have you had any chance to evaluate PolarSSL or CyaSSL?



#14 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 03 May 2014 - 04:24 PM

Have you had any chance to evaluate PolarSSL or CyaSSL?

No, unfortunately not. They seem like good candidates. PolarSSL in particular appears to have a good reputation regarding code readability, systematic testing etc. And I´ve just seen that they have a FOSS license exception that mentions Apache 2.0 as a compatible license, so this would be ok for NETMF, at least for open source projects. I don´t know what commercial conditions it has. Nor do I know how CyaSSL compares.

 

Even if code quality is good, license terms are ok both for open source and commercial projects, and footprint in terms of RAM and Flash is small, speed would remain an important question for me. I know of SSL stacks (on ARM7 cores, though) that take two minutes to open a connection...

 

If anyone has solid information regarding these two stacks, this would be extremely interesting. (Maybe this is premature, but I´ve lost interest in MatrixSSL after reading some rather negative remarks regarding its code readability.)



#15 preconsult

preconsult

    New Member

  • Members
  • Pip
  • 1 posts

Posted 09 May 2014 - 04:01 PM

Hello

 

I am also working on a project where i have to put a message on a Azure Service Bus Queue. I think i am almost there. The only problem i have is that i need to get a token from Azure accesscontrol over https. I have the code working using HttpWebRequest on a normal C# code. The code is ported to microframework and compiles. But when i do the webrequest i always get a System.NotSupportedException. Is this because of the lack of SSL Support on netduino, are there any workarounds ? 

 

If not, then it's simple not possible even with the REST Azure API to connect from netduino.

 

regards

Dieter



#16 Paolo Patierno

Paolo Patierno

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationItaly

Posted 12 May 2014 - 10:39 AM

Hi Dieter,

there isn't a workaround for it. The lack of SSL support on Netduino already blocked me to develop a Service Bus client for Netduino using HTTP REST interface.

 

Paolo.


Paolo Patierno

Microsoft MVP on Windows Embedded & IoT

Azure Advisor

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

Blog : Embedded101
?


#17 johnmiddleton

johnmiddleton

    New Member

  • Members
  • Pip
  • 4 posts

Posted 12 May 2014 - 10:04 PM

Well the workaround could be to write a cloud sevice webapi that receives a POST and then makes a service bus request - without SSL you would have to rely on encryping the message payload on the netduino and decrypting the payload in the Web API 



#18 Paolo Patierno

Paolo Patierno

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationItaly

Posted 13 May 2014 - 07:17 AM

In this way you are developing a bridge but not direct connection to the Service Bus.

Of course, it is a workaround due to SSL lack but in this case I would not use an "heavy" protocol as HTTP but a more lightweight protocol like MQTT and develop an MQTT-ServiceBus bridge in the Cloud.

 

Paolo.


Paolo Patierno

Microsoft MVP on Windows Embedded & IoT

Azure Advisor

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience

Blog : Embedded101
?


#19 compulim

compulim

    New Member

  • Members
  • Pip
  • 1 posts

Posted 21 May 2014 - 02:57 AM

A quick hack for me: an OpenWRT router in the home network and it help proxying to SSL services. There are cheap palm-sized USB-powered Wi-Fi routers that can be easily "patched" to OpenWRT, about $35-40.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.