Raspberry Pi B+: Setup from scratch

http://wiki.rocrail.net/doku.php?id=roc ... netnode-en
Blackpixel83
Posts: 131
Joined: 21.02.2013, 15:43
Location: Montreal
Contact:

Raspberry Pi B+: Setup from scratch

Post by Blackpixel83 » 28.05.2015, 20:17

So, do you thing guys I can use Rocview on rasp 2 B with a touch screen attached ?
I need only client.

Christophe.

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 02.06.2015, 10:20

I'm starting out now with the Rasbian, and the latest Rocrail installed, from following your wiki.

Is there a problem with GCA-Pi01 and RPi2? I was a bit confused by this thread.

The LEDs/button doesn't work?

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 02.06.2015, 10:21

Blackpixel83 wrote:So, do you thing guys I can use Rocview on rasp 2 B with a touch screen attached ?
I need only client.

Christophe.
You could use a normal Rasbian install with GUI?
Do you have the server elsewhere and want the RPi2 as a normal client, a normal PC?

The RPi2 is slow, but should work :)

LDG
Site Admin
Posts: 2701
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Re: Raspberry Pi 2: How to enable GPIO

Post by LDG » 02.06.2015, 11:24

Hi,

you may speed up your compile times by doing one (or all) of the following:
  • if you only need the server part (-> RasPi) then use "make server"
  • use "ccache": install package AND configure it :arrow: man page
    * first compile is a bit slower, subsequent compile will be much faster
  • use make with multiple simultaneous jobs a a time
    * to use the -j option you must use a modified/patched makefile because since rocnetnode was introduced there is an (ugly) race condition that most of the times stops the build process with errors :(
    * Do not use unlimited # of jobs
    * Best practice is #cores+1
I use a (private) patchset that changes the makefile to use simultaneous jobs and I use a script, that updates the repository and starts compiling only if a new revision was pulled :)
On my raspPi B+ (old version 1) "make server" takes about 10-15 minutes (difference depends on memory caching!)
A 5 year old notebook (2 cores@2Ghz, 4GB RAM, SSD) : "make" (rocrail and rocview): 90-120 seconds
Some years ago I had a server with 48 cores for testing purposes. Compiling Rocview was able to use all 48 cores at a time 8)

Regards,
Lothar

Liviu M
Posts: 949
Joined: 03.12.2011, 20:44

Re: Raspberry Pi 2: How to enable GPIO

Post by Liviu M » 02.06.2015, 11:40

Hello Lothar,
LDG wrote: [*]use "ccache": install package AND configure it :arrow: man page
* first compile is a bit slower, subsequent compile will be much faster
shouldn't make do the same thing? Compile only the changed files (and the files depending on)?

Regards,
Liviu
Last edited by Liviu M on 02.06.2015, 12:13, edited 1 time in total.

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 02.06.2015, 12:11

DIYglenn wrote:I'm starting out now with the Rasbian, and the latest Rocrail installed, from following your wiki.

Is there a problem with GCA-Pi01 and RPi2? I was a bit confused by this thread.

The LEDs/button doesn't work?
Can anyone confirm this?

Does GCA-Pi01 and Raspberry Pi 2 work as it should, LEDs and button?

rjversluis
Site Admin
Posts: 42306
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: Raspberry Pi 2: How to enable GPIO

Post by rjversluis » 02.06.2015, 12:13

Why not using the image I made for the Pi2?
GPIO: OK.
I2C: OK.

http://rocrail.net/software/rocrail-sna ... ezy.img.gz

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 02.06.2015, 12:24

Sure, but what has been done to this image, compared to Rasbian + Rocrail? Everything is the latest.
I haven't tested the GCA modules yet, only PSU for RPi.

I want to learn with this project, so I would like to set everything up from scratch, if possible.

But if I understand this thread right, the LEDs and button won't work on RPi2? But the rest does if you activate through raspi-config?

rjversluis
Site Admin
Posts: 42306
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: Raspberry Pi 2: How to enable GPIO

Post by rjversluis » 02.06.2015, 12:27

DIYglenn wrote: But if I understand this thread right, the LEDs and button won't work on RPi2? But the rest does if you activate through raspi-config?
It works alright otherwise I would not have provided an image.

I had todo an upgrade for GPIO to get it running:
http://forum.rocrail.net/viewtopic.php? ... 953#p86578

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 02.06.2015, 13:33

