Thingy 53 does not enumerate serial port for Dev Academy Lesson 6 exercise 2

Currenty I am on version 2.1 and was able to get the Thingy 53 to enumerate serial port(s) but using the old version 1.x thingy53.c file and the include files and functions that are in that file.

/*
 * Copyright (c) 2021 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include <zephyr/init.h>

#include <img_mgmt/img_mgmt.h>
#include <os_mgmt/os_mgmt.h>
#include <zephyr/mgmt/mcumgr/smp_bt.h>

#include <zephyr/usb/usb_device.h>

#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(thingy53_setup);


static int bt_smp_init(const struct device *dev)
{
	ARG_UNUSED(dev);
	int err = 0;

	img_mgmt_register_group();
	os_mgmt_register_group();

	err = smp_bt_register();

	if (err) {
		LOG_ERR("SMP BT register failed (err: %d)", err);
	}

	return err;
}

static int usb_cdc_init(const struct device *dev)
{
	int err = usb_enable(NULL);

	if (err) {
		LOG_ERR("Failed to enable USB");
	}

	return err;
}

SYS_INIT(bt_smp_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
SYS_INIT(usb_cdc_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);

In order to get thingy53.c to compile I had to select Use build system default under configuration in the edit build configuration instead of prj.conf.  The prj.conf file is present anyway.  

I then uplevelled to version 2.4 and just flat out tried the solution directly from the Nordic Git Hub server and was not able to get the serial port to enumerate.  I tried using parts of the old 1.x solution specifically the thingy53.c file once again but no luck.  Did some reading and looks like the thingy53.c file is no longer necessary anyway.  What is the solution to get the Thingy53 to enumerate and what's the difference between picking build system default or prj.conf in the edit build configuration. I tried to attach ncs-fund-main/v2.x.x/lesson6  https://github.com/NordicDeveloperAcademy/ncs-fund here that doesn't enumerate a serial port so that  console functions will work like printk, the logger and so on.

I'm using Visual Studio Code and any other sugestions that I can find.

Parents Reply
  • /Documents/Nordic/myapps/fund_less6_exer2_solutionNordic/prj.conf:33: warning: attempt to assign the value 'y' to the undefined symbol BT_NUS_UART_ASYNC_ADAPTER

    This did not work as you can see the BT_NUS_UART_ASYNC_ADAPTER was undefined.  I need a super really small primitive project that can both transmit and receive uart data.  That's why Lesson 6 exercise 2 needs to work with 2.4 and in all future releases 2.5 and so on.  This project does not use Bluetooth.  Can you are someone take another stab.  Ideally you would test with that project (lesson 6 exerercise 2)   Thanks

Children
Related