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

how to configure wpantund ? #17

Open
Yug11 opened this issue Mar 25, 2019 · 13 comments
Open

how to configure wpantund ? #17

Yug11 opened this issue Mar 25, 2019 · 13 comments

Comments

@Yug11
Copy link

Yug11 commented Mar 25, 2019

I am implementing the openthread on makerdiary's nRF52840-MDK using a Linux machine.
It goes fine up to flashing the board. After that, the step where we have to configure wpantund, it constantly shows an error and it remains uninitialized. Help me resolve this issue .

@caizelin
Copy link
Member

I am implementing the openthread on makerdiary's nRF52840-MDK using a Linux machine.
It goes fine up to flashing the board. After that, the step where we have to configure wpantund, it constantly shows an error and it remains uninitialized. Help me resolve this issue .

@Yug11 You can follow this tutorial: https://wiki.makerdiary.com/nrf52840-mdk/openthread/#configure-wpantund

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

@caizelin
I have been following the same tutorial but it is not working as at this step the terminal keeps on and nothing happens
Screenshot from 2019-03-25 12-16-05

sometimes it shows unable to open the socket and sometimes descriptor in a bad state

@caizelin
Copy link
Member

Make sure which serial port name you are using. It seems that /dev/ttyACH0 does not exist.

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

but it does exist
Screenshot from 2019-03-25 12-37-17

@caizelin
Copy link
Member

but it does exist
Screenshot from 2019-03-25 12-37-17

Yes. But I saw you were using ttyACH0 not ttyACM0. Did you try ttyACM0 or ttyACM1?

@caizelin
Copy link
Member

ttyACM0

Then check the UART configuration before you compile openthread. In openthread/examples/platforms/nrf52840/platform-config.h file:

/**
 * @def UART_HWFC
 *
 * UART Hardware Flow Control.
 *
 * @brief Possible values:
 *         \ref NRF_UART_HWFC_ENABLED - HW Flow control enabled.
 *         \ref NRF_UART_HWFC_DISABLED - HW Flow control disabled.
 *
 */
#ifndef UART_HWFC
#define UART_HWFC NRF_UART_HWFC_DISABLED
#endif

/**
 * @def UART_PIN_TX
 *
 * UART TX Pin.
 *
 */
#ifndef UART_PIN_TX
#define UART_PIN_TX 20
#endif

/**
 * @def UART_PIN_RX
 *
 * UART RX Pin.
 *
 */
#ifndef UART_PIN_RX
#define UART_PIN_RX 19
#endif

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

Screenshot from 2019-03-25 12-46-39

I changed it to ttyACM0 then this happens

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

ttyACM0

Then check the UART configuration before you compile openthread. In openthread/examples/platforms/nrf52840/platform-config.h file:

/**
 * @def UART_HWFC
 *
 * UART Hardware Flow Control.
 *
 * @brief Possible values:
 *         \ref NRF_UART_HWFC_ENABLED - HW Flow control enabled.
 *         \ref NRF_UART_HWFC_DISABLED - HW Flow control disabled.
 *
 */
#ifndef UART_HWFC
#define UART_HWFC NRF_UART_HWFC_DISABLED
#endif

/**
 * @def UART_PIN_TX
 *
 * UART TX Pin.
 *
 */
#ifndef UART_PIN_TX
#define UART_PIN_TX 20
#endif

/**
 * @def UART_PIN_RX
 *
 * UART RX Pin.
 *
 */
#ifndef UART_PIN_RX
#define UART_PIN_RX 19
#endif

Yes I did open this file and copied this configuration at the end

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

ttyACM0

Then check the UART configuration before you compile openthread. In openthread/examples/platforms/nrf52840/platform-config.h file:

/**
 * @def UART_HWFC
 *
 * UART Hardware Flow Control.
 *
 * @brief Possible values:
 *         \ref NRF_UART_HWFC_ENABLED - HW Flow control enabled.
 *         \ref NRF_UART_HWFC_DISABLED - HW Flow control disabled.
 *
 */
#ifndef UART_HWFC
#define UART_HWFC NRF_UART_HWFC_DISABLED
#endif

/**
 * @def UART_PIN_TX
 *
 * UART TX Pin.
 *
 */
#ifndef UART_PIN_TX
#define UART_PIN_TX 20
#endif

/**
 * @def UART_PIN_RX
 *
 * UART RX Pin.
 *
 */
#ifndef UART_PIN_RX
#define UART_PIN_RX 19
#endif

@caizelin
I need to add these lines at the end of the file or change the whole file??

@caizelin
Copy link
Member

caizelin commented Mar 25, 2019

@Yug11 Just set UART_HWFC to NRF_UART_HWFC_DISABLED, UART_PIN_TX to 20, UART_PIN_RX to 19

@caizelin
Copy link
Member

BTW, you can also try the pre-built ncp firmware ot-ncp-ftd.hex.

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

@caizelin I have tried both the methods but none of it worked

Screenshot from 2019-03-25 15-06-10

@Yug11
Copy link
Author

Yug11 commented Mar 25, 2019

once it went up to this stage and lagged, after that, I tried it again but the same error occurred

Screenshot from 2019-03-25 13-41-25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants