Contol Leica DMI6000B using MM on Linux

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Contol Leica DMI6000B using MM on Linux

Siham
Hi all,

I work in a lab where we want to move our machines to Linux and control our Leica DMI6000B microscope with MM. But before we do this, I would like to know if this is possible, since the Leica driver is not supported in Linux.

I found some information on this web page: https://micro-manager.org/wiki/LeicaDMI
So, to be able to control the Leica Microscope with MM on Linux, I may need the Leica DMI adapter ! Can anyone tell me please, what is it exactly? And how can I get this?

Thank you in advance,

Siham.
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Brian Teague
On 05/26/2014 06:16 AM, s_hachi wrote:
> I work in a lab where we want to move our machines to Linux and control our
> Leica DMI6000B microscope with MM. But before we do this, I would like to
> know if this is possible, since the Leica driver is not supported in Linux.

Fortunately, the Leica MM driver communicates with the microscope
directly, instead of through a vendor-supplied driver.  So it should
"just work."  I've not tried it, but we've got a DMI6000B and I'm a
Linux nerd, so if you have trouble I can probably help.  Tomorrow if I
have time I'll install MM on my laptop and see if it will talk to our
microscope.

> I found some information on this web page:
> https://micro-manager.org/wiki/LeicaDMI
> So, to be able to control the Leica Microscope with MM on Linux, I may need
> the Leica DMI adapter ! Can anyone tell me please, what is it exactly? And
> how can I get this?

The "adapter" is just another name for the MicroManager driver.  Don't
worry, it comes with MicroManager.

Regards,
Brian

PS - MicroManager can control a DMI6000B microscope stand, but that's
only part of the picture.  Is your camera supported on Linux?

--
Brian Teague
[hidden email]
Weiss Group, Synthetic Biology Center @ MIT


------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Stuurman, Nico
In reply to this post by Siham
Hi Siham,

> I work in a lab where we want to move our machines to Linux and control our
> Leica DMI6000B microscope with MM. But before we do this, I would like to
> know if this is possible, since the Leica driver is not supported in Linux.

The Leica microscope communicates through a serial interface.  That is nice for you since it should also work on Linux.

> I found some information on this web page:
> https://micro-manager.org/wiki/LeicaDMI
> So, to be able to control the Leica Microscope with MM on Linux, I may need
> the Leica DMI adapter ! Can anyone tell me please, what is it exactly? And
> how can I get this?

It is the piece of code that “translates” between a device and the Micro-Manager core.  You can think of it as a driver. These device adapters are included with the Micro-Manager source code and binary distribution.  So, if you build the code yourself on linux (which is something you will need to do), then you will also build the device adapter code (including the Leica DMI adapter code).  

B.t.w., is your camera supported on Linux?

Best,

Nico




------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
Thank you all for your answers.

So, I don't need to install the Leica driver to make it work, right? Does this mean that Linux recognises the microscope without installing anything, just by connecting it to the computer?
Also, I will have to control the microscope with MM and Matlab scripts. Do you confirm that I don't need any driver to make the Leica communicate with Linux and control it with Matlab?

Thank's again,


PS: Yes, my camera is supported on Linux.

Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Erik H
FYI, I can confirm these gentlemen's speculations, that Micro-Manager's official sources fully support the DMI6000B under Linux :)

I haven't tried interfacing MM and Matlab on Linux, though I'd expect it to work.

Unnecessary details:
The stand has an integral FTDI serial <-> USB chip recognized by Linux through which it communicates via a straightforward carriage-return delimited text protocol.  Leica's documentation of this 4,5,6000x protocol is extensive, detailed, and complete save for UML state diagrams that surely exist in an ISO-9001 vault somewhere.  Whether or not Micro-Manager's device adapter implementors referred to this documentation, Micro-Manager's support is robust and extensible (should you encounter a Leica widget that is not yet supported).

-Erik


On Tue, May 27, 2014 at 7:12 AM, s_hachi <[hidden email]> wrote:
Thank you all for your answers.

So, I don't need to install the Leica driver to make it work, right? Does
this mean that Linux recognises the microscope without installing anything,
just by connecting it to the computer?
Also, I will have to control the microscope with MM and Matlab scripts. Do
you confirm that I don't need any driver to make the Leica communicate with
Linux and control it with Matlab?

Thank's again,


PS: Yes, my camera is supported on Linux.





--
View this message in context: http://micro-manager.3463995.n2.nabble.com/Contol-Leica-DMI6000B-using-MM-on-Linux-tp7582998p7583004.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
Hi all,

