lenz-en
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | lenz-en [2018/11/12 08:56] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Lenz====== | ||
+ | [[: | ||
+ | |||
+ | [[: | ||
+ | * [[lenz-static-linux-en|Linux static driver install]] | ||
+ | * [[xpressnet-en|XpressNet]] //Future replacement for this library.// | ||
+ | |||
+ | // \\ // \\ | ||
+ | |||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | =====Protocol===== | ||
+ | * LI101F: {{http:// | ||
+ | * LI-USB: {{http:// | ||
+ | |||
+ | \\ | ||
+ | =====Preface===== | ||
+ | Rocrail supports the LI100/ | ||
+ | |||
+ | \\ | ||
+ | =====Setup===== | ||
+ | {{xpressnet-en.png}}\\ | ||
+ | |||
+ | \\ | ||
+ | ==== LI-101 ==== | ||
+ | {{ : | ||
+ | |||
+ | ===Linux=== | ||
+ | <code xml> | ||
+ | <digint iid=" | ||
+ | </ | ||
+ | |||
+ | ===Windows=== | ||
+ | <code xml> | ||
+ | <digint iid=" | ||
+ | </ | ||
+ | |||
+ | Note: **/ | ||
+ | |||
+ | Nodes, attributes and values are explaned here: [[http:// | ||
+ | |||
+ | \\ | ||
+ | ====LI-USB==== | ||
+ | {{ : | ||
+ | ===Mac OS X=== | ||
+ | The **[[: | ||
+ | On the MacBook, running OS X 10.6, the device name is: | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | The device name changes slightly when using another USB port; Check the Mac OS X Wiki page for more details.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | ===Linux=== | ||
+ | |||
+ | The Linux kernel (at least up to 2.6.27) has a working driver for the LI_USB, but does not know the Lenz vendor id and product id. Therefore, the LI-USB is not recognised automatically when plugged in. There are two methods to overcome that problem: | ||
+ | * udev - this is the standard method for Linux to recognise hardware when plugged in. In order for this to work, we need to tell the kernel about the vendor- and product id. | ||
+ | * static - install the driver at boot time | ||
+ | |||
+ | |||
+ | Both mehtods are described below, you need to use one or the other. The author did not get the udev method to work with openSUSE 11.1 and therefore used the static method. | ||
+ | |||
+ | == Method using udev == | ||
+ | |||
+ | Disconnect the LI-USB from the PC. Login as root and change to the directory | ||
+ | |||
+ | ''/ | ||
+ | |||
+ | Now create a file named | ||
+ | |||
+ | '' | ||
+ | |||
+ | and open it with an editor. The only content is (without any line breaks): | ||
+ | |||
+ | '' | ||
+ | |||
+ | (Yes, really ;) - but see the comment in the section on the static method below) | ||
+ | |||
+ | Save and close the file. | ||
+ | |||
+ | <code xml> | ||
+ | <digint iid=" | ||
+ | </ | ||
+ | |||
+ | == Static method (install driver at boot time) == | ||
+ | |||
+ | This method is proven to work with openSUSE 11.1 and therefore the recommended method for this distribution. You will have to adjust filenames etc. for other distributions, | ||
+ | |||
+ | You need to modify the file '' | ||
+ | |||
+ | Now that we have got the '' | ||
+ | |||
+ | <code xml> | ||
+ | <digint lib=" | ||
+ | </ | ||
+ | |||
+ | with the new line: | ||
+ | |||
+ | <code xml> | ||
+ | <digint iid=" | ||
+ | </ | ||
+ | |||
+ | Please note the ''/ | ||
+ | |||
+ | In the interface box, Lenz use a chip from Future Technology Devices International, | ||
+ | |||
+ | Use an editor to modify the file ''/ | ||
+ | |||
+ | < | ||
+ | ## Type: | ||
+ | ## ServiceRestart: | ||
+ | # | ||
+ | # This variable contains the list of modules to be loaded | ||
+ | # once the main filesystem is active | ||
+ | # You will find a few default modules for hardware which | ||
+ | # can not be detected automatically. | ||
+ | # | ||
+ | MODULES_LOADED_ON_BOOT=" | ||
+ | </ | ||
+ | |||
+ | Now you also need to make sure the driver knows about the vendor and procut ID of the Lenz interface, by adding that data to the file ''/ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # please add local extensions to this file | ||
+ | # | ||
+ | options ftdi_sio vendor=0x0403 product=0xd780 | ||
+ | |||
+ | </ | ||
+ | |||
+ | The above vendor and product id are the ones my interface came with. This should in theory be the same for all the Lenz boxes. However, from the text on the udev method written by another author, I take it that Lenz may have shipped some with dummy values of vendor=0x1111 and product=0x1234. | ||
+ | You can find out the values of your box by connecting it and typing '' | ||
+ | |||
+ | < | ||
+ | hans@Taurus:/> | ||
+ | Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 005 Device 004: ID 0403:d780 Future Technology Devices International, | ||
+ | Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 003 Device 003: ID 046a:0050 Cherry GmbH | ||
+ | Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | Bus 002 Device 003: ID 0c4b:0100 Reiner SCT Kartensysteme GmbH cyberJack e-com/ | ||
+ | Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub | ||
+ | hans@Taurus:/> | ||
+ | </ | ||
+ | |||
+ | Having done all of the above, you will find that rocrail still cannot talk to the Lenz interface. This is because the device ''/ | ||
+ | |||
+ | You can do this e.g. in yast with Security and Users -> User and Groupmanagement -> double click on the user you want to add -> Details -> check the box for uucp on the right (you may have to scroll down to see uucp). Finish by clicking OK twice. | ||
+ | |||
+ | Now | ||
+ | * reboot your machine | ||
+ | * plug in the interface and switch on the power to your Lenz equipment | ||
+ | * check in the ''/ | ||
+ | * start the rocrail server | ||
+ | * start rocview | ||
+ | * go to Tables -> Locomotive table... and create a new locomotive table | ||
+ | * the new locomotive table will appear above the clock - double click on it | ||
+ | * don't forget to switch on the power using Control -> Power on | ||
+ | * and hopefully you're off running your first loco !!!!!! | ||
+ | |||
+ | |||
+ | ==Windows: | ||
+ | You have to install the driver which ships with your LI-USB. But the LI-USB-Server has to be stopped! | ||
+ | |||
+ | <code xml> | ||
+ | <digint iid=" | ||
+ | </ | ||
+ | |||
+ | Note: **/ | ||
+ | |||
+ | ====Sensor adressing==== | ||
+ | the calculation is: \\ | ||
+ | address_rocrail = (lenz_address - 1) *8 + port ∀ lenz_address ∈ [1..128], port ∈ [1..8] | ||
+ | |||
+ | |||
+ | |||
+ | ===Example=== | ||
+ | lenz address -> rocrail address (from..to) \\ | ||
+ | |||
+ | 1: 1..8 -> 1..8 \\ | ||
+ | 2: 1..8 -> 9..16 \\ | ||
+ | ... \\ | ||
+ | 64: 1..8 -> 505..512 \\ | ||
+ | 65: 1..8 -> 513..520 \\ | ||
+ | 66: 1..8 -> 521..528 \\ | ||
+ | ... \\ | ||
+ | and so on ... | ||
+ | |||
+ | ==== Sensor offset ==== | ||
+ | The attribute '' | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====Debouncing sensors==== | ||
+ | If you have problems with slow or flickering sensors you can set **'' | ||
+ | ^Use this parameter with care because under most conditions a value of zero is better when running in auto mode; the first event is processed and the bouncing will be ignored.^\\ | ||
+ | |||
+ | \\ | ||
+ | ====Startup power state==== | ||
+ | The default startup power state is off. You can change this behavior by checking this option. | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ==== Fastclock ==== | ||
+ | Some xPressNet Command Stations, like [[: | ||
+ | Check this if Rocrail should send this command every layout minute.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Accessory Decoder Address===== | ||
+ | You can set up the Address in rocrail style, or what is more cool in [[: | ||
+ | \\ | ||
+ | |||
+ | |||
+ | |||
lenz-en.txt · Last modified: 2018/11/12 08:56 by 127.0.0.1