Can I run a LabVIEW webservice from Raspberry Pi? - raspberry-pi2

I noticed that there's a recent released apps that enables Raspberry Pi to run a deployed LabVIEW program all by itself and to set the program run as RPi boots. Since I was planning to remotely control the LabVIEW program through the internet using a Web UI, is it possible to setup a webservice of the program on the RPi? By the way, I'm currently planning to use RPi 2 for my project.

If I am getting you right you are about LINX at Makers hub: https://www.labviewmakerhub.com/doku.php?id=blog:users:makerhub:2016-04-07-linx-3
It is open source, free tool. You are free to modify and it and add custom command on LINX Firmware as I understand. After that, you can call LabVIEW Custom Command vi which is part of the API.
You can have a look on all API VIs here: https://www.labviewmakerhub.com/doku.php?id=learn:libraries:linx:reference:labview:start

From the discussion thread here:
We're running the LabVIEW Runtime on the target just like we do on our Linux based RIO devices. The great thing about using the full runtime is that you get the standard LabVIEW expereince with interactive mode, highlight execute, probes, startup executables, etc. This also means that all of the core LabVIEW functionality will work. One way to think about it is anything that works without explicitly installing it on the target from MAX should work on BBB/RPI. We actually don't plug into MAX at all. We currently do not support any toolkits or modules, but we've been experimenting with a couple to see what it would take to support things like web services.
So native LabVIEW web services aren't available yet, but may be coming soon - I'm sure development is responsive to what people ask for, so go to that discussion thread and let them know your interest.
You might be able to 'roll your own' simple web service using the TCP VI's, which as far as I can see should be available on the Raspberry Pi.
Note that deployment to Raspberry Pi or (BeagleBone Black) is only licensed for noncommercial use, as stated in the same thread.

Related

Porting web application to Chrome OS (with multi-monitor support)

I'm in the process of porting an application to ChromeOS with the requirement that it should look and feel as native as possible. This means in particular that it should allow things such as multi-monitor support and USB support.
One possibility would be to implement it as a web application (since we have already a web client), but in this case I would need to add support for native features (again, multi-monitor support and USB device access), so I wonder what needs to be done in this case. My wild guess as a ChromeOS developer newbie is that I would need to extend the code with ChromeOS JavaScript features, and I don't know if this is possible.
Another possible approach would be to write an Android application, since I see that ChromeOS added support for Android applications (in this case I would have to write the code from scratch).
Finally, another option would be to write native code, which could be possible for example relying on a Crouton development environment, and reuse the code of a native C application.
What approach would you recommend to build a ChromeOS application starting from a web application or from a native one?
What approach would guarantee access to native features (multi-monitor support and USB)?
I discovered two APIs which should help with multi-monitor support:
https://developer.chrome.com/extensions/windows
https://developer.chrome.com/apps/system_display
The system.display API allows one to discover and monitor the current monitor layout, while the windows API allows one to create several windows in the same application. By combining these ones I should be able to create a window for each monitor in case I go with the chrome implementation route.
Given that I already have a native implementation for Linux, Crostini (as opposed to Crouton) is also very appealing since it provides a deeper level of integration with virtually no changes to the code and no need to maintain two different versions of the web client, with the only downside that it requires the user to create a Linux environment and manually install the application, also it is not supported on all chromebook devices and on many it will be never supported.
I still need to check what is the performance overhead. Also the level of integration with USB I/O might be higher than the one achievable by using the chrome API.

What is the difference between local runtime and hosted runtime in Google Colab?

I I just started using Google Colab for a project of mine. I see an button of "CONNECT" on the web page that presents before me two options:
Connect to Hosted Runtime
Connect to Local Runtime
Can anyone explain what the two mean and how it may affect my project? I did not find any useful documentation related to it.
Hosted Runtime runs on a new machine instance in Google Cloud. You don't need to set-up any hardware. But you may need to install a few libraries every time you use it.
Local Runtime runs on your machine at home. You need to install Python, Jupyter, and set-up some forwarding. It is useful if you have a lot of data to process locally, or if you have your own powerful GPU to use.
In most cases, I use Hosted Runtime.

What sort of things are UEFI "applications" actually used for?