I'm trying now to configure Leica the DMI6000B in MM on Ubuntu 13.04, but it doesn't work.
I go to Tools -> Hardware Configuration Wizard -> Create New Configuration, and when I try to add "*scope | Leica..." I get the following message: "There are no unused ports available!"

Does anyone have an idea of the problem can be ?

Siham.
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Erik H
Hi Siham,

If not already, your user needs to be added to the uucp, ppp, or dialup group (whichever owns /dev/ttys0 or /dev/ttyUSB0).  "sudo usermod -a -G uucp username" will do the trick.

-Erik


On Wed, May 28, 2014 at 5:05 AM, s_hachi <[hidden email]> wrote:
Hi all,

I'm trying now to configure Leica the DMI6000B in MM on Ubuntu 13.04, but it
doesn't work.
I go to Tools -> Hardware Configuration Wizard -> Create New Configuration,
and when I try to add "*scope | Leica..." I get the following message:
"There are no unused ports available!"

Does anyone have an idea of the problem can be ?

Siham.



--
View this message in context: http://micro-manager.3463995.n2.nabble.com/Contol-Leica-DMI6000B-using-MM-on-Linux-tp7582998p7583013.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
I have just done it, but I still have the same message !
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Erik H
After plugging in the scope USB cable, are the last few lines of the output of the "dmesg" command something like the following?

[686362.936070] usb 3-14: new full-speed USB device number 17 using xhci_hcd
[686362.948116] usb 3-14: New USB device found, idVendor=0403, idProduct=6001
[686362.948119] usb 3-14: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[686362.948120] usb 3-14: Product: USB <-> Serial
[686362.948121] usb 3-14: Manufacturer: FTDI
[686362.948816] ftdi_sio 3-14:1.0: FTDI USB Serial Device converter detected
[686362.948836] usb 3-14: Detected FT232BM
[686362.948837] usb 3-14: Number of endpoints 2
[686362.948839] usb 3-14: Endpoint 1 MaxPacketSize 64
[686362.948840] usb 3-14: Endpoint 2 MaxPacketSize 64
[686362.948840] usb 3-14: Setting MaxPacketSize 64
[686362.948955] usb 3-14: FTDI USB Serial Device converter now attached to ttyUSB0



If so, the next thing I would try is connecting directly to the port with screen (which should be available in the Ubuntu package manager if not already installed) by running "screen /dev/ttyUSB0", replacing ttyUSB0 with the device name you saw in dmesg if necessary.  Once screen is running, type 70001 and press enter.  You should get back something like:
70001 DM6000B 70 71 72 73 74 76 77 78 80 81 82 83 84 85 86 93 94 95 96 97 98

If this much works, then at least you will have established that the computer can talk to the scope, which will give us a good start.  To exit screen, use the control-a, shift-k commands or just do "killall screen" in another terminal.

-Erik


On Wed, May 28, 2014 at 9:46 AM, s_hachi <[hidden email]> wrote:
I have just done it, but I still have the same message !



--
View this message in context: http://micro-manager.3463995.n2.nabble.com/Contol-Leica-DMI6000B-using-MM-on-Linux-tp7582998p7583020.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
This post was updated on .
The output of the "dmesg" commande is something like this:

[    1.301878] usb 3-3: new full-speed USB device number 2 using xhci_hcd
[    1.322744] usb 3-3: New USB device found, idVendor=0403, idProduct=6001
[    1.322749] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.322752] usb 3-3: Product: Leica DMI6000
[    1.322754] usb 3-3: Manufacturer: Leica Microsystems
[    1.381862] tsc: Refined TSC clocksource calibration: 3292.528 MHz
[    1.381867] Switching to clocksource tsc
[    1.489870] usb 3-4: new low-speed USB device number 3 using xhci_hcd
[    1.510196] usb 3-4: New USB device found, idVendor=046d, idProduct=c077
[    1.510200] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.510203] usb 3-4: Product: USB Optical Mouse
[    1.510205] usb 3-4: Manufacturer: Logitech

I see that you have:
      [686362.948120] usb 3-14: Product: USB <-> Serial
      [686362.948121] usb 3-14: Manufacturer: FTDI
and I have:
      [    1.322752] usb 3-3: Product: Leica DMI6000
      [    1.322754] usb 3-3: Manufacturer: Leica Microsystems

