NIS Elements 5.0.2, BioFormats 5.8.2, and Matlab

I hate closed company file formats like docx, pdf, and nd2. The order does not matter, but the fact that you can open it with their, and only their software perfectly is what matters the most. There are open-source tools to solve this problem like LibreOffice, Okular, ImageJ/Fiji/BioFormats. But when a closed file format changes, all hell can break loose.

Continue reading “NIS Elements 5.0.2, BioFormats 5.8.2, and Matlab”

Advertisements

Arduino Laser Controller updated to v2!

I had a little bit of free time, so the time came to revisit an old project, the thorlabs-ldc-arduino. [panel] [GUI]. The plan is to include a second Thorlabs Laser Driver, the LDC500.

Laboratory upgrades

We bought a OSRAM 450nm laser diode from ebay, and installed it into a TCLDM9 head paired with an LDC500 driver. The old problem came up, that the laser driver is super, but it cannot communicate with the PC. I grabbed these images from the internet, to describe the problem:

Only two BNC connectors, one for setting laser current, the other is for checking the laser current.

Panel upgrades

The custom shield had to be updated:

  1. A BNC splitter is used to duplicate the MOD In.
  2. A new BNC connector is added (ADC-CTL OUT)

Code upgrades

The arduino and labview code can be found on github.

Arduino Changes:

  • Merged the the DHT branch with the master branch: I marked the parts which need to be commented out in case there is no DHT22 sensor an library.
  • Updated the code to include a second laser in read only mode. The read commands are incremented by one letter: [j? q? qa?]
  • Adjusted the linear coefficients to work better with two lasers.

Labview GUI Changes:

  • Labview 2014 version (no changes here).
  • Stripped the previous code from the Cobolt subVIs.
  • Introduced an initial delay, because there has to be a wait after the arduino is reset.
  • Replaced the setPower actuator to a setCurrent actuator.
  • Shortened some delays.

Known limitations

As the LDC500 does not have an ON/OFF input, when both controllers are turned on, both of them ar controlled at the same time (BNC slpitter). To overcome this, the user can switch off the LDC205 controller with the ON/OFF button on the GUI and control only the LDC500 driver. Or the user can turn off the LDC500 controller with the power button on the driver and it won’t interfere with the reactivation.

Note: We don’t use the two lasers at the same time, so for us it is not a problem.

ZFS replication between FreeNAS and Ubuntu

PUSH side: FreeNAS 9.10.2-U2
PULL side: Ubuntu Xenial

I have set up the ssh keys, so that root from PUSH can log into PULL without a password but the replication kept failing because of unknown reasons. The documentation is not so long-winded about this, and how to debug. On the PULL side I could see successful but short logins from root in the auth.log. The debug.log on the PUSH side held the key information:

Replication result: /usr/bin/env: �lz4c�: Nincs ilyen fájl vagy könyvtár
cannot receive: failed to read from stream
Failed to write to stdout: Broken pipe
Error 35 : Write error : cannot write compressed block

To solve the replication problem I had to install liblz4-tool on Ubuntu. I enabled Replication Stream Compression, and the tools on Ubuntu were missing. 😦

I am still waiting for compressed zfs replication to be a thing.

Replacing a dying HDD on FreeNAS

I had a degrading HDD, but the LSI Megaraid SAS card was keeping it alive, till its last breath. The HDD is PD 01 and presented to the OS as /dev/mfid1. This can be checked using the mfiutil:

# mfiutil show drives
mfi0 Physical Drives:
 0 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124313> SATA E1:S0
 1 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124517> SATA E1:S1
 2 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124488> SATA E1:S2
 3 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00120759> SATA E1:S3
 4 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124038> SATA E1:S4
 5 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124851> SATA E1:S5

Continue reading “Replacing a dying HDD on FreeNAS”

Can’t reconnect to the smb share?

After an upgrade I could not connect to my samba shares on a FreeNAS-9.10.2-U2. Just the following appeared in my syslog:

CIFS VFS: Send error in SessSetup = -13
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
CIFS VFS: Send error in SessSetup = -13
[CIFS VFS: Unable to select appropriate authentication method!
CIFS VFS: Send error in SessSetup = -22
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
CIFS VFS: Send error in SessSetup = -13
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
CIFS VFS: Send error in SessSetup = -13

The FreeNAS-9.10.2-U2 upgrade bumped the samba version number from 4.4.5 to 4.5.5 so something might got deprecated and I could not connect via fstab:

//IP/SHARE /home/USER/share cifs credentials=/home/USER/.smbcred,iocharset=utf8,sec=ntlm 0 0

Solving this problem was easy. The “security=ntlm” part had to be removed. Yaaaay!!!

Flash Archer C20i from factory to OpenWRT/LEDE

I had a lot of success changing the firmware to OpenWRT on multiple TP-Link devices (TL-WR941ND, TL-WR841N, TL-WR740N). With original firmware these devices are only good for home use, but are not capable of supporting 10-20 users (or even more) for example in a dormitory. They just freeze, or drop wireless users randomly. But with an OpenWRT firmware they are rock stable, even under high load. Because these devices have only 4Mb of flash and 32Mb RAM they “just work” and don’t leave any opportunity for adding extra functionality (maybe a little muninlite or tinyproxy). With lede-17.01 you even have to disable some package feeds in opkg to install packages because opkg eats too much RAM. So it was time for a hardware upgrade…

Continue reading “Flash Archer C20i from factory to OpenWRT/LEDE”