No IOR found in database for "esrf/serial/21"

Hello,
I'm starting the implementation of TANGO in my working environment. My first goal is to establish a communication with an Arduino to display temperature readings on the screen. I've been following the tutorial available in https://tango-controls.readthedocs.io/en/latest/_downloads/231fded20c5d81aa5eb78921bda54fdd/doctpv2.pdf. I managed to create the device server Serial/lap21 with the Serial class and the esrf/serial/21 device. The problem starts when I click on the device esrf/serial/21 in JIVE to show its Device Info and Polling Status. In the tutorial, it shows the device port number and other information as in Figure 1.

Figure 1:
TANGO-UBUNTU - Erro no JIVE.png

In my case, it shows the following error: “No IOR found in database for esrf/serial/21 (Maybe, the device has never been exported…)”, as shown in Figure 2.

Figure 2:
TANGO-UBUNTU - Erro no JIVE(tutorial).png
My questions are:
1) Do I have to export the device? How do I do that?
2) The tutorial mentions a C++ executable called “Serial”. Do I have to generate it? How would I do that?
3) There may be some differences between the most recent stable version of Tango and the version used in the tutorial. I downloaded Tango from SourceForge recently and I have JIVE 7.1.0 and POGO 9.3.4 running on Ubuntu 18.04. The tutorial uses JIVE 5.6 and POGO 8.4.6. Does this difference between versions affect the tutorial I’m following?
Thanks in advance for your attention!"
FabioFreiJedi
My questions are:
1) Do I have to export the device? How do I do that?

Hi,

To export the device, you need to start up the corresponding device server (Serial/lap21) on the host where is connected the serial line you'd like to control.
Execute the Serial device server executable, passing the instance name "lap21" as parameter.
You'll need to ensure your TANGO_HOST environment variable is set to PenasSI-15R:10000 before starting the device server.

FabioFreiJedi
2) The tutorial mentions a C++ executable called “Serial”. Do I have to generate it? How would I do that?

Yes, you'll need this executable. I don't know whether this is this Serial tango class, but you can find one here: https://gitlab.com/tango-controls/device-servers/DeviceClasses/communication/SerialLine
FabioFreiJedi
3) There may be some differences between the most recent stable version of Tango and the version used in the tutorial. I downloaded Tango from SourceForge recently and I have JIVE 7.1.0 and POGO 9.3.4 running on Ubuntu 18.04. The tutorial uses JIVE 5.6 and POGO 8.4.6. Does this difference between versions affect the tutorial I’m following?

There might be some small differences in the appearance but I think all the main features described in this tutorial didn't change in the recent versions of jive and Pogo.

Hoping this helps a bit,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi Reinaldo, thank you very much for the answers. Sorry for the delay in getting back. Unfortunately I still have doubts about the initial steps. The TANGO_HOST environment variable is set to FeathersSI15R:10000. TANGO works when I run the './TangoTest Test'.

The next step, exporting the device, which I started not to understand. The tutorial initially proceeds by creating the 'TemperatureSensor.py' file in POGO. It then asks to create a server in JIVE, naming the server 'Serial/lap21', the Class 'Serial' and the device 'esfr/serial/21'. I even tried naming the device in other ways like: 'LAB/Arduino/1' for example. Same for Server and Class.

I believe this 'TemperatureSensor.py' file should be run first. But it's not clear how should I start the device server after creating it in JIVE.

I tried to run './TemperatureSensor.py lap21', having this file as the continuation point of the tutorial. And I also tried running the 'Serial' file given in the link you share, but to no avail. I think something is missing.

This tutorial was not the first I tried to study. Here's another tutorial made available by the community, with the same purpose of controlling an Arduino, to collect temperature data. Here is the link: 'https://tango-controls.readthedocs.io/en/latest/tutorials-and-howtos/tutorials/tango-device-server_arduino-temperature-sensor.html'. In this other tutorial, two files are created in POGO, but I'm having the same problem.

If it is not possible to clarify more I will understand. If not, I will try to study the TANGO documentation a little more. Grateful!
FabioFreiJedi
I believe this 'TemperatureSensor.py' file should be run first. But it's not clear how should I start the device server after creating it in JIVE.

