Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otNcpHdlcInit missing #10771

Open
1 task done
lsroka76 opened this issue Dec 22, 2024 · 2 comments
Open
1 task done

otNcpHdlcInit missing #10771

lsroka76 opened this issue Dec 22, 2024 · 2 comments
Assignees
Labels
Area: OpenThread Issues and Feature Request about OpenThread Protocol Resolution: Wontfix Arduino ESP32 team will not fix the issue Status: Solved

Comments

@lsroka76
Copy link

Board

ESP32 C6

Device Description

ESP32 C6 Dev Module

Hardware Configuration

nope

Version

v3.1.0

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

80

PSRAM enabled

yes

Upload speed

115200

Description

I'm trying to port Zigbee Gateway example to Arduino but I've found some problems with ot_rcp part.
There was no otAppNcpInit function:

// Initialize the OpenThread ncp
    otAppNcpInit(esp_openthread_get_instance());

so I tried to port it:

void otAppNcpInit(otInstance *aInstance)
{
#if CONFIG_OPENTHREAD_RCP_SPI
    otNcpSpiInit(aInstance);
#else
    otPlatUartEnable();

    otNcpHdlcInit(aInstance, NcpSend);
#endif
}

but next problem arised :

there is declaration of otNcpHdlcInint function in `openthread/ncp.h` but linker is missing body definition.

Any ideas how I can fix it?

Lucas

Sketch

as above

Debug Message

linker is missing otNcpHdlcIinit

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@lsroka76 lsroka76 added the Status: Awaiting triage Issue is waiting for triage label Dec 22, 2024
@SuGlider SuGlider self-assigned this Dec 22, 2024
@SuGlider
Copy link
Collaborator

SuGlider commented Dec 27, 2024

@lsroka76 - Arduino OpenThread Library doesn't support RCP // NCP natively, beause it works as a Full Thread Device.

You will need to create an Arduino as IDF Component project in order to configure the sdkconfig file.
It is necessary to set OpenThread in RCP (Radio CoProcessor) mode and enable NCP Hook.

This can be done by adding CONFIG_OPENTHREAD_ENABLE_NCP_VENDOR_HOOK=y using IDF MenuConfig:

(Top) → Component config → OpenThread → OpenThread → Thread Core Features → Thread device type --> (X) Radio Only Device
(Top) → Component config → OpenThread → OpenThread → Thread Core Features → Thread Radio Co-Processor Feature --> [*] Enable vendor command for RCP

This will enable OPENTHREAD_ENABLE_NCP_VENDOR_HOOK=y and otAppNcpInit() will be visible in the application.

@SuGlider SuGlider added Resolution: Wontfix Arduino ESP32 team will not fix the issue Status: Solved and removed Status: Awaiting triage Issue is waiting for triage labels Dec 27, 2024
@SuGlider
Copy link
Collaborator

Another way to get it, would be by developing an IDF project directly. ESP32 Arduino OpenThread won't help for this task.

@SuGlider SuGlider added the Area: OpenThread Issues and Feature Request about OpenThread Protocol label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OpenThread Issues and Feature Request about OpenThread Protocol Resolution: Wontfix Arduino ESP32 team will not fix the issue Status: Solved
Projects
None yet
Development

No branches or pull requests

2 participants