XML Library

Has anyone used an XML library in development, e.g. Libxml2?

Cheers, Misha

You mean this: xmlsoft.org/index.html :question:

Yes - has anyone compiled it (or similar) into an embedded Wavecom application?

Open AT Lua comes with samples to:

  • read XML into a directly browsable Lua table
  • generate some XML out of a Lua table (in the webphone sample, the SMS stored in the SIM card are translated into an RSS stream this way).
    There’s no SOX-style streaming of XML data: given the devices’ limited memory, a realistic use case for such a feature has yet to be found :slight_smile:

Almost 4 years later… I do a search on Sierra Developer Zone and Sierra wireless main website and nothing can be found when searching for XML library. :frowning:

There is nothing much on this forum either.

If one POST information to a server one could expect a response back in an XML structured format. Surely this is something others have done and therefore a library would be handy.

Any tips / shortcuts as don’t want to reinvent the wheel :unamused:

Not really.

Usually, an M2M system is designed as a whole - so the server will be designed with the remote nodes in mind. Also, M2M system have traditionally been very conservative on data usage.

XML isn’t (or hasn’t been) a great fit for such applications.

I guess your earlier observations suggest otherwise…?

I wouldn’t have thought that there’d be anything particularly Open-AT-specific about this, so you could just try searching for any embedded XML library - but, again, I think you’ll find that it’s not widely used in that space :question:

Thanks for the quick reply. Your comments are really helpful. I am particularly interested in gaining further insight into your comment “so the server will be designed with the remote nodes in mind. Also, M2M system have traditionally been very conservative on data usage.”

As we are developing server side code at the moment that is exactly what we are trying to resolve… build code with remote notes in mind.

As we see it, the m2m ecosystem is changing. While contention is an issue, maybe more so in the US, the infrastructure and technology (and pricing) have all improved allowing for higher data loads more often. However, no one likes overhead for no reason.

I am therefore intrigued to learn what techniques / models are being used to develop server side data structures for remote nodes. I presume it is a balance between deciding on readability (use of strings) versus efficiency (use of binary codes).

Any links to useful blogs / sites covering this topic gladly welcomed…

PS. having done a quick internet trawl the word CoAP (Constrained Application Protocol) has popped up in the search engine as a probable methodology for M2M applications. Any views comments :question:

There are several protocols aimed at “constrained” applications.

MQTT is another: mqtt.org/

Here’s something based on XML: bitx.com/en/ecosystem/bitxml-protocol

Those examples look interesting but don’t appear to be standards based. Further research reveals another… Efficient XML Interchange (EXI) standard. Apparently EXI offers high compactness ratios and good processing times compared to standard XML. Some comments refer to JSON encoding as being very efficient too.

The thought now is how does one practically translate JSON, CoAP and/or EXI methodologies into something reusable for Sierra Wireless embedded applications. Maybe someone has done this already and is willing to share their experience.

Pretty much the same way that one would go about implementing any protocol on any target. 8)

Ah but not quite. There are many paths to implementation. One only has to search through Amazon (or equivalent) to see the thousands of different “how to guides”. Some people seek purity and excellence in designing something from scratch themselves while others just want to get on with saving time and money. With the latter, one would hope that Sierra’s How-Tos & code samples and possibly the libraries provided by Sierra Wireless and developer program partners are regularly updated to keep pace with market needs. :wink:

The point is, there’s nothing particularly special about SiWi or Open-AT here - it’s just another embedded platform

Sierra Wireless has a server cloud platform called AirVantage (version 3 currently in production, version 4 very soon available for Open AT-enabled devices).

The principle is to use an embedded agent (called ReadyAgent, contributed to Mihini Eclipse open source project – developer.sierrawireless.com/en/ … lugin.aspx (also available for non Open AT apps)

You can then use ReadyAgent simple APIs to send data to the server (it uses a binary compressed protocol).

Server side, you can retrieve your data and communicate with your embedded application using AirVantage REST or SOAP APIs:

AirVantage 3 (current version in production, will be updated soon)
–> create a free trial account here first: developer.sierrawireless.com/Clo … tform.aspx
–> REST/SOAP APIs: m2mop.net/portal/doc

AirVantage 4 (soon available in production for Open AT-enabled devices)
–> Use Manual: developer.sierrawireless.com/en/ … anual.aspx
–> REST APIs: developer.sierrawireless.com/en/ … 1_API.aspx

.Thibault.

Just like to personally thank you for posting this information. It is very timely for me anyway as I have been trying to understand “ReadyAgent” since yesterday. The “Mahini” link you included is really helpful in describing the architecture.

The sending of data to server side using REST or SOAP API’s is very handy and will review ReadyAgent API’s binary compression protocol. However, what appears more tricky (for me anyway) is when you want the server to respond back to the http post with more than just a simple “200 OK” (for example respond back with an update list for different parameters).

As I’m still on the steep learning curve with Open AT OS, my thoughts prior to reading your Mahini article was that Lua scripting language would be my approach, thanks to the way it creates tables. These automatic “associative array” structures make it ideal for handling “XML” style data structures and lends itself quite well to using json encoding with the server side response (when sending back complex data arrays back to remote device).

Thus my thoughts is to use json encoding for server side response back to remote device and then use LUA scripting to parse this information into LUA tables. It would be handy if someone has LUA scripts available to do this, or offer another approach (e.g. use ansii C library for XML decoding).