Rocrail in the raspberry!

Questions and discussions around compiling of Rocrail, usage of wxWidgets etc.

Moderators: dadolphs, Moderators

Postby mserrano » 23.08.2013, 16:58

Hi Rob,

Have you checked if you can generate dcc signals with the uart in the raspberry pi?

Last time I tried (both ddx and dcc232) I was not capable. I tried with two rpi of the old ones (256 RAM)... maybe something has changed now. Please let me know if you have succeeded.. I am pretty interested.

In my trials (at the beginning of this post) I was only able to generate Motorola commands with DDX and the uart on the rpi.

Best regards,

Manolo
mserrano
 

Postby rjversluis » 23.08.2013, 17:23

Hi Manolo,

I did not have tested it and I wait on a connector print from Peter:
http://wiki.rocrail.net/doku.php?id=roc ... ctor_board

But is there an USB device available for using it as output?
http://wiki.rocrail.net/doku.php?id=dcc ... untu_10.10
The Ubuntu did only work with USB-Serial converters.
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby mserrano » 23.08.2013, 17:39

Hi Rob,

Yes USB is available, I tried a USB-UART convertor and works (the signal quality depends on the convertor).

I was just mentioning the issue with the native uart in case there had been some progress I was not aware.

With the USB uart the ORD-3 connector should not be access at GPIO 14 though.

Looking forward to seeing the results

Manolo
mserrano
 

Postby rjversluis » 23.08.2013, 17:58

Hi Manolo,

how do you access the USB? Is it the same connector as used for the 5V power supply?
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby mserrano » 23.08.2013, 18:06

No, there are two USB connectors available, just next to the ethernet connector
mserrano
 

Postby rjversluis » 23.08.2013, 18:14

OK, Tnx. 8)
Sometimes I'm blind.

Code: Select all
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

crw-rw---T 1 root dialout 188, 0 Jan  1  1970 /dev/ttyUSB0
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Postby mserrano » 29.09.2013, 20:46

I have finally produced a first board to test my rpic solution. At this stage I have only completely tested half of the circuit, the one related to the control of the ucontroller and the interface with 4 buttons. There is another part of the circuit, basically copied from and Application Note from NXP to isolate the I2C bus. This is intended to be used to capture power consumption at the boosters and other parts of the layout – still not developed.
The firmware has not changed, which means that the use of the programing track is still not available… I have neither completed all the functionalities for the program commands.
As usual, the code repository has been updated

https://launchpad.net/rpicd
http://tren.enmicasa.net/rpicd

One interesting addition is a script to update the firmware from the raspberry pi. The script is from Daniel Perron https://github.com/danjperron/A2D_PIC_RPI . and I have just updated it to support the 16f1825 (which does not support in some revisions a basic erase command). In the long term, it would be interesting to migrate the script from python to c, in order to integrate it with the daemon.

On the other hand, the daemon needs further work. Now that there is a reference implementation of rocnet, natural next step is to migrate and stop using the rpic library I created for testing. In this way, the rpic will be able to communicate with any rocrail server using rocnet… and I think rocnet is now supporting most of the things I was missing when I started this project -e.g. the 24 functions discussed in page 5 of this already long post.

Development is slow – I nearly have time for the hobby – but progressing.
You do not have the required permissions to view the files attached to this post.
mserrano
 

RasPi + RocRail + GenLi-Interface?

Postby DorSachse » 27.11.2013, 23:29

Hi,
I'm new into the rocrail scene and I need some help. I have a rocrail running on a RaspberryPi and I can connect the server from Rocview well.
I' use a GenLI Interface for XPreeNet and a "Roco Multimaus" central unit.
The GenLi-IF (GenLi-USB) is like that:

http://wiki.rocrail.net/doku.php?id=genli-de

I spend a mass of hours to get this combination working but I don't have any success. If I edit the rocrail.ini the changes will be obsolete after a restart of rocrail (for example I write "/dev/ttyACM0" as the used port the system changes into "com1" after restart).

I get:

