Giter Site home page Giter Site logo

Comments (2)

sandeepmistry avatar sandeepmistry commented on July 30, 2024

@bettse I'm starting to run into code size limits as well, while working on adding unauthenticated security.(this is a fairly ambitious Arduino library).

I wasn't planning to add OTP, but it should be pretty straight forward, the diff is pretty much

-            0x06,0x06,0xf0,0x00,0x03,0x15,0x39,\
+            0x06,0x06,0xf0,0x00,0x83,0x84,0xb1,\

So in nRF8001.cpp - send CRC:

data.buffer[4] = 0x03;

needs to be changed to:

data.buffer[4] = 0x83;

The other change is not to send run/calculate setup messages, but still calculate the pipe numbers.
We'll need to experiment if splitting the setup message part to a new method and not calling in in OTP mode will actually result in code savings.

Also, this is pretty dangerous for the average Arduino user, if you get it wrong, you can't change the OTP (you can still send memory resident setup data on power up). We'll have to provide some action the user needs to take, for example Nordic's generated services_lock.h requires you to remove a #error.

I'm leaning towards looking into reduce code size another way first, maybe there is stuff in the utilities folder (imported from the Nordic nRF8001 SDK) that can be removed or reworked? Also, reworking other parts of the library, or pre-calculating all setup messages at build time ... thoughts?

from arduino-bleperipheral.

bettse avatar bettse commented on July 30, 2024

Yeah, certainly a dangerous thing that should require non-trivial confirmation by the developer to execute. If there are code savings that could be made without that, it seems like that would be the safer path.

Its nice to know that, if it comes to it, the changes for using the OTP are already known.

from arduino-bleperipheral.

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.