mbed client for software update - arm

I think this is maybe a bit general question but I am having trouble understanding if mbed client is capable of doing what I think it does.
I have managed to buil and run correclty Mbed Client on a K64F board. I have connected it to the server and the API runs perfectly with I/O elements, led and button. If I am not mistaken the client it is supposed to be able to update software executed on the board (even Firmware?). I have been searching but I have not found how to do this. I find references quite confusing on this issues.
Is it posible to define a resource as a software pakcage that is uploaded (let's say with a PUT request) and the executed (with the POST request)?
Is it posible update the firmware itself?
Any reference or example where I can see how it works?
Is the M2MFirmware class related to this posibility?

In a way, yes. LWM2M has firmware update resource specified. However, mbed Client can only do updates right now if you are connected to mbed Cloud - which is currently only available for partners - plus you'll need an OS which supports firmware updates... Just defining a resource is not enough as you need a bootloader capable of doing firmware updates too.
mbed Cloud + the updated client should be available to general public soon. Then the update capability will be available too.

Related

App Communication on Windows IoT

i want to run 2 different BackgroundTasks - one for the communication with my arduino - and one for the communication with other devices by using a webservice. These tasks should be able to write and read from ONE database. But my problem is, that the Windows.Storage.ApplicationData does not provide the SharedLocalFolder. It is null, if I want to use it. Is there any other way where i can store my database that both BackgroundTask can connect to it?
Additionally I found now this path:(Windows.Storage.ApplicationData.Current.GetPublisherCacheFolder(...)). This look very interesting, but if i want to use it I cant write there. I think, because the resolved file path does not exist..
Any other ideas?
Sincerely,
App2App Communication via WebServer (Blinky WebServer):
You can refer Microsoft's IoT sample provided for Blinky Webserver which also depicts the concept of App2App Communication. But you need to read it thoroughly to modify and reuse it up-to your expectation.
Right now I have no experience about Windows IoT and database. Once I got my hands on it, I'll update.

Sending smtp email from microcontroller

This may not be in the right location, so tell me and I'll move it.
I am a recent EE grad and I was hired to build a system that exists on a SoC with a simple 32-bit processor. The system basically monitors several external devices and performs some DSP on it, and then is supposed to send the results using a WiFi device (in my case I have the ESP8266 using UDP) to an email server for logging/notification.
I have been trying to find a library that I can use, but my uC can only program in C and I have it set up for UDP, and everything is in C++ using some other protocol, or something else completely.
I am great at DSP, decent at SoC's and uC's, but when it come to this email server communication thing I am at a loss.
I have successfully configured everything for the sensors, the datapath, the DSP, and connected the system to my WiFi via UDP, but I have yet to figure out how to send data to any servers.
Could someone help me understand how I should go about this?
I have looked into some simple SMTP commands such as HELO, MAIL, RCPT, DATA, etc. but I cannot understand how I actually should implement them in my code.
When I send out the WiFi data via UDP what type of data do I send and how do I format it? Do I need to send any other kind of flags? How should I expect the response? I also know the data has to be transformed into base 64 which is confusing me further.
I am also not super familiar with UDP to begin with, I have been using libraries that are part of the SoC's default library to connect to my WiFi.
I know these may either seem like obvious or stupid questions but it is were I no longer have any knowledge, and everything I find online doesn't make sense, or doesn't attempt to explain it, just gives a pre-made solution
I have found the RFC2821 but it doesn't get any clearer.
I know that's a lot but any help at all would be a lifesaver!
Since you are asking this question, I'm assuming that you are not booting and running an OS suitable for micro-controllers such as an embedded variant of Linux or such. If you were, you would simply be able to take advantage of possibly built in applications or other existing code.
But you don't mention having written an Ethernet stack, so are you using some other library or operating environment which might have some of the functionality needed for an implementation of SMTP?
If you don't and really do need to write your own SMTP client to run directly on the processor you are using, then you should be able to find plenty of examples of source code for this. A quick google search of How To Write an SMTP client showed a few articles with some example code. One article seems to be an exact hit, but you need to look at it further.
However, I would highly suggest just sitting down with a telnet client and connect to an SMTP server you are allowed to use and try the commands you need to just send a message. If you only need to send text, you don't need to get involved in MIME encoding or anything like that.

How to create a BACnet client in C

I am trying to create a client in C that will talk with a BACnet server. This BACnet server is stored on an industrial device (CAN2GO) and I am not sure how I could talk with this device.
I spent quite some time reading documentation for BACnet and I never found a clear example for a BACnet client. I already did some server and clients using TCP and UDP but I don't know how to start this BACnet client and I must say I am getting quite desperate.
I found a library which seems to correspond to what I want which is called BACnet protocol stack but when I tried the whois exemple no device was found (I expected to found the bacnet server but maybe I shouldn't ?).
So my question is : could you give me an exemple in C, or another language but C would be better, that would communicate with a BACnet server (nothing complicated just a question and analysing response). This example could be using the library I just wrote about or if you prefer another library I am of course open to everything.
Thank you very much for your time and answers.
I have used that stack and it is the best open source one you are going to find. If you cannot see anything using the demo\whois\bacwi example from that library, then there is something wrong with your setup. In particular, are you using IP? Are your BACnet client and BACnet server on different machines (they cannot be on the same without some serious tweaking)? Are the two machines on the same IP subnet? (They must be, once again, unless you do some serious tweaking (in this case, setting up BBMDs (BACnet Broadcast Management Devices))).
You will also want to try the "Read Property" example (demo\readprop\bacrp.exe) to actually read a value from the server.
If you are still stuck, then post your detailed problem at the link on Sourceforge, Steve, the author, is very responsive to questions.
I am currently using the stack - just started. I had a little trouble at first, not sure if my problem is the same but.. I basically am using some BAC components made from Schneider Electric (UNC-500) and an old un-supported platform (Niagara R2). On my laptop I created a host server and addressed it to a private LAN network between it and the UNC. My laptop was also using wifi, which was utilizing DHCP, so I had two separate interfaces going. This was my problem. I couldn't read or get 'I-AM' responses back from the UNC. As soon as I turned the WIFI off, I got the 'I-AM' broadcasts. Make sure that you are on the same network as your device, and that there are not other interfaces active. Maybe there is a way to assign the interface to use, IDK. I just started using it.

How to use Firebase on Cortex-M embedded system

I'm just starting a new project, a thermostat connected to wifi and controlled anywhere from mobile phone. I've seen the Nest Thermostat which has a Cortex-A8 but I need to make a simpler and cheaper one, just a Cortex-M3 + wifi + temperature sensor, no screen.
The Android app (developed by other people) uses Firebase, so my embedded system should use it.
I've selected a tiny RTOS, CyaSSL and lwIP, but this is my first Internet project and I need help with Firebase and everything related to Internet.
Is a Cortex-M3 suitable to connect to Firebase?
Is the selected software suitable to connect to Firebase?
What software do I need besides the selected? (Firebase API REST, JSON parser... and any software I don't even imagine)
I haven't found almost any info about such a system, there are some questions but most of them have no answer.
Thank you in advance
As I understood, to use the REST API you just need to implement the HTTP protocol, there is many RTOS that have full HTTP and HTTPS implementation.
I never used, but I know that mbed (http://mbed.org/) is designed for IOT,it is free, and developed by Arm, so it is probably the best way to go.
Just look for a C/C++ JSON Parser lib if it is not ready, otherwise you should develop one for yourself, it looks pretty simple.

How does Flash communicate with dll files

I want Flash to communicate directly with
dll files. How can I do this?
If Flash works, great! I just need an honest and descriptive answer
Thanks,
REQUIREMENT:
• Work without a server
• Understand what protocol I can use
DESCRIPTION:
• Flash GUI interface
• Stand alone unit
• It has a change acceptor and other hardware
There's no accommodations being made for Flash. I've
got to make this easy for other developers, and need enough info to
draw a diagram of how this will work.
Contrary to the other answer, Flash doesn't "run on the host" it runs "on the client" via plugins or standalone players. The server send the client a bytecode compiled package and the client platform executes that code locally. Flash Player and AIR are those platform. Flash will communicate with a server no matter what underlying OS there is, but you need to use the methods built into Flash like ExternalInterface (Flash <-> Javascript), fsCommands (Flash <-> Javascript), or Flash Remoting with Coldfusion Server. You can also use some rudimentary XML requests and posts.
The server simply serves the content and in the case of Remoting flash and Coldfusion swap binary data packets that they both understand. Coldfusion handles the packets server side and Flash handles them Client side.
As far as DLL access. Not likely. I have not tried to have flash access a DLL, nor would I want to. Maybe if you gave more of an idea what you are trying to do I can lead you in a different direction.
i doubt that will "work without a server".
Maybe if you use AIR, but i am not sure that will work.
Flash runs on the host. Which may be a unix that does not support "windows" dlls.
Or the Dll may not work under 64bit Windows 7.
you may at least need a Database-server or an web server.

Resources