Ble Nano 2 don't work


#1

Hi , I’m a new to the Zheryth
I try to develop on my ReadBear BLE Nano 2 following this steps
https://docs.zerynth.com/latest/official/board.zerynth.redbear_nano2/docs/index.html

In particular those:

  • Select the Nano 2 on the Device Management Toolbar;
  • Register the device by clicking the “Z” button from the Zerynth Studio;
  • Create a Virtual Machine for the device by clicking the “Z” button for the second time;
  • Virtualize the device by clicking the “Z” button for the third time.
But when I connect my nano 2 on the top the board is known as Blend 2




after 5 minutes I receive this output

C:\Users\FParigi\zerynth2\tmp\tmpx0a_3u41\tmp.bin -> D:\redbear.bin
1 File(s) copied
[error] Can’t find chipid

Can you help me?
thanks
Fabio

#2

Hi Fabio,

The RedBear Nano 2 and the RedBear Blend 2 are indistinguishable when you plug into your machine; so you have to disambiguate saying to the Zerynth Studio which device you plugged in.

If an error during the disambiguate phase occurs, you can delete the wrong choice by clicking the orange “Forget” button inside the “Device Info” window (‘i’ icon button on the right of the device management toolbar); after few seconds Zerynth Studio will ask you to disambiguate the device and you can select the RedBear Nano 2 instead of the RedBear Blend 2 and try again the registration phase.

Hope this can help you :slight_smile:


#3

Dear Matteo

I have tryed to follow your suggestion.
So In the Device Info panel I press Forget.
I re insert in USB the Ble nano
I select the Nano 2
And when I press the Z icon (how is described in the second step)
I have this




after 2 minutes I receive this red error

1 File(s) copied
[error] Can’t find chipid

What I’m wrong?
thanks
Fabio

#4

Hi Fabio,
In which Windows version are you working?

It seems that your problem is similar to the issue reported on this thread.
Take a look and let me know if you succeed to fix it.


#5

No not the same I’m on Windows 10


#6

mmm…it’s very weird…Windows 10 doesn’t need any drivers.

have you tried to update the DAP Link firmware to the latest release? (link)


#7

Dear Matteo
updated an now the virtualization work



I don’t know the real meaning but I have chosed a BLE Virtualization, So noy I import the blink test, I press the arrow icon for compile and send and a pop up with
"Please reset the device" appear.
I remove the BLE nano 2 , I reattach…but the led don’t blink?

What I’m wrong
thanks
Fabio


#8

Dear Matteo

I follow some steps I found in this tutorial https://www.youtube.com/watch?v=64NhTBzJPCQ
there is a step you don’t inser in your step list (I hope it’s correct) 

Open target drop down, choose “Choose virtual device” select Nano 2

So after this the system compile And I think upload the code.

Immediatly “Please reset the device” appear I press the lateral button on the dongle

And I receive thi output:

[info] Searching for device a5a4621afdb2444704fe09b8a5e79cbc273f6971 again
[info] Got header: 
[info] Probe sent
[info] Got header: r2.0.5 vdjeLUPzQGSy6D0JSVJ0Mw redbear_nano2 a8e651c7ddd3ed20 ZERYNTH
[info] Found VM vdjeLUPzQGSy6D0JSVJ0Mw for redbear_nano2
[info] Handshake
[info]     symbols: 182
[info]     membase  @20003E30
[info]     romstart @00035000
[info]     flash    @0004B000
[info] Erasing flash
[info] Sending Bytecode: 4884 bytes ( available 307200 )
[info] Uplink done
<div class="Spoiler "><br><b>I think the code is uploaded, but the led don't blink</b><br><br>this is my code<br><pre class="CodeBlock"># Initialize the digital pins where the LEDs are connected as output<br>led_1 = D2<br>pinMode(led_1, OUTPUT)<br># Define the 'blink' function to be used by the threads<br>def blink(pin,timeON=1000,timeOFF=1000): # timeON and timeOFF are optional parameters, used as default<br>&nbsp; &nbsp;while True:<br>&nbsp; &nbsp; &nbsp; &nbsp;digitalWrite(pin,HIGH) &nbsp; # turn the LED ON by making the voltage HIGH<br>&nbsp; &nbsp; &nbsp; &nbsp;sleep(timeON) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# wait for timeON<br>&nbsp; &nbsp; &nbsp; &nbsp;digitalWrite(pin,LOW) &nbsp; &nbsp;# turn the LED OFF by making the voltage LOW<br>&nbsp; &nbsp; &nbsp; &nbsp;sleep(timeOFF) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # wait for timeOFF<br># Create threads that execute instances of the 'blink' function.<br>thread(blink,led_1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # led_1 is ON for 100 ms and OFF for 100 ms, the default values of timeON an timeOFF
<p><br></p>

#9

[SOLVED]
YOUR DOC IS WRONG
https://www.zerynth.com/blog/programming-redbearlab-ble-nano2-and-blend2-in-python-with-zerynth/

led_1 = D11
NOT
led_1 = D2

Now Work

I’m interested to test a interaction with a ble application, do you have some sample I can use with BLE Nano 2

thanks a lot for your support
Fabio


#10

Hi Fabio,

The choice of the virtual machine with or without the “BLE Enabled” feature regards the possibility to have a smaller vm (without the BLE enabled) for application that doesn’t need the bluetooth.

If you want to test the RedBear Nano 2 and Bluetooth interaction you have to choose the vm with the BLE Enabled otherwise it never works.

Here you can find the documentation for the Nordic NRF52832 BLE Library with an example code and in this link you can find a  BLE monitor app to interact with this example.