This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use the latest version of Californium

Hi, 

I am trying to following the instructions at: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.iotsdk.v0.9.0%2Fiot_sdk_user_guides_java_coaps.html

but the directory paths of Californium has deviated quite a bit since this was published. Do you have some updated instructions on how to use Californium with your IoT examples?

Thanks very much. 

Parents Reply Children
  • It's the last step that I'm having trouble reconciling:

    Copy the whole certs directory from
    <Local Repositories>/californium.core/cf-secure/certs
    to
    <Local Repositories>/californium.tools/cf-client/certs

    There is no certs directory, but I do see a top level demo-certs directory. But what do I copy and where? 

    Yes, I realize the guide was based on an older version of the repo but there is no real reason to go back to an older version of the code. I think the guide should be updated. This is also why I am here to ask for your wisdom. :)

    Thanks for additional advice you can provide as we are trying to stand up our own CoAP proxy instance and want to be able to connect Nordic Thread + CoAP examples that we have built to it instead of GCP because the GCP proxy demo is not a commercial offering.

  • > Also, it is worth pointing out that you might run into worse problems than just some changed paths. There is a reason why the guide states explicitly which version it was created for.

    I'm one of the commiter of Californium. I strongly recommend not to use 5 years old stuff, use our current 2.3.0 release.

  • Have a look at Californium Proxy2 .

    That documentation doesn't cover right now to use coaps/DTLS (I haven't the time to do so). But with Californium 2.3.0 it is that much easier to setup coaps/DTLS, than it was years ago. If you want your client to use PSK, it's mainly to provide the port the server is listening to and a PSKStore containing the identities and secrets. That should help to start and later you may adapt the defaults in the configuration according your environment and requirements.

  • Thanks Achim! Yup, I started to just use the Californium release to get my feet wet since as you mentioned I ran into some further issues after attempting to fix the path issue.

    I cloned the latest version of californium from github and I was able to successfully run the cf-helloworldserver example and I used Copper (Cu) google chrome extension to access the example hello world resource. This is working fine. 

    Next, I went to run cf-secure example. This seems to run fine also. But is there a way to use Copper to test this? Or I need some other tool? 

    I think it would be nice if there was some getting started guide with the latest release of californium (and preferably with Nordic Thread capable dev kits). I have further questions like where the Key store are defined and how to setup the various modes, PSK, X.509, etc. I haven't tried the californium-proxy2 but also I think this needs to be shown how to integrate with DTLS, etc.Anyway, I am trying to get some basic understanding and take the first baby steps...

  • Update: I used SecureClient.java and am able to connect to my SecureServer.java instance now, which is cool! I'm going to try and connect my nRF52840-DK to this secure server and see what happens. I'm not sure what to expect.

Related