Coder Social home page Coder Social logo

SwiftCoAP + LWM2M? about swiftcoap HOT 5 CLOSED

stuffrabbit avatar stuffrabbit commented on June 22, 2024
SwiftCoAP + LWM2M?

from swiftcoap.

Comments (5)

mlindstedt avatar mlindstedt commented on June 22, 2024

Hi Stuffrabbit,

you had very quick answers on my other 2 questions, do you have an answer on this question too?

from swiftcoap.

stuffrabbit avatar stuffrabbit commented on June 22, 2024

Hey mlindstedt,
sorry for the late answer. To be short: No have not implemented any LWM2M integrations till now. Maybe you can start a fork? :)

from swiftcoap.

mlindstedt avatar mlindstedt commented on June 22, 2024

Hi stuffrabbit,

I actually started on a LWM2M integration, for REGISTER / DEREGISTER and they worked fine. However when I implemented READ, then I ran into severe problems in SwiftCoap-code and I was doing lot of debugging in your code to try to find problem, the bits and bytes on Coap-level doesn't seem to be sent correctly. After several days of debugging, and not being able to make it work, I unfortunately had to abandon, and instead decided to go with Wakamaa implementation:

https://github.com/eclipse/wakaama

Even though Wakamaa is written in C, I managed to integrate the library into my Swift app.

Afterwards it has come to my attention that Firefox web browser:
https://addons.mozilla.org/en-US/firefox/addon/oma-lwm2m-devkit/
used PUT and not POST for LWM2M READ and that might be the reason why it didn't work..

from swiftcoap.

stuffrabbit avatar stuffrabbit commented on June 22, 2024

Hi mlindstedt,
good to hear that you were able to find a solution for your problem. So you mean that there is a bug inside the CoAP-message parsing of SwiftCoAP? Or what were these severe problems about?

from swiftcoap.

mlindstedt avatar mlindstedt commented on June 22, 2024

It seems to me that there is a bug, but I only put in 4 debug working days, before I gave up. Like I said, when I implemented LWM2M register and deregister on top of SwiftCoap in my iOS app, then SwiftCoap worked fine, but when I implemented LWM2M read or execute, then SwiftCoap didn't make other side trigger on what it sent, so either the problem was in SwiftCoap or in the other end (LWM2M client).

In my case I used Firefox web browser with a plugin, to use it as LWM2M client, whilst the iOS app with SwiftCoap was LWM2M server.

However, later on it turned out, that Firefox plugin was not correctly implemented, it followed old LWM2M standard which made it use PUT and not POST for LWM2M read, which might be reason why it didn't work.

But, I also tried Wakamaa as LWM2M client towards my iOS app and it had same problem, so my suggestion is that you try to implement some parts of the upper layer, i.e LWM2M on top of SwiftCoap, to see if you can make it work. REGISTER and READ should be enough for you to see if you can get same problem.

from swiftcoap.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.