No Connected Deivce for Thingy:53 board

Hello,

So, as per the requirement for my project I need to program the Thing:53 using Visual Studio code programmer following the instruction as provided in the below link:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thingy53.html#thingy53-compatible-applications

As I am new to thingy:53, I tried to run the sample code for theThingy as provided on the link:

I have tried to set the build configuration as mentioned for the desired sample (Bluetooth: Peripheral LBS):

changes for the build are as mentioned below:

After finishing up the build configuration I tried to connect my device to the laptop but even after the build the software is not able to detect Thingy:53 in the connected device section

So, I have a query that do you know why am I not able to find out the device?

It would be highly appreciable if you can help me out to solve this problem.

Regards,

Divya

Parents
  • Hallo Elfving,

    Thank you for your response, but is there any way out if I can use Thingy53 for my project?

    Regards,

    Divya 

  • Hello Elfving,

    Right now, I am working on my project I am using TensorFlow to develop my code, and then I have trained the model and then converted it into tflite finally into a .hex file. 

    So, after careful reading and soem suggestion provided by you, I have understood that there are 2 possible ways where I can flash the desired code.

    1. Using a debugger as well, or using an SDK kit: nRF5340DK 
    2. TF lite micro 

    As mentioned in this previous post regarding Thingy:

    https://devzone.nordicsemi.com/f/nordic-q-a/91248/thingy53-support-for-tensorflow-lite

     

    So, I have a few queries related to TF Lite Micro as mentioned in the link below:

    https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-tensorflow-support

    1. Is there any link/document/blog related to programming microcontrollers using Tensorflow Lite Micro?
    2. As mentioned in the link, it is a little bit confusing for me but can we use this method only with SDK, or can we also program Thingy:53 with sample code to test and check the behavior?
    3. Though I have understood that programming with the debugger or nRF5340DK board is one way to solve this issue but do you think we can use TF lite Micro to program Thingy:53, as well?

    It would be very helpful is you can help me to resolve this confusion and help me out with the best solution to program Thingy. 

    Regards,

    Divya

  • First of all, let me explain some terms and acronyms:

    In order to flash an SoC, like the nRF5340, you need an external debugger or an onboard debugging chip.

    Divya_uni_ulm said:
     I have understood that there are 2 possible ways where I can flash the desired code.

    Yes, using a Jlink external debugger, or a debugging chip from a DK (you could for instance connect an nRF5340 to the thingy:53 to program it). Using TF lite micro is a way to get functioning code that you could potentially use on an SoC or MCU, but not something you can use to program/flash it.

    Divya_uni_ulm said:
    Is there any link/document/blog related to programming microcontrollers using Tensorflow Lite Micro?

    Nothing besides what I've already provided you unfortunately. 

    Divya_uni_ulm said:
    As mentioned in the link, it is a little bit confusing for me but can we use this method only with SDK, or can we also program Thingy:53 with sample code to test and check the behavior?

    I am a bit uncertain about what you mean here. Note that when people in the thread you linked to (as well as people on devzone) say SDK they often use it as a shorthand for the nRF5 SDK (while NCS is also in fact an SDK). Though a DK is not an SDK.

    Divya_uni_ulm said:
    Though I have understood that programming with the debugger or nRF5340DK board is one way to solve this issue but do you think we can use TF lite Micro to program Thingy:53, as well?

    Like I've alluded to above, I think you are confusing things.

    Regards,

    Elfving

  • Hello Elfving,

    As mentioned in your first answer I have used the Jlink programmer to program a sample on my device.

    To check the functionality of Thingy I have used Bluetooth: Peripheral LBS sample code to check the functionality and I have followed the steps mentioned here:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_lbs/README.html

    I am using ios phone to check the functionality but somehow I am not able to check the behavior from step 5 onwards. Also, I am using visual studio to build the device and code.

    So, my question is :

    1. Is there any other way to check if it is working correctly or not?
    2. Also, I have noticed that there are many print commands in the sample code but when I am testing the sample I can not find any print command on the terminal. So, is there any way if I can see these print commands on the terminal, and then I can check where my code is throwing the error?
    3. My whole purpose is to test the sample for now and check if it is working perfectly or not and then try with my own code. So, in both the cases I need to print and check the messages to verify the error/state of my code

    Please help me to resolve this issue.

    Regards,

    Divya

  • Hello Divya!

    I see.

    So these print commands, along with just basic information like "Zephyr starting up" should get printed on the COM port. To read that you need a serial terminal, eg. the one you get with the VSC extention, or something like Putty. Are you using any of those? And if so, are you finding the COM port that is used by the Thingy:53?

    Regards,

    Elfving

  • Hello Elfving, 

    I have tried the serial monitor terminal provided by the VSC extension and also the COM port connection.

    But now there is another issue I am facing right now when I tried to build and flash the Thingy again using JLink programmer. 

    It is showing an error like:

    FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE' --build 'c:\Users\DIVYA\ncs\samples\bluetooth\peripheral_lbs\build'

    Initially, I updated the firmware for the peripheral lbs code using a nRF programmer. However, I am currently attempting to update the code using the build and flash feature of the VSC, but I am unable to do so since the problem indicated above is appearing.

    Can you please help me now to resolve the issue?

    Thank you in advance.

    Regards,

    Divya

     

      

  • Hi!

    Divya_uni_ulm said:

    FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE' --build 'c:\Users\DIVYA\ncs\samples\bluetooth\peripheral_lbs\build'

    Is there any more to this error message besides this?

    And is this the first time you've used the VSC for flashing the Thingy? And are you able to simply build the project in VSC? It seems to be complaining about the building.

    Regards,

    Elfving

