Giter Site home page Giter Site logo

Comments (6)

karsev avatar karsev commented on August 17, 2024

@maansaari

from mbed-os-example-client.

ciarmcom avatar ciarmcom commented on August 17, 2024

ARM Internal Ref: IOTCLT-1246

from mbed-os-example-client.

yogpan01 avatar yogpan01 commented on August 17, 2024

@SeppoTakalo Can you please look into this ?

from mbed-os-example-client.

TuomoHautamaki avatar TuomoHautamaki commented on August 17, 2024

@sg- , please investigate

from mbed-os-example-client.

sg- avatar sg- commented on August 17, 2024

Not supported in https://github.com/ARMmbed/mbed-os-example-client#supported-target-hardware-configurations

Known issue. https://github.com/ARMmbed/oob-mbed-os-example-client/issues/15

from mbed-os-example-client.

javier-moreno-tridonic-com avatar javier-moreno-tridonic-com commented on August 17, 2024

After reading the pointers and causes commented in ARMmbed/oob-mbed-os-example-client#15 managed to run it by making the following changes to the example:


In simpleclient.h Replace:

M2MSecurity* create_register_object() {
        // create security object using the interface factory.
        // this will generate a security ObjectID and ObjectInstance
        M2MSecurity *security = M2MInterfaceFactory::create_security(M2MSecurity::M2MServer);

        // make sure security ObjectID/ObjectInstance was created successfully
        if(security) {
            // Add ResourceID's and values to the security ObjectID/ObjectInstance
            security->set_resource_value(M2MSecurity::M2MServerUri, _server_address);          
            security->set_resource_value(M2MSecurity::SecurityMode, M2MSecurity::Certificate);
            security->set_resource_value(M2MSecurity::ServerPublicKey, SERVER_CERT, sizeof(SERVER_CERT));
            security->set_resource_value(M2MSecurity::PublicKey, CERT, sizeof(CERT));
            security->set_resource_value(M2MSecurity::Secretkey, KEY, sizeof(KEY));            
        }
        return security;
    }

With

M2MSecurity* create_register_object() {
        // create security object using the interface factory.
        // this will generate a security ObjectID and ObjectInstance
        M2MSecurity *security = M2MInterfaceFactory::create_security(M2MSecurity::M2MServer);

        // make sure security ObjectID/ObjectInstance was created successfully
        if(security) {
            // Add ResourceID's and values to the security ObjectID/ObjectInstance
            security->set_resource_value(M2MSecurity::M2MServerUri, _server_address);
            security->set_resource_value(M2MSecurity::SecurityMode, M2MSecurity::NoSecurity);         
        }
        return security;
    }

In mbed_app.json

"MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES" and "MBEDTLS_TEST_NULL_ENTROPY" need to be added to macros


In mbed-os\targets\TARGET_STM\TARGET_STM32F4\TARGET_NUCLEO_F401RE\PinNames.h

Since PA_5 is used by the SPI clock LEDs need to be "rewired" to an unused pin (e.g. PA_9)

    LED1        = PA_9,
    LED2        = PA_9,
    LED3        = PA_9,
    LED4        = PA_9,

Keep in mind that we register our devices on a Leshan LWM2M server with disabled security for testing purposes. This solution probably won't be useful if the deviced is intended to be used in conjunction with mbed Device Connector

from mbed-os-example-client.

Related Issues (20)

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.