I'm interested in PC firmware programming, and am just studying the UEFI spec. To my surprise, it seems like a spec for an entire OS which is embedded in firmware. You can even write UEFI "applications", which run directly using the UEFI boot services, without any other OS present.
I've found blog posts which show how to create a "Hello, world!" application which can run in the UEFI preboot environment. This is... interesting, and bizarre at the same time. I'll run my "Hello, world" programs on a regular OS, thank you.
What kind of use cases are UEFI applications actually good for? Fancy boot configuration screens? Does any "real", commercially available PC firmware use UEFI applications to implement anything more than just boot loaders and boot configuration utilities?
Anything that isn't PEI/DXE/SMM core or driver is an application, so any "real" PC have them, because BIOS Setup is actually an UEFI application. Some vendors include various other apps like firmware updaters, diagnostic and troubleshooting utilities, etc. UEFI 2.4 makes possible to add your own application with a properly filled BootXXXX/KeyXXXX variable pair and then run it by pressing a key combination during POST.
Most console applications written in C can be compiled as UEFI application by using StdLib package of current EFI Development Kit and then run in UEFI shell.
Major examples of useful UEFI apps (besides bootloaders, shell and Linux kernel, of course) are Intel ME System Tools, Read Universal, Python 2.7 and many more.
Eventually, when legacy boot will not be available anymore, all currently useful DOS utilities must either be made UEFI applications or go extinct.
Despite many valuable answers here, because I wrote couple UEFI applications myself I will try to add my 2 cents. First, what is UEFI application to just give ground what we talking about:
UEFI Specificatin v2.5:
Section 2.1.1
The major differences between image types are the memory type that the firmware
will load the image into, and the action taken when the image’s entry point exits or returns. An
application image is always unloaded when control is returned from the image’s entry point.
Section 2.1.2
When the application returns from
its entry point, or when it calls the Boot Service EFI_BOOT_SERVICES.Exit(), the application
is unloaded from memory and control is returned to the UEFI component that loaded the application.
Groups of applications that make sense in UEFI:
Configuration tools - Configuration interface for Option ROMs (ie. for storage controllers), out of band management (ie. AMT configuration tools), manufacturer performance tweaking tools
Provisioning tools - used by administrators to preload specific BIOS setting, manually setting all options in BIOS setup would be inefficient
Diagnostics tools - mostly for tests that cannot be performed in OS (DRAM tests, full storage scan, storage R/W tests, etc.). In some districts specific diagnostics tools are required in UEFI BIOS, so those can be sold to government.
Security applications - HDD encryption/decryption, antivirus scanner and anti thief applications
BIOS capability enhancement - Power Over Ethernet extensions, DRAM discovery, patching and modification of system tables (SMBIOS, ACPI)
Display tools - for displaying complex animations while running, splash screen displaying
Bootloaders - this is special type of application, which can call EFI_BOOT_SERVICES.ExitBootServices() causing termination of all memory management and passing control to Operating System.
Note that very important feature of UEFI application is that it can be added to boot order and be executed each boot time. Also UEFI application do not have to be delivered with BIOS image it can be stored in connected device memory, which is common for Option ROM configuration tools.
Here it is an example of a full blown UEFI Pre-boot Application;
There are SED SSD/HDD drives. As soon as SSD/HDD loses its power it goes into locked state (hardware-based encryption) There is no way you can get access to drive's data and all partitions on the drive are no longer even visible. Only small read-only partition (ShadowMBR) is available. UEFI firmware boots an UEFI application from that only available partition (UEFI app is written on that partition during the initialization process and when the ownership of an SED is taken). It securely authenticate user and if credentials are valid it unlocks the drive. When the drive is unlocked Shadow MBR disappears and all partitions on the drive becomes available. Then the App chain-boots the installed OS.
So if you don't have credentials you cannot even boot the OS and you cannot access the data on the drive by any means.
Here's a couple of examples:
https://github.com/NikolajSchlej/CrScreenshotDxe
UEFI DXE driver to take screenshots from GOP-compatible graphic console (yes, you can make PNG screenshots of your BIOS and save them)
http://ruexe.blogspot.com/
RU.EFI is quite an advanced tool for debugging the BIOS
Well, there are the OS loaders - both the more heavyweight ones (Windows, GRUB, BSD Loader) and the "present a menu" ones (rEFInd, Gummiboot). Shim, which enables UEFI Secure Boot for Linux platforms, consists of an application as well as installing a protocol for use by other applications.
Then you have things like the Linux kernel, which when compiled with CONFIG_EFI_STUB becomes a valid UEFI application, with the awareness of booting itself.
And firmware updates can also be shipped as UEFI applications.
The UEFI shell itself is an application.
Then there are things like factory production testing utilities, development diagnosis tools, ...
Windows 7 - 8 have UEFI installer. I'm not fully aware of the details, but I'm pretty sure this new environment gives a lot more flexibility to the developers than traditional boot environment on DVD.
Some motherboards have "instant on" features that allows you to get to a desktop screen within a few seconds. This is usually a stripped down flavor of some linux that allows you to access a web browser and play music/video. ASUS have such boards.

Networking in Mono

All,
I'm attempting to estimate the effort to port an app developed on Windows (.NET) to Linux (Mono). I came across the MoMA tool, which attempts to look through my .exe and find potential areas of incompatibility. Most of my issues appear to be centered around get/set of network settings, getting network info, etc. (Object ManagementBaseObject.get_Item and set_Item. etc).
In almost all of the cases, the Mono functionality is listed as "ToDo". For estimation purposes, is it safe to assume most/all of these have some kind of workaround? I would imagine this type of basic networking support must be included in the latest version of Mono. Or should I assume none of this is currently available and I would be stuck waiting for it to be implemented (or be forced to implement it myself)?
Thanks,
Dan
First,see Mono Compatible Networking/Socket Library. Also,take a look on Cross-Platform Network Applications with Mono. You can start with C# Network Library.

C# mono inter process, inter application cross platform messaging implementation. (How to)

I am developing applications and c#, I at the moment, I work on projects for Windows Platform only. However, I am planning to move into using C# mono to make my programs be able to work with linux, mac-os and windows.
One of the feature I am implementing in my program is the ability to communicate between them (ie. A Console type program that can communicate and interact with GUI Program by sending commands and receiving reply messages, logging messages, signals,.etc). Back in windows dotnet framework, I am looking at anonymous pipes, but now, I am checking if Mono.Unix.UnixPipes will do the job for me and will let me implement inter process messaging with very little to no adjustments at all under linux, mac-os and windows.
I am a little bit new to this kind of feature, and i am now reading into the documentations (however, class and objects documentations are not helping me so much yet). I am also browsing to some of the inter process messaging questions that are posted here in stackoverflow.
If anyone has a link to a tutorial kind of document or example on how to do this, it will be a great help. please help?
thank you.
I highly recommend running a mongodb (easly scalable from a dev boxes to hundreds of servers) and using the library https://github.com/dominionenterprises/mongo-queue-csharp on top of it for the messaging. It has the ability to query for messages which enables some really nice patterns. Also its compatible with mono ! Also has some other languages if needed down the road.