[Solved] Problem at startup: TamsMC

Moderator: Moderators

Re: Problem at startup: TamsMC

Postby ViktorHotel » 18.03.2014, 20:42

Hi,
It is not so difficult to create a udev rule.

First you have to find out the VendorID and ProductID of your Tams with the console command "lsusb"
On my system it looks like this:

lsusb
Bus 001 Device 006: ID 04d8:fbb3 Microchip Technology, Inc.
Bus 001 Device 005: ID 0483:5740 STMicroelectronics STM32F407
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


For the Tams the ID (if my google search is correct) is ID 10c4:813f.
10c4 is VendorId and 813f ist the ProductID.

Now you create a file e.g. 70-mm-blacklist.rules in /lib/dev/rules.d/ with root rights.
The easiest way to do this, is to type "sudo gedit" via console. This opens the editor with root rights.
Now you type/copy the following lines:

KERNEL=="ttyS4", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTR{idVendor}=="10c4", ATTR{idProduct}=="813f", ENV{ID_MM_DEVICE_IGNORE}="1"

and save the file in "/lib/udev/rules.d" as "70-mm-blacklist.rules"


Best regards,
Volker
rocrailing with:
Ubuntu 16.04 LTS, MDRRC-II mit BMB Booster-B5 (Fahren), HSI88(Rückmelden), Sprog3 (Weichen und Signale), DMX-Artnetnode (Wetter und Licht)
ViktorHotel
 

Re: Problem at startup: TamsMC

Postby agre30 » 18.03.2014, 22:15

Thanks Volker. I will try this but it will have to wait untill the weekend.

Greetings.
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby LDG » 18.03.2014, 23:15

Hi Tams users on Linux,

I integrated the "ID_MM_DEVICE_IGNORE"-Option mentioned by Volker into my udev rule file for tams devices :)

HOW-TO:
- unpack the attached archive ( "tar xvzf 11-tams.rules.tar.gz" )
- copy (as root) file "11-tams.rules" into your udev rule folder (i.e. /etc/udev/rules.d on Fedora)
- other feature :roll: : a device named "/dev/tamsMC" is automatically created as a link to the USB device assigned by the system ( /dev/ttyUSB0 or /dev/ttyUSB1 or /dev/ttyUSB2 or...)
In other words: You may use "/dev/tamsMC" as "fixed" device name in Rocrail :wink:

Regards,
Lothar
You do not have the required permissions to view the files attached to this post.
LDG
Site Admin
 

Re: Problem at startup: TamsMC

Postby agre30 » 19.03.2014, 19:25

I could not wait until the weekend :D

I installed Lothars file and rebooted the computer. Conclusions:
- The power on the TamsMC (and boosters) is not turned on when the computer is up and running
- The TamsMC works when Rocrail is running and the power is turned on when I press the power on button in Rocrail :thumb_up:
- Connecting the TamsMC to /dev/tamsMC does not work. Rocrail does not recognise the TamsMC. (I don't mind. I don't use the computer for other purposes)
- The HSI88 does not work. The trace file still shows 'Could not init HSI88 port!' When I restart Rocrail the HSI88 also works. The HSI88 is connected to the serial port /dev/ttyS4. Is it possible to do something simmilar as with the TamsMC?
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby ViktorHotel » 19.03.2014, 23:01

Hi,
adding the following line:
KERNEL=="ttyS4", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"

to your file "11-tams.rules" disables the ModemManger for ttyS4
Regards,
Volker
rocrailing with:
Ubuntu 16.04 LTS, MDRRC-II mit BMB Booster-B5 (Fahren), HSI88(Rückmelden), Sprog3 (Weichen und Signale), DMX-Artnetnode (Wetter und Licht)
ViktorHotel
 

Re: Problem at startup: TamsMC

Postby agre30 » 20.03.2014, 06:50

Thanks Volker,
I will let you know about the result.
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby agre30 » 20.03.2014, 21:47

I added the line and restarted the computer. Nothing has changed.
Tams is ok but the HSI88 doesn't work. the trace still shows the same message: could not init HSI88
When I restart Rocrail everything works fine after a while. The trace windows shows some messages concerning the HSI88. I can upload the tracefile tomorrow.

Can it be the HSI88 itself needs some time to start?
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby agre30 » 21.03.2014, 12:01

Here are the trace files. File 001 is where the HSI88 port could not be initialized. In file 002 is there are some messages concerning the HSI88 before it works correctly. I have seen these messages before when I first started with Rocrail.
You do not have the required permissions to view the files attached to this post.
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby rjversluis » 21.03.2014, 12:15

Just forget about those trace lines; The HIS88 does not use a protocol with a start of message eye-catcher. So dumping bytes to get in sync with the HSI88 is stupid but there is no other way.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBUS - CANGCx ] - [ G: CBUS - CANGCx ]
rjversluis
Site Admin
 

Re: Problem at startup: TamsMC

Postby agre30 » 21.03.2014, 12:27

Ok. Thanks Rob.
Seems the only way to start right is to start the computer, wait a minute and then start Rocrail.
Lothar and Volkers solution work fine for the Tams but not for the HSI88 (until now).
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby rjversluis » 21.03.2014, 12:33

You are using a none standard legacy RS232 device: /dev/ttyS4
Normally /dev/ttyS0 and /dev/ttyS1 are the first two real RS232 ports.
Maybe you should try an USB-RS232 converter for the HIS88.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBUS - CANGCx ] - [ G: CBUS - CANGCx ]
rjversluis
Site Admin
 

Re: Problem at startup: TamsMC

Postby LDG » 21.03.2014, 12:34

Hi Albert,

during weekend I have a linux laptop with "real" serial port at home.
I will connect my HSI-88 directly to that port to verify the udev-rule to prevent ModemManager from accessing it.

Regards,
Lothar
LDG
Site Admin
 

Re: Problem at startup: TamsMC

Postby agre30 » 21.03.2014, 13:12

rjversluis wrote:You are using a none standard legacy RS232 device: /dev/ttyS4

My computer had no serial port so I bought a card with 2 serial ports. I don't know why the ports are numbered in this way.
Can I do something to change this? Put the card in another slot on the motherboard?
Last edited by agre30 on 21.03.2014, 13:13, edited 1 time in total.
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby agre30 » 21.03.2014, 13:13

LDG wrote:Hi Albert,
I will connect my HSI-88 directly to that port to verify the udev-rule to prevent ModemManager from accessing it.
Regards,
Lothar

Thanks Lothar. I appreciate every help I can get :thumb_up:
Albert,
Märklin 3-rail
Lubuntu 16.04 (server and client) / TamsMC - Booster B-2 / HSI88 / S88N
Stoom / steam / dampf / diesel / E-loc
agre30
 

Re: Problem at startup: TamsMC

Postby LDG » 22.03.2014, 16:58

Hi Albert,
agre30 wrote:Thanks Lothar. I appreciate every help I can get :thumb_up:
bad news: On my system the ModemManager is only trying to "occupy" USB-Devices (TamsMC) on startup or reinserting. Adding a rule with the option mentioned by Viktor and everything is OK.
My onboard serial port is no touched by ModemManager (also not after reboot).
Sorry no further help available.

Regards,
Lothar
LDG
Site Admin
 

PreviousNext

Return to P50 and P50x