Do I need to install FTDI drivers ? http://www.ftdichip.com/Drivers/VCP.htm
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Erik H
They should be included with the Ubuntu kernel; you can verify that the driver is present by trying "sudo modprobe ftdi_sio".

The dmesg snippet you pasted looks like it was from early in the boot process.  It would be more informative if you unplug and replug the scope USB cable after the system is booted and then paste the end of dmesg (udev or whatnot may not have started by the time your boot-time dmesg output, so some of the relevant info from that first detection might be spread out further down in dmesg).


-Erik


On Wed, May 28, 2014 at 10:43 AM, s_hachi <[hidden email]> wrote:
The output of the "dmesg" commande is something like this:

[    1.301878] usb 3-3: new full-speed USB device number 2 using xhci_hcd
[    1.322744] usb 3-3: New USB device found, idVendor=0403, idProduct=6001
[    1.322749] usb 3-3: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[    1.322752] usb 3-3: Product: Leica DMI6000
[    1.322754] usb 3-3: Manufacturer: Leica Microsystems
[    1.381862] tsc: Refined TSC clocksource calibration: 3292.528 MHz
[    1.381867] Switching to clocksource tsc
[    1.489870] usb 3-4: new low-speed USB device number 3 using xhci_hcd
[    1.510196] usb 3-4: New USB device found, idVendor=046d, idProduct=c077
[    1.510200] usb 3-4: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[    1.510203] usb 3-4: Product: USB Optical Mouse
[    1.510205] usb 3-4: Manufacturer: Logitech

I see that you have Product:
      [686362.948120] usb 3-14: Product: USB <-> Serial
      [686362.948121] usb 3-14: Manufacturer: FTDI
and I have:
      [    1.322752] usb 3-3: Product: Leica DMI6000
      [    1.322754] usb 3-3: Manufacturer: Leica Microsystems

Do I need to install FTDI drivers ? http://www.ftdichip.com/Drivers/VCP.htm



--
View this message in context: http://micro-manager.3463995.n2.nabble.com/Contol-Leica-DMI6000B-using-MM-on-Linux-tp7582998p7583022.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
Okay, this is what I've got:

[   61.148388] usb 2-1.5: new full-speed USB device number 5 using ehci-pci
[   61.245262] usb 2-1.5: New USB device found, idVendor=0403, idProduct=6001
[   61.245268] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   61.245271] usb 2-1.5: Product: Leica DMI6000
[   61.245273] usb 2-1.5: Manufacturer: Leica Microsystems
[   61.440317] usbcore: registered new interface driver usbserial
[   61.440325] usbcore: registered new interface driver usbserial_generic
[   61.440329] usbserial: USB Serial support registered for generic
[   61.563258] usbcore: registered new interface driver ftdi_sio
[   61.563275] usbserial: USB Serial support registered for FTDI USB Serial Device
[   61.563332] ftdi_sio 2-1.5:1.0: FTDI USB Serial Device converter detected
[   61.563353] usb 2-1.5: Detected FT8U232AM
[   61.563354] usb 2-1.5: Number of endpoints 2
[   61.563355] usb 2-1.5: Endpoint 1 MaxPacketSize 64
[   61.563356] usb 2-1.5: Endpoint 2 MaxPacketSize 64
[   61.563357] usb 2-1.5: Setting MaxPacketSize 64
[   61.563622] usb 2-1.5: FTDI USB Serial Device converter now attached to ttyUSB0

Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Erik H
Thanks; it looks like you should be in good shape.  Have you tried "screen /dev/ttyUSB0 19200" followed by typing 70001 and pressing enter?  Another thing you might try is "lsof /dev/ttyUSB0" to see if some other process has taken the device (for example, some kind of dialup modem service or upstart/systemd thingy).

For reference, I am attaching a MicroManager config file for just the scope that I am using.  If you search and replace "/dev/ttyScope" with "/dev/ttyUSB0" and change "115200" to "19200", this same config file may work for you (though you may also need to remove accessories... using the MM hardware wizard to delete everything except core and scope is a simple way to do this; just ignore any error messages you see before doing the deletion).

NB: I hacked together some scripts for udev to give my /dev/ttyUSB* devices fixed names, which is why I have /dev/ttyScope rather than /dev/ttyUSB0.

-Erik


On Wed, May 28, 2014 at 11:30 AM, Siham <[hidden email]> wrote:
Okay, this is what I've got:

