1. March 2017

Microsoft Azure IoT Hub MQTT device to device communication is not supported

Microsoft Azure provides IoT Hub. It might sound great because it has support for MQTT. It is very important to mention that Azure IoT Hub has a different way how it operates than Mosquitto which means that architecture of your IoT solution must be different.

Let’s check differences.

Default port:

  • Mosquitto is 1883 which is not secure, it is possible to enable TLS
  • IoT Hub 8883 secured by TLS/SSL (only)

Publishing and subscription of messages:

That’s a huge difference. In the case of Mosquitto you can easily build network of devices which can communicate together and management logic could be injected by Node-RED. In the case of IoT Hub whole interaction is managed by the cloud.

If you still want to play with IoT Hub and MQTT, I recommend article written by Satish Pagare who explains how to use mosquitto_sub and mosquitto_pub to interact with IoT Hub.

17. November 2013

How to build sample applications from Adobe Illustrator SDK CC by Microsoft Visual Studio 2013 Express

Let’s try to build sample applications from Adobe Illustrator SDK CC with Express version of Visual Studio.

Adobe Illustrator SDK is available at: http://www.adobe.com/devnet/illustrator/sdk.html

In readme file Adobe explicitly states requirement that you should use Microsoft Visual C++ 10 (Visual Studio 2010 SP1). Hm.

Unzip directory with SDK and go to samples directory. Let’s start with LiveDropShadow sample.

Double click LiveDropShadow.vcxproj to open project in Visual Studio 2013. Hit F7 to build the project.

You’ll get error message:

Error 1 error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = ‘v100’) cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting “Upgrade Solution…”. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets

illustrator-wrong-target

Go to menu Project and select Retarget solution:

illustrator-retarget-project

This action converts project into project for VS 2013. Hit F7 for build.

After several seconds compilation fails and you’ll get another error message:

Error 20 error RC1015: cannot open include file ‘afxres.h’. C:\idea\Adobe Illustrator CC SDK\samplecode\LiveDropShadow\Resources\LiveDropShadow.rc 26 1 LiveDropShadow

illustrator-visualstudio

Double click error message and you’ll see problematic code.

illustrator-problematic-code-01

Problematic is include of afxres.h. It is reference to MFC library which is not part of Visual Studio Express 2013 edition. MFC is available only in Professional version. Do not worry. For many plugins you do not need MFC.

You can disable this include. There is also another problem few lines below with language code. We can disable this line of code for time being.

illustrator-problematic-code-02Hit F7. You’ll get error message that points into VersionInfo.rc file. There are several defines referencing MFC. You can disable those line for time being. (FILEFLAGMASK, FILEOS, FILETYPE, FILESUBTYPE)

illustrator-problematic-code-03

Hit F7 and now you’ll get AIP package 🙂

illustrator-visualstudio-success-build

Open Illustrator and configure path to Additional Plug-ins folder. Click Edit – Preferences – Plug-ins & Scratch Disks and set path to the folder where Visual Studio produced that aip file. It will be in directory Adobe Illustrator CC SDK\samplecode\output\win….

illustrator-preferences

Click OK, restart Illustrator.

Tadaaa, plug-in is working:

illustrator-working-01

Result:

illustrator-working-02

For more information about plug-ins read getting-started-guide.pdf document in SDK directory docs\guides. 🙂

 

26. May 2013

Useful tips for PowerShell users

You can find my new powershell-examples project at GitHub.

I store there small code snippets and support tool which could be useful for day to day life with PowerShell 😉

18. November 2012

Allegro5.1 and Visual Studio 2012 – Unable to start examples – missing dll files

It’s easy to work with Allegro 5.1 project in Visual Studio 2012. Just clone the project from git repo. Invoke cmake-gui.

Note: Make sure that you have installed Windows SDK for Windows 8.

You can do it using following commands (use Developer Command Prompt for VS2012 or set proper variables):

git clone git://git.code.sf.net/p/alleg/allegro
cd allegro
mkdir Build
cd Build
cmake-gui ..

Click Configure and Generate. Then open solution in Visual Studio.

You can build whole solution. The only problem is that when you want to invoke any example then you’ll see something like this:

Those DLL files are located in Build\lib\RelWithDebInfo (or something like that). It is sufficient to update PATH environment variable. You can do it on per-project basis.

Press Alt+F7 (Right click – Properties) – Debugging – Environment – Set/Add:

PATH=$(ProjectDir)..\lib\RelWithDebInfo

Run the example again (F5):