If I understand the first tutorial well, the TemperatureSensor Tango class needs to talk to a Serial Tango device to communicate with the hardware via a serial line, so I would start the Serial device server first. You will need to declare/define a Serial device server instance in the Tango database and a Serial Tango device associated to this device server instance. In the tutorial the Serial device server instance is named Serial/lap21 and the associated Serial device is named esrf/serial/21 (of course, you can choose the name you like but don't change the device server name (Serial in Serial/lap21) or the name of the class of the device (Serial)).
You need to compile the Serial Tango device server. I have the feeling you didn't manage to do that?
Then you will need to execute "Serial lap21" to start the Serial device server which will help you to communicate on a serial line. You'll need to configure its device properties according to the configuration of the serial line you want to use (baudrate, serialline, …).
Then you'll need to declare/define a TemperatureSensor/lap21 device server instance in the Tango database, with a device named esrf/temperature/21 (you can choose another device name). You'll then need to add a device property named SerialLine with jive for the device esrf/temperature/21 (the device you just defined in the Tango database).
The value of this property must be the name of your Serial Tango device you declared above (esrf/serial/21 in the tutorial).

You can start the TemperatureSensor python device server by executing "python3 TemperatureSensor.py lap21".

FabioFreiJedi
I tried to run './TemperatureSensor.py lap21', having this file as the continuation point of the tutorial. And I also tried running the 'Serial' file given in the link you share, but to no avail. I think something is missing.

What do you mean with "I also tried running the 'Serial' file given in the link you share, but to no avail" ?
Did you manage to compile the Serial C++ device server on your system to get a binary executable you can run?
I guess you missed that point.
My usual advice when trying to reuse/compile a Tango device server used in another institute is to regenerate its Makefile or CMakeLists.txt with Pogo.
So you basically run "Pogo Serial.xmi" in the directory when Serial.xmi is located and then I click on "File Menu -> Generate" and you check the Makefile or/and the CMakeLists.txt checkbox, and then OK.
This will regenerate a Makefile/CMakeLists.txt compatible with your Tango installation.
Then you can execute directly "make" if you regenerated the Makefile or execute the following commands if you want to use CMake:
mkdir build
cd build
cmake ..
make


Hoping this helps a bit.
Reynald.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Edited 4 weeks ago
Hi, I was able to move forward with your tips. I wasn't sure how to compile 'Serial.cpp'. I followed the following steps:

First I downloaded and unzipped the SerialLine package from the given link;
I regenerated the Serial by running 'Pogo Serial.xmi';
I generated the package with the 'Makefile' checkbox checked;
So I ran 'make';

In this step I had to keep the code files checkbox checked because compiling without the files was giving an error.

After that I was in doubt when trying to run 'g++ -I. -I/usr/local/tango/include/tango/ Serial.cpp -o Serial', as an attempt to compile 'Serial.cpp'. Because when trying to compile it gave an error in the inclusions present in the code, such as tango.h, Serial.h and SerialClass.h. Then I saw that make itself presents the command at the end to be executed:

g++ ./obj/Serial.o ./obj/SerialClass.o ./obj/SerialStateMachine.o ./obj/ClassFactory.o ./obj/main.o -ltango -lomniDynamic4 -lCOS4 -lomniORB4 -lomnithread -llog4tango -lzmq -ldl -lpthread -lstdc++ -o /home/fabiofreijedi/DeviceServers/Serial

With that I was able to compile the Serial.cpp file without errors.

Following your guidelines:

I ran './Serial lap21' which made the server recognized in jive.
And then I ran 'python3 TemperatureSensor.py lap21' which didn't return any message. However, the 'Serial lap21' server, in a short time, stops working giving the following error:

Ready to accept order
Segmentation fault (main image recorded)

Here are the main images of this sequence I took:
Hi Fabio,

some advices:

- you are using a VM (tangobox). Make sure USB serial port are available in the VM (host system and VM can compete to register the serial port, you have to configure filters in virtualbox setting / USB)
check in VM with lsusb if serial uart appears and if /dev/ttyUSB? or /dev/ttyACM0 exist.
- before using TANGO device server try to access the remote device using standard terminal (screen or gtkterm) as shown slide 10

hope it helps,
Hi Rap, thanks for the tip.
I even explored tangobox as an option for this tutorial. But I remember there were some errors that led me to install Tango on Ubuntu 18.04 which is running on my computer. I managed to do the initial tests of Tango, indicating that everything is ok. As for device connectivity, I verified that it is in the /dev/ttyACM0 directory and that it is reporting the temperature value when accessed by the terminal.
 
Register or login to create to post a reply.