[   61.148388] usb 2-1.5: new full-speed USB device number 5 using ehci-pci
[   61.245262] usb 2-1.5: New USB device found, idVendor=0403,
idProduct=6001
[   61.245268] usb 2-1.5: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[   61.245271] usb 2-1.5: Product: Leica DMI6000
[   61.245273] usb 2-1.5: Manufacturer: Leica Microsystems
[   61.440317] usbcore: registered new interface driver usbserial
[   61.440325] usbcore: registered new interface driver usbserial_generic
[   61.440329] usbserial: USB Serial support registered for generic
[   61.563258] usbcore: registered new interface driver ftdi_sio
[   61.563275] usbserial: USB Serial support registered for FTDI USB Serial
Device
[   61.563332] ftdi_sio 2-1.5:1.0: FTDI USB Serial Device converter detected
[   61.563353] usb 2-1.5: Detected FT8U232AM
[   61.563354] usb 2-1.5: Number of endpoints 2
[   61.563355] usb 2-1.5: Endpoint 1 MaxPacketSize 64
[   61.563356] usb 2-1.5: Endpoint 2 MaxPacketSize 64
[   61.563357] usb 2-1.5: Setting MaxPacketSize 64
[   61.563622] usb 2-1.5: FTDI USB Serial Device converter now attached to
ttyUSB0





--
View this message in context: http://micro-manager.3463995.n2.nabble.com/Contol-Leica-DMI6000B-using-MM-on-Linux-tp7582998p7583025.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

scope_only.cfg (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
Okay, let's sum up.

1. I turn on the scope

2. I turn on the computer

3. I plug in the scope

4. I type "dmesg" and I get this:
[  368.850807] usb 2-1.5: new full-speed USB device number 5 using ehci-pci
[  368.948056] usb 2-1.5: New USB device found, idVendor=0403, idProduct=6001
[  368.948061] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  368.948064] usb 2-1.5: Product: Leica DMI6000
[  368.948066] usb 2-1.5: Manufacturer: Leica Microsystems
[  369.011900] usbcore: registered new interface driver usbserial
[  369.011917] usbcore: registered new interface driver usbserial_generic
[  369.011928] usbserial: USB Serial support registered for generic
[  369.034968] usbcore: registered new interface driver ftdi_sio
[  369.034975] usbserial: USB Serial support registered for FTDI USB Serial Device
[  369.035023] ftdi_sio 2-1.5:1.0: FTDI USB Serial Device converter detected
[  369.035042] usb 2-1.5: Detected FT8U232AM
[  369.035043] usb 2-1.5: Number of endpoints 2
[  369.035044] usb 2-1.5: Endpoint 1 MaxPacketSize 64
[  369.035045] usb 2-1.5: Endpoint 2 MaxPacketSize 64
[  369.035046] usb 2-1.5: Setting MaxPacketSize 64
[  369.035495] usb 2-1.5: FTDI USB Serial Device converter now attached to ttyUSB0

5. Now, I type "screen /dev/ttyUSB0 19200 70001" and I get this:
can't access line /dev/ttyUSB0 for R/W : Permission denied
Sorry, could not find a PTY

6. When I type "lsof /dev/ttyUSB0" nothing happens, so I guess no other process has taken the device

7. Then, I replace /dev/ttyScope by /dev/ttyUSB0 and change "115200" to "19200" in the configuration you attached, I open MM I go to Tools -> Hardware configuration -> Modify or explore existing configuration, when I click on "Next" I get a "Initialization Error" message. It says: "Error in device scope: Serial command failed"

I don't understand !

Actually, the scope has a USB and a serial interface both are plugged in.
Does the problem has something to do with this?
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Siham
In reply to this post by Erik H
When I close and re-open MM, I get the error I attachedScreenshot.png
Reply | Threaded
Open this post in threaded view
|

Re: Contol Leica DMI6000B using MM on Linux

Stuurman, Nico
In reply to this post by Siham
Hi Siham,

Problem communicating with Leica DMI behind FTDI-based serial port on Ubuntu linux:

> 5. Now, I type "screen /dev/ttyUSB0 19200 70001" and I get this:
> can't access line /dev/ttyUSB0 for R/W : Permission denied
> Sorry, could not find a PTY

That is the problem right there.  What are the permissions on that port (I think you can get that with ls -al /dev/ttyUSB0)?  No point trying Micro-Manager, it will not be able to open the port if your terminal can not do it either.  

A very quick google search using "ubuntu USB serial converter”, show a bunch of useful leads.

Best

Nico





------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general