Sorry if this question is too fundamental but I amnot as experienced with C programming and Linux as much as I would like to be. I do catch on quickly however. I downloaded the files, compiled and installed them successfully. All I need now is to actually run the program but I cannot find any documentation on what to do next. I tried to run lcdoctl and had a linked library issue that I resolved (ldconfig) but I am still having problems.
There does not seem to be any detailed instruction on how to get the program running. I do realize that everything is now in the one package (4.0).
Any assistance would be appreciated on what I need to do to get my Dacal300 back online and working with my Ubuntu system.
Neal,
Sounds like you're almost there. You can start the daemon (cdorganizerd) with the '-h' or '--help' parameter to give you some idea of what parameters are available. Man pages are also installed - try "man cdorganizerd" and "man lcdoctl", although if you had to reconfigure ldconfig to get it running, the man pages may not have installed to the system.
At a high level, the concept is that the daemon controls the organizer and runs in the background, and you can use lcdoctl to talk to the daemon to ask it to control your organizer. Whenever you send a command to the daemon to control the organizer, you need to tell it which organizer you want to control (with the '-d' parameter via lcdoctl). Some commands do not require this parameter (e.g., list all organizers). Hopefully this will get you started...
Hi
Thanks for that info
Daemon was started ok but when I try to list devices, I get the following:
"/home/neal/Downloads/libcdorganizer/src/lib/cdorganizer_controller.c:cdo_controller_init_local(48)
- connect: No such file or directory
Failed to connect to a local socket at /tmp/cdorganizerd"
Now, I know my Dacal was recognized at boot up and is listed during the
boot but it seems to me that the Daemon is not seeing it. Am I
interpreting this error correctly? Any suggestions?
Also, when I go to the tmp directory, there is no cdorganizerd.
Sorry if I should recognize the issue from the error stated but I do not.
Neal
On 2018-08-17 10:37 PM, KShots wrote:
Related
Support Requests: #2
Hi KShots
Just got back to trying to work on getting my Dacal 300 working on Ubuntu.
My Dacal does not get listed (nor does any other device) when I try to list libraries (ldoctl list),
Also, when I try to do any commands using my library's ID (04b4:5a9b) I get failure to connect issues.
E.G. when I tried lcdoctl vendor 04b4:5a9b, I get /home/neal/Downloads/libcdorganizer/src/lib/cdorganizer_controller.c:cdo_controller_init_local(48) - connect: No such file or directory
Failed to connect to a local socket at /tmp/cdorganizerd
When I tried lcdoctl -d 04b4:5a9b eject slot 1, I get /home/neal/Downloads/libcdorganizer/src/utility/main.c:main(386) - Connection closed prematurely
How do I get a socket created at this location. It was not created at the time of my install, I checked? I suspect, if it an be properly created, I may be good to go?
Hi KShots
Sorry, on further investigation and reading your file, I do see a /tmp/organizerd sock file get created but once I execute the lcdoctl command and it fails, it disappears.
Still do not see my Dacal on the list though.
sudo lcdoctl list
Daemon reports the following device IDs:
Any suggestions. It does get reconginzed om boot and lsusb shows it:
lsusb (excerpt)
Bus 001 Device 009: ID 04b4:5a9b Cypress Semiconductor Corp. Dacal CD/DVD Library D-101/DC-300/DC-016RW
Bus 001 Device 007: ID 04b4:5203 Cypress Semiconductor Corp.
lcdoctl -d 04b4:5a9b eject slot 1
/home/neal/Downloads/libcdorganizer/src/lib/cdorganizer_controller.c:cdo_controller_init_local(48) - connect: No such file or directory
Failed to connect to a local socket at /tmp/cdorganizerd
Neal,
Let's dig into this a bit...
Let's start with that...
I did start the daemon with "sudo cdorganizerd" (just in case I needed
supervisor authority to start it correctly. That should give me
authority I believe. Also aince I am the only person on this system, I
have read/write control I would think, but if not, what should I check
to verify?
How do I start it in the foreground (sorry for the stupid question)? I
thought entering it in terminal mode after the system starts does that?
I did not create any auto daemon startup on boot yet.
When I start it from Terminal, I get the following (no return message,
which I am guessing is no error?):
sudo cdorganizerd
[sudo] password for neal:
neal@Lith-Serv:~$
On 2018-08-24 01:27 PM, KShots wrote:
Related
Support Requests: #2
I did start the daemon with "sudo cdorganizerd" (just in case I needed supervisor authority to start it correctly. That should give me authority I believe). Also since I am the only person on this system, I have read/write control I would think, but if not, what should I check to verify?
How do I start it in the foreground (sorry for the stupid question)? I thought entering it in terminal mode after the system starts does that? I did not create any auto daemon startup on boot yet.
When I start it from Terminal, I get the following (no return message, which I am guessing is no error?):
sudo cdorganizerd
[sudo] password for neal:
neal@Lith-Serv:~$
Ok, I figured out how to run it in foreground.
I got the following:
sudo cdorganizerd -f
[sudo] password for neal:
cdorganizerd[11653]: /home/neal/Downloads/libcdorganizer/src/daemon/plugin_manager.c:plugin_loader(27) - lt_dlopen(/usr/lib/libcdorganizer/dacal): file not found
cdorganizerd[11653]: The KDS plugin is only capable of running a single device at a time as a unique id has not yet been deciphered from the USB traffic
cdorganizerd[11653]: /home/neal/Downloads/libcdorganizer/src/daemon/plugin_manager.c:plugin_loader(27) - lt_dlopen(/usr/lib/libcdorganizer/kds): file not found
cdorganizerd[11653]: Creating local socket: /tmp/cdorganizerd
cdorganizerd[11653]: /home/neal/Downloads/libcdorganizer/src/daemon/main.c:init_local_socket(172) - bind: Address already in use
Looks like it's aborting because something else is already bound to the socket. Check to see if it's already running, and if not, delete the socket (it's stale) and try again. If it is running, kill it and run it again in the foreground
Neal,
Pass the daemon a '-f' parameter to run in the foreground, so you do the following:
You can also run it with '-h' to show what other knobs you can tweak.
Killed all cdorganizerd processes. There was no /tmp/cdorganizerd when I looked.
Ran cdorganizerd in foreground as follows:
neal@Lith-Serv:~$ sudo cdorganizerd -f
cdorganizerd[12988]: /home/neal/Downloads/libcdorganizer/src/daemon/plugin_manager.c:plugin_loader(27) - lt_dlopen(/usr/lib/libcdorganizer/dacal): file not found
cdorganizerd[12988]: The KDS plugin is only capable of running a single device at a time as a unique id has not yet been deciphered from the USB traffic
cdorganizerd[12988]: /home/neal/Downloads/libcdorganizer/src/daemon/plugin_manager.c:plugin_loader(27) - lt_dlopen(/usr/lib/libcdorganizer/kds): file not found
cdorganizerd[12988]: Creating local socket: /tmp/cdorganizerd
cdorganizerd[12988]: Local socket '/tmp/cdorganizerd' created as 4
cdorganizerd[12988]: Entering server loop
I opened another terminal session and ran the following (since the first terminal window was in a loop).
neal@Lith-Serv:~$ lcdoctl list all
organizerd[12988]: Creating local socket: /tmp/cdorganizerd
cdorganizerd[12988]: Local socket '/tmp/cdorganizerd' created as 4
cdorganizerd[12988]: Entering server loop
cdorganizerd[12988]: Accepted a connection on 6 from a local client
cdorganizerd[12988]: Received a message from a local client on 6
cdorganizerd[12988]: handling list organizers request
cdorganizerd[12988]: Sending a message to a local client on 6
cdorganizerd[12988]: Received a message from a local client on 6
cdorganizerd[12988]: Connection closed
Sorry, let me clarify, ran lcdoctl list all in the second terminal and got no devices found
Last edit: Neal Logan 2018-08-24
Ok, the traffic on the daemon looks appropriate... did the client not return anything useful?
Sorry. got called away.
Returned absolutely nothing
neal@Lith-Serv:~$ lcdoctl list all
Daemon reports the following device IDs:
(blank)
Last edit: Neal Logan 2018-08-25
Also, just to confirm, you're using the latest released version, right? From your lsusb output, it showed you might have a Dacal 016RW, which wasn't supported until recently. I'd even go so far as to say that after some recent back-and-forth with another recent user, that I'd recommend using the latest version from the svn for the DC-016RW.
Can you try the svn version?
Last edit: KShots 2018-08-25
Nope, it is a Dacal 300
Model on the box says DC-300
This is new for me, so what is the SVN version? Or, I should ask, where is the latest SVN version?
Also this unit does not have a built in media player
Last edit: Neal Logan 2018-08-25
Only other thing I can think of is if it's not loading the dacal plugin. It looks for the vendor ID 04B4 and product ID 5A9B to find the organizer, and if the plugin finds it the daemon outputs the string "Found a device for the dacal plugin at (some address)". Can you find where your plugin was installed (should be 'dacal.so') and tell the daemon where to find it via the '-P' option?
If you don't have a DC-016RW, the svn version shouldn't make much of a difference... it has a bit more tolerance for misusing the '-d' parameter, but otherwise should be the same as what was released.
Last edit: KShots 2018-08-25
I did as you requested as follows:
neal@Lith-Serv:~$ sudo cdorganizerd -P /usr/lib/libcdorganizer/ -f
cdorganizerd[15575]: /home/neal/Downloads/libcdorganizer/src/daemon/plugin_manager.c:plugin_loader(27) - lt_dlopen(/usr/lib/libcdorganizer/dacal): file not found
cdorganizerd[15575]: The KDS plugin is only capable of running a single device at a time as a unique id has not yet been deciphered from the USB traffic
cdorganizerd[15575]: /home/neal/Downloads/libcdorganizer/src/daemon/plugin_manager.c:plugin_loader(27) - lt_dlopen(/usr/lib/libcdorganizer/kds): file not found
cdorganizerd[15575]: Creating local socket: /tmp/cdorganizerd
cdorganizerd[15575]: Local socket '/tmp/cdorganizerd' created as 4
cdorganizerd[15575]: Entering server loop
The first lines (highlighted) after the command are complaining about not finding the files "dacal" and in a following line, not finding "kds" (complaint by plugin manager). Both files (with .so extensions) are there. Should it be actually looking for dacal.so and kds.so or is that implied? If I need to change these entries to add the .so extension, how can I do that?
Neal,
The daemon searches the plugin directory and tries to load each file there. I've been puzzled why it puts out those "file not found" messages, but libtool appears to try both with and without a '.so' extension (and fails without the extension, but succeeds with it). From the output, it is successfully loading the KDS plugin (despite the message) because the notification about the KDS plugin capabilities is from the KDS plugin.
So... if it's loading the plugin successfully, it will poll the USB bus for vendor ID 04B4 and product ID 5A9B... and according to your lsusb output, it should find that... unless sudo somehow doesn't have access to it (I cannot image why it wouldn't, but this has me scratching my head). To eliminate that possibility, can you try running as root?
Maybe it fails to load the "dacal" and "kds" files (ergo file load error) but loads the .so versions ok
Tried it as Root, no success. same result.
Last edit: Neal Logan 2018-08-25
Ok, so we'll say that's not a possibility. Let's make 100% sure it's loading the plugin. Use 'strace' to run the daemon. It will put out a TONNE of data, be warned. Look for any lines involving 'dacal.so', and more specifically, make sure that one such line returns "0" (success).
... if it's truly loading the plugin and not finding the organizer, I'm not sure what else to do at this point. If you know any C, I'd recommend running the dacal.c constructor code through a debugger (set a breakpoint in the constructor code and run the daemon through a debugger (as root)) and see where it decides that you don't have a DC-300. It should complain if it can't parse the USB bus for any reason, and I didn't see any of that in your output.
Also, another thought occurred to me... any chance you are using the plugins from a previous release? I'm not sure I can predict what behavior that would have, but that would at least be simple to resolve. Among other things, I changed how the device scanning worked between 3.x and 4.x, so the plugins do their scanning the moment the plugin is loaded rather than waiting for a call to an init function (and conversely shut down properly when closed rather than waiting for a destroy function). So... if the daemon never calls init, the older plugin shouldn't find any devices. The simple solution is to install the 4.x plugins in this case.
To respond to your version question, it was all expanded from "libcdorganizer-src-4.0.0.tar.bz2". If the wrong version is in there, then that is a possiblity.
Last edit: Neal Logan 2018-08-25
No, if you never had a previous version installed, that shouldn't be a possibility :(
I did the trace and there does seem to be some problems. "dacal.so" returns a code of 3 and it seems to be looking for file "dacal.la" which returns a code of -1 (file not found).
But, even before then, two files seem to be missing:
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
From what I read, ld.so files are not issues, just glibc checking to see if the files are there as a standard routine.
I have attached the strace to this post
Actually, after looking up return code for openat, it seems 3 is not a return code but is described as the following:
"Upon successful completion, the function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor. Otherwise, -1 shall be returned and errno set to indicate the error. No files shall be created or modified if the function returns -1. "
Last edit: Neal Logan 2018-08-25