SerialPort problem
|
|
---|---|
Hi all, I want to implement a simple communication between TANGO and microcontroller over a serial port. MCU is programmed in a way that whenever character 's' is received from UART, it will send some data. I defined SerialLine as DeviceProperty, and named it /dev/ttyUSB0: Then, I wrote few lines of code(lines with red dots on the left): But, when I want to run Device Server, error is displayed in the terminal. Can you help me to resolve the problem? Dusan |
|
|
---|---|
|
Looks like the user with which you launch your device server does not have permission to access /dev/ttyUSB0 If you do the following from python command line you should have the same problem. It seems it has nothing to do with tango:
Can you send the result of doing:
Sometimes it is enough to add the proper unix group to the unix user you are using to start the server. |
|
|
---|---|
Hi, It looks like your device server is restarted automatically during computer startup. I guess you configured the Starter to run it automatically at startup. If you launch astor, you should be able to see the device servers running on your host. If your device server is listed under a given startup level, this means the Starter will automatically start up your device server as soon as the Starter device server is started. If you don't want this behaviour, from astor, you should double click on the node having your computer name, then right-click on your device server and select "Set Startup Level". Then you should select "Controlled by Astor: No". Please note that you can start and stop easily your device servers from astor from the right-click menu. Hoping this helps, 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, At the moment, I have this. Device Server LedSensor won't start running. It doesn't show any mistakes neither. Is marked code from my first post OK? And about Astro, why I don't see TangoTest in it, even though TangoTest is running? Is it something wrong with my configuration? |
|
|
---|---|
On Astor, you need to double-click on "rilevostro" (or right-click -> Open control panel). Then you should see it. If you don't see it, double-click on "Not Controlled" on this panel to see the device servers not managed by the Starter.
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. |
|
|
---|---|
Thank you. Do you have any idea about my second problem? |
|
|
---|---|
Do you mean the problem with your serial port? Do you still get the same error message after having modified the permissions on /dev/ttyUSB0?
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. |
|
|
---|---|
It's just standing like this, I dont get Ready to accept request. I generated file with Pogo, and added those few lines from the first post. Only I can think of is that code isn't written well. Do you see any mistake? P.S. This is situation after modyfing permissions. |
|
|
---|---|
Do you have the same error when you try to start TangoTest device server from the command line?
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. |
|
|
---|---|
This reminds me a problem we had when testing Debian 9 packages. This error was due to permission problems on mysql.proc table where some stored procedures used by Tango are defined. Some of the stored procedures are doing a SELECT on mysql.proc and in some cases, the MySQL user used by the Database server didn't have the permission to execute this select statement. The file which creates the stored procedures was updated to modify this stored procedure so it should now be possible to do an equivalent select without having to grant select on mysql.proc to this user: https://sourceforge.net/p/tango-cs/code/30500/ This change should be available in Tango 9.2.5a. How did you install Tango? What version are you using?
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. |