Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Licensing an R-PI ?

2023-03-20
2023-03-21
  • kennymillar - 2023-03-20

    I've followed all the steps to set up the Rapberry PI Runtime on an R-PI.
    In Codesys v3.5 SP18 I can see my PI and "System Info" shows that all is well.

    Now I am trying to install the licence for the PI that I just bought.
    Folling the instructions online I bring up the licence manager, select Device, then Softcontainer. When the "Select Device" dialog appears, I cannot see my R-PI.

    I see one Gateway "Gateway-1" and when I click "Scan network" nothign is found.

    Yet, I can see my Raspberry PI in the "Raspberry PI" tab and "System Info" etc all return valid results.

    How can I find my device in "Licence manager" ?

     
  • eschwellinger

    eschwellinger - 2023-03-20

    Are you sure that the runtime is still up and running?
    check with ssh and 'top'.
    If so I would install the edge gateway on your PI and add this to CODESYS..as Gateway 2 and try to license that way.

     
  • kennymillar - 2023-03-21

    Thanks for your quick reply.
    Using TOP I think can see what is happening.
    The runtime starts when I use CODESYS on my WIndows PC to start it on the R-PI, but it only runs for a short while (about 35 seconds or so).

    I captured the system log on the PI during a full cylce (from pressing start in CODESYS to it terminating on the PI) which shows this:

    Mar 21 11:34:29 videopi sshd[8593]: Accepted publickey for kenny from 192.168.1.140 port 52664 ssh2: RSA SHA256:C5IrEO5dDzwORd/kGPoJH69xym0c35CTeQUUJmZggao
    Mar 21 11:34:29 videopi sshd[8593]: pam_unix(sshd:session): session opened for user kenny(uid=1000) by (uid=0)
    Mar 21 11:34:29 videopi systemd-logind[415]: New session 78 of user kenny.
    Mar 21 11:34:29 videopi systemd[1]: Started Session 78 of user kenny.
    Mar 21 11:34:30 videopi sudo[8604]:    kenny : PWD=/home/kenny ; USER=root ; COMMAND=/usr/bin/date
    Mar 21 11:34:30 videopi sudo[8604]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
    Mar 21 11:34:30 videopi sudo[8604]: pam_unix(sudo:session): session closed for user root
    Mar 21 11:34:30 videopi sudo[8607]:    kenny : PWD=/home/kenny ; USER=root ; COMMAND=/etc/init.d/codesyscontrol start
    Mar 21 11:34:30 videopi sudo[8607]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
    Mar 21 11:34:31 videopi sudo[8607]: pam_unix(sudo:session): session closed for user root
    Mar 21 11:34:31 videopi sshd[8599]: Received disconnect from 192.168.1.140 port 52664:11: Connection terminated by the client.
    Mar 21 11:34:31 videopi sshd[8599]: Disconnected from user kenny 192.168.1.140 port 52664
    Mar 21 11:34:31 videopi sshd[8593]: pam_unix(sshd:session): session closed for user kenny
    Mar 21 11:34:31 videopi systemd-logind[415]: Session 78 logged out. Waiting for processes to exit.
    Mar 21 11:35:07 videopi systemd[1]: session-78.scope: Succeeded.
    Mar 21 11:35:07 videopi systemd[1]: session-78.scope: Consumed 9.991s CPU time.
    Mar 21 11:35:07 videopi systemd-logind[415]: Removed session 78.
    

    The runtime gets stopped when the session gets cleaned up. Hmm.
    I'm not sure what's going on there. There's nothign else in the system log to indicate why the runtime won't stay running. I will try to see if I can start it manually on the PI.

    UPDATE Running /etc/init.d/controlsys start from a terminal has the same effect - it runs for just 30 seconds and exits. I'm try to find a log...

     

    Related

    Talk.ru: 1


    Last edit: kennymillar 2023-03-21
  • kennymillar - 2023-03-21

    The end of the /tmp/codesyscontro.log shows this:

    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0, CmpBACnet 1024 BACstack information
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   version = 15.0.1.1
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   __BYTE_ORDER = 1234
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   TARGET_IEEE_FP_FORMAT = 1
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   TARGET_FP_BIG_ENDIAN = 0
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   TARGET_DP_BIG_ENDIAN = 0
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   TARGET_INTEGRAL_BIG_ENDIAN = 0
    2023-03-21T11:51:38Z, 0x00000400, 1, 0, 0,   TARGET_USED_ALIGNMENT = 4
    2023-03-21T11:51:38Z, 0x00000007, 1, 0, 6, Network interface: <ipaddress>192.168.1.89</ipaddress>, subnetmask <subnetmask>255.255.255.0</subnetmask>
    2023-03-21T11:51:38Z, 0x00000018, 1, 0, 4, Network interface <interface>ether 1</interface> at router <instance>0</instance> registered
    2023-03-21T11:51:38Z, 0x00000007, 1, 0, 6, Network interface: <ipaddress>192.168.1.176</ipaddress>, subnetmask <subnetmask>255.255.255.0</subnetmask>
    2023-03-21T11:51:38Z, 0x00000018, 1, 0, 4, Network interface <interface>ether 2</interface> at router <instance>1</instance> registered
    2023-03-21T11:51:38Z, 0x00000009, 1, 0, 2, Running as network server
    2023-03-21T11:51:38Z, 0x00000009, 1, 0, 1, Running as network client
    2023-03-21T11:51:38Z, 0x0000000a, 1, 0, 0, <NumOfChannels>4</NumOfChannels> channels available, each of the size <BufferSize>100000</BufferSize> Bytes
    2023-03-21T11:51:38Z, 0x00000129, 1, 0, 0, Debug Messages not activated
    2023-03-21T11:51:38Z, 0x0000ff03, 1, 0, 0, Read connection settings...
    2023-03-21T11:51:38Z, 0x00000030, 1, 0, 6, Local network address: <ipaddress>192.168.1.89</ipaddress>
    2023-03-21T11:51:38Z, 0x00000018, 1, 0, 4, Network interface <interface>BlkDrvTcp</interface> at router <instance>2</instance> registered
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, No certificate for the OPC UA server available.
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, Security policy allows plain text communication. Secure communication is deactivated.
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, **************************************************************
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0,     OPC UA Server Started: 
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0,     Hostname: videopi, Port: 4840
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0,     URL: opc.tcp://videopi:4840
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0,     Loopbackadapter activated.
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0,     All available networkadapters are used.
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, **************************************************************
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, Provider 'CODESYS_DefaultProvider' (version 0x3051200) registered at the OPC UA server.
    2023-03-21T11:51:38Z, 0x000000a6, 1, 0, 0, Not able to read file of Run/Stop switch. Functionality of component disabled
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 0, =========================================================================
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 4, CODESYS Control for Raspberry Pi SL
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 4, OS=Linux, CPU=ARM, Arch=32Bit, Coding=C
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 6, <version>3.5.18.40</version> <builddate>Jan 23 2023</builddate>
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 5, Copyright CODESYS Development GmbH
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 0, =========================================================================
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, Provider 'AddressSpaceFragment Provider' (version 0x305121e) registered at the OPC UA server.
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, Provider 'OPC UA for IEC-61131-3' (version 0x305121e) registered at the OPC UA server.
    2023-03-21T11:51:38Z, 0x00000124, 1, 0, 0, Provider 'AlarmManager' (version 0x305121e) registered at the OPC UA server.
    2023-03-21T11:51:38Z, 0x00000018, 1, 0, 1, Setting router <instance>0</instance> address to <address>(0059)</address>
    2023-03-21T11:51:38Z, 0x00000018, 1, 0, 1, Setting router <instance>1</instance> address to <address>(00b0)</address>
    2023-03-21T11:51:38Z, 0x00000018, 1, 0, 1, Setting router <instance>2</instance> address to <address>(2ddc:c0a8:0159)</address>
    2023-03-21T11:51:38Z, 0x00000001, 1, 0, 34, CODESYS Control ready
    2023-03-21T11:51:38Z, 0x00000001, 2, 0, 0, !!!! Warning: no runtime license - running in demo mode(~2 hours)
    

    But still stops after jusyt 30 seconds.
    I have rebooted the R-PI and get the same results.
    Something is causing the runtime to terminate after just 30 seconds. Not sure what :-(

     
  • kennymillar - 2023-03-21

    I finally figured it out - the current R-PI Runtime isn't compatible with the latest Raspbian build. I got this working by downloading the Legacy build of raspbian and skipping the upgrade step. Now it works and I have the device licenced.

     

Log in to post a comment.