[SOLVED] V2 configuration

Topics related to the Lighthouse positioning system, configuration and use
Post Reply
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

[SOLVED] V2 configuration

Post by sAz »

Hi everybody,

I am trying to set up the V2 system. To do this, I am using my pc whith ubutu 18.04.

I followed the video tutorial on https://www.bitcraze.io/category/lighthouse/ and the tutorial on https://www.bitcraze.io/documentation/t ... ighthouse/. On my screen it looks a bit different when I try to set the channels:
S.png
and when I click set channels it looks like the following:
S2.png
. As you can see I don't get the success message, and the current channel and ID remain empty.

Is there something I missed?

I still tried to continue and work with flying drones, although I was not sure if the channels are set. The drones could fly, and the colors under receiving, calibration, geometry and estimator are green (lighthouse positioning tab). However, under receiving and estimator the colors change from green to yellow and then green again, roughly every 5 seconds (the yellow color remains for less than 1 sec.). I can also see the colors change on the lighthousedeck.

This occurs only when I use the V2 basestaions. When I use the V1 basestations, everything works fine and the colors remain green.

Any ideas on how to solve this problem?
Last edited by sAz on Mon May 10, 2021 9:16 am, edited 1 time in total.
germanshepherd
Beginner
Posts: 6
Joined: Thu Mar 25, 2021 7:22 pm

Re: V2 configuration

Post by germanshepherd »

I had the same problem,
and guess what? It was a connecting problem of the usb plug.
Moving and shaking I established a connection, changed the channel and the V2 is running.
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: V2 configuration

Post by kristoffer »

Hi!

First question is if you clicked the "Scan base station" button?
My guess is that you did as it found a port (/dev/ttyACM0 in your case).

What is missing though is the current channel and id that should have been filled in when the base station was scanned.

I don't know exactly what the problem is but let's try to figure it out.

Behind the scenes we are connecting to the base station as a serial port terminal and are issuing commands and parsing output. Since everything is reverse engineered, we don't really know that all base station firmware versions behave in the same way, so it is possible that your base station is doing something we don't expect.

It would be of great help if you could connect to the base station in a terminal window and see what it looks like for your base station. Use a terminal program like

Code: Select all

picocom
or

Code: Select all

screen
(you might have to install one of them) and connect to the device indicated in the python client. In a terminal window do something like this:

Code: Select all

picocom /dev/ttyACM0
When connected, hitting the the TAB key should give you a listing of all commands. Please post the list of commands here to let us know what it looks like. Thanks!

The commands we use to configure the base station is

Code: Select all

mode
to get/set the channel and

Code: Select all

id
to get the id.
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

Re: V2 configuration

Post by sAz »

Hi, yes I scanned, without scanning it looks as the following
unscnd.png
Here the screenshots of the terminal for one of the V2 basestations:

First running picocom:
picocom.png
Then hitting the tab:
tab.png
Afterwards inserting the command id looks like this:
tab_id.png
Finally inserting mode:
tab_mode.png
Now, I assume that the channel is set to be 2 and the id is DEFAULT, just like in the documentation, correct?

Do I have to insert an option to change the channel? (for example mode 1 would change the channel to 1?)

Thanks!
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: V2 configuration

Post by kristoffer »

Great dumps, exactly what I was hoping for. Thanks!

Unfortunately it looks very much like what I get on my base station so I don't know why it does not work on your setup.

I tested on a base station with the exact same FW as your base station and it works, so that does not seem to be the problem. Could it be related to pyserial, which version do you have?

If you are interested in looking into the problem your self, you will find the code here https://github.com/bitcraze/crazyflie-c ... _dialog.py It is pretty straight forward.



To set the channel manually all you have to do is

Code: Select all

mode 2
param save
One of the base stations should use mode 1 and the other mode 2.
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

Re: V2 configuration

Post by sAz »

My pyserial version is 3.5.

I will also look for it myself. Does it matter on which operating system I test? (I have ubuntu 18.04)

Ok I see, so the channels have to be different. And what if I want to use 4 basestations? Do I have to set the channels to 1-4?

By the way I tested with:

-Python3.8 and Python3.6
-Newest cfclient
-Newest cflib
- Ubuntu 18.04
-Pyserial 3.5
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: V2 configuration

Post by kristoffer »

I think the problem might be that your uses needs to be a member of the dialout grouop to access the serial port

Code: Select all

sudo adduser $USER dialout
We have documented this for the LPS Tools (https://github.com/bitcraze/lps-tools/b ... t-on-linux) that also uses the serial port, but it seems to be missing for the client. I'll add it.
sAz
Beginner
Posts: 27
Joined: Wed Jun 10, 2020 5:35 pm

Re: V2 configuration

Post by sAz »

Yes, that solved the problem (Note that the ID is not DEFAULT, I think it is the serial number).
success.png
I had to add my user to the dialout group.

Thanks!
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: [SOLVED] V2 configuration

Post by kristoffer »

Great!

Yes, the ID is a unique ID for each base station
Post Reply