Reply
  • Hi!

    Divya_uni_ulm said:

    FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE' --build 'c:\Users\DIVYA\ncs\samples\bluetooth\peripheral_lbs\build'

    Is there any more to this error message besides this?

    And is this the first time you've used the VSC for flashing the Thingy? And are you able to simply build the project in VSC? It seems to be complaining about the building.

    Regards,

    Elfving

Children
  • Hello Elfving,

    No there is no other error.

    1. For the first time I programmed the Thingy with the sample code for peripheral_LBS provided in the “2022-08-03-precompiled-application-firmware”.
    2. And this time sample code worked perfectly and provide the desired output.
    3. But next time when I tried to build the Thingy with the sample code provided in the https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/peripheral_lbs
    4. Using the build with Thingy Board

     

     

    And then when I tried to flash the Thingy then the code has been programmed but then my phone is not able to connect with Thingy and also I am not able to monitor the output and print messages:

     

     

    So, in conclusion, what I have understood so far is that if I am flashing the code using the sample code provided in precompiled-application-firmware then only Thingy is responding correctly but when I am trying to upload the sample code from https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/peripheral_lbs then it is not working correctly and monitoring the output as desired.

    I am a bit confused now, what is the correct method to program Thingy with the sample code then?

    Maybe I am missing some steps here. Please correct me and guide me what is the correct method to resolve this issue. It seems like.

     Regards,

    Divya

  • Hi,

    Divya_uni_ulm said:
    No, I do not have DK, is it a compulsion to use DK?

    You can for instance take a look here on the documentation page on working with the DK. It mentions getting a debugger, and that is what I'd recommend.

    By using a DK you would have an easier time flashing it, and debugging it. Note that the documentation does not mention how to go ahead by not using one.

    Divya_uni_ulm said:

    So, in conclusion, what I have understood so far is that if I am flashing the code using the sample code provided in precompiled-application-firmware then only Thingy is responding correctly but when I am trying to upload the sample code from https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bluetooth/peripheral_lbs then it is not working correctly and monitoring the output as desired.

    I believe the difference is that the nRF Connect Programmer can program using MCUBoot, which comes preinstalled on the Thingy (essentially doing a DFU). If you for instance find that you are able to flash using VSC then I assume the newer versions of the VSC extension allows for that as well.

    How are you seeing that the building and flashing is successful?

    Regards,

    Elfving

  • Hello Elfving,

    So, in my project right now I am able to build and program on Thingy using J-Link debugger but there is still some issues I am facing after flashing:

    For Peripheral_LBS sample

    1. Whenever I am trying to connect my phone with Thingy, and then when I am pressing the button on Thingy then in the phone and in the nRF connect app, the log section is not showing the messages “Button pressed” or “Button Released”.
    2. Also, after flashing the code in Thingy through VSC, the LED is not blinking. So is it normal behavior?
    3. To verify if the code that I am building is flashing or not I have done a very small change, in the source file ”main.c” code I have changed the printk(“Connected\n”) message with a the below print message:

    And then tried to build the code again and tried to check the behavior on phone over a Bluetooth connection but it is still showing a “connected”, message on phone rather than showing “Connected testing”.

    It seems like the I code I am building has not flashed into the microcontroller.

    1. Is the main.c file is not responsible for the message on phone and on serial port?

     

    Regards,

    Divya

Related