[Serial 0233 open rc=2 read=-1 write=-1 [2] No such file or directory!

later

"Could not init Roco port!"

The combination with GenLi-USB working well with Win7 and direct connection to a Laptop USB interface. But with RasPi...no way :-(

What can I do?

Redards
Torsten
DorSachse
 

Re: RasPi + RocRail + GenLi-Interface?

Postby LDG » 28.11.2013, 00:42

Hi Torsten,
DorSachse wrote:If I edit the rocrail.ini the changes will be obsolete after a restart of rocrail (for example I write "/dev/ttyACM0" as the used port the system changes into "com1" after restart).
Do not edit any file while the server is running. Any changes will be overwritten when the Rocrail server is stopping.

Why are you not using Rocview to change the interface settings?

If you have to edit rocrail.ini manually then:
Stop the Rocrail server
Edit and save rocrail.ini
Start the Rocrail server

Regards,
Lothar
LDG
Site Admin
 

Re: RasPi + RocRail + GenLi-Interface?

Postby Richard-TX » 28.11.2013, 01:22

DorSachse wrote:Hi,


The combination with GenLi-USB working well with Win7 and direct connection to a Laptop USB interface. But with RasPi...no way :-(

What can I do?

Redards
Torsten


Two things.

1 - do a lsusb to see if the device is recognized.
2- add a USB hub.
Richard
Dallas/Fort Worth
Texas USA
Richard-TX
 

Re: RasPi + RocRail + GenLi-Interface?

Postby DorSachse » 28.11.2013, 10:56

Hi Lothar,

LDG wrote:...Why are you not using Rocview to change the interface settings?


because the rocview dialog don't have /dev/... entrys but only com1-n for windows.

Regards, Torsten
DorSachse
 

Re: RasPi + RocRail + GenLi-Interface?

Postby LDG » 28.11.2013, 12:06

Hi Torsten,
DorSachse wrote:
LDG wrote:...Why are you not using Rocview to change the interface settings?
because the rocview dialog don't have /dev/... entrys but only com1-n for windows.
The box for "Port"-setting also accepts "free text" :wink:

Regards,
Lothar
LDG
Site Admin
 

Postby mserrano » 30.11.2013, 00:57

Hi Torsten,

Sorry for the late response... I have been out.

It seems you already have a response.

:D

Br,

Manolo
mserrano
 

Postby skippa » 24.01.2014, 07:17

Hi Manolo,

I am sorry but I can not read it out of the last posts:
what is the situation with your dcc generator board? I am still looking for a solution to get rid of the usb2serial converter in my setup.
Raspi with Rocrail Server -usb2serial -ord5-gca101 on railsync-booster

In principle, ddx works but it uses considerable amount of cpu and, more importantly, the usb2seial adapter itself is very crutical. Ì have spent month to find a working one (see http://forum.rocrail.net/viewtopic.php?t=6031) and now the adapter seems to be broken. Again.

Thanks for updating

Jens
skippa
 

Postby mserrano » 25.01.2014, 12:02

Hi Jens,

Unfortunately there is no further news from my last post. We are having our first baby next month and everything in the house is about the new little one :D

However, I can say that I have been using the current version for quite some time now, and it is working quite fine… there is some bugs to solve… but still is pretty good to manage my train.

All the information is here:
http://tren.enmicasa.net/la-tecnologia/rpicd/

The main remaining issue – top of the list if I get some time – is not to use the self-made library I am using to communicate from rocrail to the rocpi, and use something like rocnet protocol. I have seen that thanks to the rocnodes there is a reference implementation, and the protocol has also improved… so it is the natural choice.

With regard to the capabilities of the ucontroller, they are still the same:
• Support for MM1 and MM2 protocol
• Support for NMRA (long and short addresses) – 14,28 and 128 steps
• Support for NMRA accessories (no extended accessories so far)
• Support for writing CV.

All the new stuff (reading CV and MMX) is also pending.
Sorry for not being able to push harder for the project… but be sure I will complete the pending tasks.

BTW, obviously with this solution there is no need for usb converter and the timing of the signal is extremely accurate.
I will keep you posted when I evolve the project.

Manolo
mserrano
 

PreviousNext

Return to Building & Compiling