rjversluis wrote:
DIYglenn wrote: But if I understand this thread right, the LEDs and button won't work on RPi2? But the rest does if you activate through raspi-config?
It works alright otherwise I would not have provided an image.

I had todo an upgrade for GPIO to get it running:
http://forum.rocrail.net/viewtopic.php? ... 953#p86578
OK, excellent!

Which upgrade? Just a normal linux-update? :
sudo apt-get update && sudo apt-get upgrade
Mine is now at the latest, and I just ran raspi-config to enable I2C (which I guess is GPIO).

I still don't have any LED's working, but I don't have any I/O setup either, so I guess they are TX/RX signals?

rjversluis
Site Admin
Posts: 42306
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: Raspberry Pi 2: How to enable GPIO

Post by rjversluis » 02.06.2015, 13:39


Blackpixel83
Posts: 131
Joined: 21.02.2013, 15:43
Location: Montreal
Contact:

Re: Raspberry Pi 2: How to enable GPIO

Post by Blackpixel83 » 02.06.2015, 21:32

DIYglenn wrote:
Blackpixel83 wrote:So, do you thing guys I can use Rocview on rasp 2 B with a touch screen attached ?
I need only client.

Christophe.
You could use a normal Rasbian install with GUI?
Do you have the server elsewhere and want the RPi2 as a normal client, a normal PC?

The RPi2 is slow, but should work :)
Hello,

Ok. I speek for the club's layout, a large layout, we have something like 600 feet of double main line, and at the end it will have about 300 switchs. For now we use VSD220 touch screen with embended android to replace old style switching TCO panel. The problem is that screen are not easy to find and they are 21 or 22". So l'm looking for other solution, because we need more screens and smaller one... On the other hand we are customising the gfx so it is preferable to use rocview to have all the symbols.
So I want to test the Pi2. I will use only the panel, and yes i'm connecting to a server. For now it is a win7 box (dell serveur dual xeon, i think it is enouth :) )
But I will switch it to debian later.

Linux is always a pain, even if i know what i'm doing, anyway i have compile rocrail and rocview is working well (finaly). We are in 2015 and it still take a wile to install something on a linux box :evil: :wink:

I did not yet look at the command line to start rocview, but what i would love is that it start on a spécific panel with nothing else ! no tabs no menus, so user could not touch things. Rob ? :roll:

If you have a Facebook account

panels :
https://www.facebook.com/photo.php?fbid ... =3&theater
https://www.facebook.com/photo.php?fbid ... =3&theater
https://www.facebook.com/photo.php?fbid ... =3&theater
https://www.facebook.com/photo.php?fbid ... =3&theater
https://www.facebook.com/photo.php?fbid ... =3&theater
https://www.facebook.com/photo.php?fbid ... =3&theater

server :
https://www.facebook.com/photo.php?fbid ... =3&theater
https://www.facebook.com/photo.php?fbid ... =3&theater

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 03.06.2015, 10:24

Have I misunderstood here... Is RocNetNode NOT the rocrail server?

So I cannot use my RPi as server with GCA modules? I have to have a PC which is connected to a RPi with GCA?...
I don't understand, do I have to have TWO RPi2's to get this to work? One Rocrail server and one RocNetNode?

I have one RPi running, and seems to be saving the configs etc, but I don't understand how to connect the sensors from my GCA-modules. The GCA-Pi01 is connected and powering the RPi.

Pirat-Kapitan
Moderator
Posts: 5034
Joined: 06.02.2010, 15:46
Location: Rösrath bei Köln / Germany

Re: Raspberry Pi 2: How to enable GPIO

Post by Pirat-Kapitan » 03.06.2015, 10:37

DIYglenn wrote:Is RocNetNode NOT the rocrail server?
Yes, Rocrail and RocNetNode are different programms.
I recommend to read the Wiki and the postings in this forum before asking.

J.

DIYglenn
Posts: 102
Joined: 13.05.2015, 07:54

Re: Raspberry Pi 2: How to enable GPIO

Post by DIYglenn » 03.06.2015, 10:47

Sure, I've read it, but it's very hard to understand.

How do I run everything on ONE Raspberry Pi?
The solution in the wiki was to put a RJ45 plug which loops the connection, but how am I then going to access the RPi?

I can't find a guide on how to set up the RPi with GCA modules on the Wiki?

Post Reply

Return to “RocNetNode”