IotCon CBOR File Rejection Issue in Tizen TV Application

Original Created May 24, 2019 | Regeneration Apr 22, 2026

I'm developing an application using the IotCon feature on Tizen TV, but I'm encountering issues with CBOR file handling. Here's what I've done:

  1. Initialized IotCon with tizen.iotcon.initialize("mnt/host/server.dat") (server.dat file is created automatically)
  2. Created a server and a Door Resource
  3. Verified that all resources (including my Door Resource) are discoverable using Iotcon Client
  4. However, GET requests to the Door Resource consistently fail

I suspect the issue lies with the CBOR file:

  • When converting it to JSON, I don't see any Door Resource information
  • Manual modifications to the JSON (and conversion back to CBOR) prevent server initialization
  • Even converting the original CBOR to JSON and back without modifications causes initialization failures

How can I generate a working CBOR file that's compatible with Tizen TV?

Problem Understanding

The issue appears to stem from improper CBOR file generation or handling in the IotCon implementation. The server fails to initialize when the CBOR file is modified or regenerated, suggesting strict validation requirements.

Solution Methods

  1. Use Official Tools for CBOR Generation:

    • Instead of manual conversion, use Tizen's provided tools for generating CBOR files
    • Ensure the CBOR file includes all required resource definitions before server initialization
  2. Verify Resource Registration:

    • Double-check that your Door Resource is properly registered before attempting to access it
    • Confirm the resource path and attributes match exactly in both your code and CBOR file
  3. Debugging Steps:

    • Enable detailed logging in IotCon to identify where the initialization fails
    • Compare your generated CBOR file with a known working example

Code Examples

// Example of proper resource registration
var doorResource = {
    uri: '/door/1',
    resourceTypes: ['oic.r.door'],
    interfaces: ['oic.if.baseline'],
    properties: {
        state: 'closed'
    }
};

tizen.iotcon.registerResource(
    doorResource.uri,
    doorResource.resourceTypes,
    doorResource.interfaces,
    function() {
        console.log('Resource registered successfully');
    },
    function(error) {
        console.error('Resource registration failed: ' + error.message);
    }
);

Additional Tips

  • Always validate your CBOR files using Tizen's validation tools before deployment
  • Consider testing with minimal resource configurations first
  • Check for platform-specific limitations in the Tizen TV documentation

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.