Community discussions

MikroTik App
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

TR069 with GenieACS v1.2.7 (Step-by-Step)

Mon Feb 08, 2021 11:55 am

Dear all,

I would like to share the Step-by-Step of installing GenieACS v1.2.7 on Ubuntu 20.04 LTS under Windows 10 + VirtualBox
+ Download Ubuntu 20.04 Server from https://releases.ubuntu.com/20.04/ubunt ... -amd64.iso
+ Download latest version of VirtualBox from https://download.virtualbox.org/virtual ... 42-Win.exe

Install VirtualBox and follow the wizard.

Launch Virtual Box, click New
Name : GenieACS
Type : Linux
Version : Ubuntu (64-bit)
Memory Size : 2048MB
Hard disk : Create a virtual disk now
Hard disk file type : VDI / VrtualBox Disk Image
Storage on physical hard disk : Dymanically allocated
File location and size : 20GB

Click the newly created machine and click Settings.
Click Network and than Adapter 1. Make sure Enable Network Adapter checked and Attached to Bridged Adapter.
Click Storage, under click Empty under Controller: IDE, click the DVD image next to Optical Drive, choose Choose a Disk File and select the above Ubuntu Server Image.
Click OK, and than click Start (Green right arrow) and follow the installation instruction. Do not forget to install OpenSSH Server.

While the installation run, i make the static lease on MikroTik DHCP Server leased (in my case 192.168.28.8) so later i can open via browser and or ssh to that ip address.

Once the above Ubuntu installation done, please ssh (suggested using putty) into the newly created Ubuntu Server and do the following installation :

node.js
=======
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
node -v
The output will be
v.14.15.4


MongoDB
=======
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
The output will be
● OK

apt-key list
The output
● /etc/apt/trusted.gpg
--------------------
pub rsa4096 2019-05-28 [SC] [expires: 2024-05-26]
2069 1EEC 3521 6C63 CAF6 6CE1 6564 08E3 90CF B1F5
uid [ unknown] MongoDB 4.4 Release Signing Key <packaging@mongodb.com>
. . .

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt update
sudo apt install mongodb-org
sudo systemctl start mongod.service
sudo systemctl status mongod
Output
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2020-06-09 12:57:06 UTC; 2s ago
Docs: https://docs.mongodb.org/manual
Main PID: 37128 (mongod)
Memory: 64.8M
CGroup: /system.slice/mongod.service
└─37128 /usr/bin/mongod --config /etc/mongod.conf

sudo systemctl enable mongod

mongo --eval 'db.runCommand({ connectionStatus: 1 })'
Output
● MongoDB shell version v4.4.0
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("1dc7d67a-0af5-4394-b9c4-8a6db3ff7e64") }
MongoDB server version: 4.4.0
{
"authInfo" : {
"authenticatedUsers" : [ ],
"authenticatedUserRoles" : [ ]
},
"ok" : 1
}

sudo systemctl status mongod
sudo systemctl start mongod
sudo systemctl stop mongod
sudo systemctl restart mongod
sudo systemctl disabe mongod
sudo systemctl enable mongod
Make sure no errors when issue the above commands, otherwise the procedure have to be repeated again.


GenieACS:
=========
the instructions are on http://docs.genieacs.com/en/latest/inst ... l-genieacs

sudo npm install -g --unsafe-perm genieacs@1.2.7
sudo useradd --system --no-create-home --user-group genieacs

We’ll use /opt/genieacs/ext/ directory to store extension scripts (if any).
sudo su
mkdir /opt/genieacs
mkdir /opt/genieacs/ext
chown genieacs:genieacs /opt/genieacs/ext

create /opt/genieacs/genieacs.env with following content :
GENIEACS_CWMP_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-cwmp-access.log
GENIEACS_NBI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-nbi-access.log
GENIEACS_FS_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-fs-access.log
GENIEACS_UI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-ui-access.log
GENIEACS_DEBUG_FILE=/var/log/genieacs/genieacs-debug.yaml
GENIEACS_EXT_DIR=/opt/genieacs/ext
GENIEACS_UI_JWT_SECRET=secret

set the permission and ownership of /opt/genieacs/genieacs.env
sudo chown genieacs:genieacs /opt/genieacs/genieacs.env
sudo chmod 600 /opt/genieacs/genieacs.env

logs directory
mkdir /var/log/genieacs
chown genieacs:genieacs /var/log/genieacs

Create systemd unit files:

genieacs-cwmp
-------------
sudo systemctl edit --force --full genieacs-cwmp
[Unit]
Description=GenieACS CWMP
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-cwmp

[Install]
WantedBy=default.target

genieacs-nbi
------------
sudo systemctl edit --force --full genieacs-nbi
[Unit]
Description=GenieACS NBI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-nbi

[Install]
WantedBy=default.target

genieacs-fs
-----------
sudo systemctl edit --force --full genieacs-fs
[Unit]
Description=GenieACS FS
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-fs

[Install]
WantedBy=default.target

genieacs-ui
-----------
sudo systemctl edit --force --full genieacs-ui
[Unit]
Description=GenieACS UI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-ui

[Install]
WantedBy=default.target

logrotate
---------
create /etc/logrotate.d/genieacs with content :
/var/log/genieacs/*.log /var/log/genieacs/*.yaml {
    daily
    rotate 30
    compress
    delaycompress
    dateext
}

check all units and make sure no errors :
sudo systemctl enable genieacs-cwmp
sudo systemctl start genieacs-cwmp
sudo systemctl status genieacs-cwmp

sudo systemctl enable genieacs-nbi
sudo systemctl start genieacs-nbi
sudo systemctl status genieacs-nbi

sudo systemctl enable genieacs-fs
sudo systemctl start genieacs-fs
sudo systemctl status genieacs-fs

sudo systemctl enable genieacs-ui
sudo systemctl start genieacs-ui
sudo systemctl status genieacs-ui


Open GenieACS Server web (in my case http://192.168.28.8:3000) from any browser, for newly installation need to click ABRACADABRA than the system will create the first username admin/admin.

Please login using admin/admin and create another user under Admin tab.

To make MikroTik Devices to be well listed into GenieACS, you need to edit both Index Page and Device Page.

Both mentioned pages can be reached under Admin tab, Config and you will see Edit index page and Edit device page. Go to the link and change the contents to my codes.

My codes are as follow :

Index page:
- label: "'Serial number'"
  parameter: Device.DeviceInfo.SerialNumber
  type: "'device-link'"
  components:
    - type: "'parameter'"
- label: "'Identity'"
  parameter: Device.DeviceInfo.X_MIKROTIK_SystemIdentity
- label: "'Class'"
  parameter: Device.DeviceInfo.ProductClass
- label: "'Model'"
  parameter: Device.DeviceInfo.ModelName
- label: "'ROS'"
  parameter: Device.DeviceInfo.SoftwareVersion
- label: "'Uptime'"
  parameter: Device.DeviceInfo.UpTime
- label: "'Ether1 MAC'"
  parameter: Device.Ethernet.Interface.1.MACAddress
- label: "'DHCP Client IP'"
  parameter: Device.DHCPv4.Client.1.IPAddress
- label: "'IP'"
  parameter: Device.IP.Interface.1.IPv4Address.1.IPAddress
- label: "'WiFi 1'"
  parameter: Device.WiFi.AccessPoint.1.AssociatedDeviceNumberOfEntries
- label: "'WiFi 2'"
  parameter: Device.WiFi.AccessPoint.2.AssociatedDeviceNumberOfEntries
- label: "'DHCP'"
  parameter: Device.Hosts.HostNumberOfEntries
- element: "'span.inform'"
  label: "'Last inform'"
  parameter: DATE_STRING(Events.Inform)
  type: "'container'"
  components:
    - type: "'parameter'"
    - chart: "'online'"
      type: "'overview-dot'"
- label: "'Tags'"
  parameter: Tags
  type: "'tags'"
  unsortable: true
  writable: false

Device page:
- type: "'tags'"
- type: "'ping'"
- type: "'parameter-list'"
  parameters:
    - element: "'span.inform'"
      label: "'Last inform'"
      parameter: DATE_STRING(Events.Inform)
      type: "'container'"
      components:
        - type: "'parameter'"
        - chart: "'online'"
          type: "'overview-dot'"
        - type: "'summon-button'"
          parameters:
            - Device.DeviceInfo.X_MIKROTIK_SystemIdentity
            - Device.DeviceInfo.X_MIKROTIK_ArchName
            - Device.DeviceInfo.Description
            - Device.DeviceInfo.ManufacturerOUI
            - Device.DeviceInfo.HardwareVersion
            - Device.DeviceInfo.ProductClass
            - Device.DeviceInfo.ModelName
            - Device.DeviceInfo.SerialNumber
            - Device.Ethernet.Interface.1.MACAddress
            - Device.DeviceInfo.SoftwareVersion
            - Device.DeviceInfo.UpTime
            - Device.DHCPv4.Client.1.IPAddress
            - Device.IP.Interface.1.IPv4Address.1.IPAddress
            - Device.WiFi.SSID.1.SSID
            - Device.WiFi.SSID.2.SSID
            - Device.WiFi.SSID.1.MACAddress
            - Device.WiFi.SSID.2.MACAddress
            - Device.WiFi.AccessPoint.1.AssociatedDeviceNumberOfEntries
            - Device.WiFi.AccessPoint.2.AssociatedDeviceNumberOfEntries
            - Device.WiFi.AccessPoint.1.AssociatedDevice
            - Device.WiFi.AccessPoint.2.AssociatedDevice
            - Device.Hosts.Host
            - Device.Hosts.HostNumberOfEntries
            - Device.ManagementServer
    - label: "'Manufacturer'"
      parameter: DeviceID.Manufacturer
    - label: "'Hardware version'"
      parameter: Device.DeviceInfo.HardwareVersion
    - label: "'Product class'"
      parameter: Device.DeviceInfo.ProductClass
    - label: "'Model Name'"
      parameter: Device.DeviceInfo.ModelName
    - label: "'Serial number'"
      parameter: DeviceID.SerialNumber
    - label: "'Ethernet 1 MAC'"
      parameter: Device.Ethernet.Interface.1.MACAddress
    - label: "'Wireless 1 MAC'"
      parameter: Device.WiFi.SSID.1.MACAddress
    - label: "'Software version'"
      parameter: Device.DeviceInfo.SoftwareVersion
    - label: "'UP Time'"
      parameter: Device.DeviceInfo.UpTime
    - label: "'Identity'"
      parameter: Device.DeviceInfo.X_MIKROTIK_SystemIdentity
    - label: "'IP'"
      parameter: Device.IP.Interface.1.IPv4Address.1.IPAddress
    - label: "'WLAN1 SSID'"
      parameter: Device.WiFi.SSID.1.SSID
    - label: "'WLAN2 SSID'"
      parameter: Device.WiFi.SSID.2.SSID
- label: "'WLAN1 hosts'"
  parameter: Device.WiFi.AccessPoint.1.AssociatedDevice
  type: "'parameter-table'"
  childParameters:
    - label: "'MAC address'"
      parameter: MACAddress
    - label: "'Signal'"
      parameter: SignalStrength
    - label: "'SNR'"
      parameter: X_MIKROTIK_Stats.SignalToNoise
    - label: "'Tx Packet'"
      parameter: Stats.PacketsSent
    - label: "'Rx Packet'"
      parameter: Stats.PacketsReceived
    - label: "'Tx Byte'"
      parameter: Stats.BytesSent
    - label: "'Rx Byte'"
      parameter: Stats.BytesReceived
    - label: "'CCQ'"
      parameter: X_MIKROTIK_Stats.TxCCQ
    - label: "'Tx Frame'"
      parameter: X_MIKROTIK_Stats.TxFrames
    - label: "'Rx Frame'"
      parameter: X_MIKROTIK_Stats.RxFrames
    - label: "'HwTx Frame'"
      parameter: X_MIKROTIK_Stats.TxHwFrames
    - label: "'HwRx Frame'"
      parameter: X_MIKROTIK_Stats.RxHwFrames
    - label: "'Tx FrameByte'"
      parameter: X_MIKROTIK_Stats.TxFrameBytes
    - label: "'Rx FrameByte'"
      parameter: X_MIKROTIK_Stats.RxFrameBytes
    - label: "'HwTx FrameByte'"
      parameter: X_MIKROTIK_Stats.TxHwFrameBytes
    - label: "'HwRx FrameByte'"
      parameter: X_MIKROTIK_Stats.RxHwFrameBytes
- label: "'WLAN2 hosts'"
  parameter: Device.WiFi.AccessPoint.2.AssociatedDevice
  type: "'parameter-table'"
  childParameters:
    - label: "'MAC address'"
      parameter: MACAddress
    - label: "'Signal'"
      parameter: SignalStrength
    - label: "'SNR'"
      parameter: X_MIKROTIK_Stats.SignalToNoise
    - label: "'Tx Packet'"
      parameter: Stats.PacketsSent
    - label: "'Rx Packet'"
      parameter: Stats.PacketsReceived
    - label: "'Tx Byte'"
      parameter: Stats.BytesSent
    - label: "'Rx Byte'"
      parameter: Stats.BytesReceived
    - label: "'CCQ'"
      parameter: X_MIKROTIK_Stats.TxCCQ
    - label: "'Tx Frame'"
      parameter: X_MIKROTIK_Stats.TxFrames
    - label: "'Rx Frame'"
      parameter: X_MIKROTIK_Stats.RxFrames
    - label: "'HwTx Frame'"
      parameter: X_MIKROTIK_Stats.TxHwFrames
    - label: "'HwRx Frame'"
      parameter: X_MIKROTIK_Stats.RxHwFrames
    - label: "'Tx FrameByte'"
      parameter: X_MIKROTIK_Stats.TxFrameBytes
    - label: "'Rx FrameByte'"
      parameter: X_MIKROTIK_Stats.RxFrameBytes
    - label: "'HwTx FrameByte'"
      parameter: X_MIKROTIK_Stats.TxHwFrameBytes
    - label: "'HwRx FrameByte'"
      parameter: X_MIKROTIK_Stats.RxHwFrameBytes
- label: "'DHCPv4 hosts'"
  parameter: Device.Hosts.Host
  type: "'parameter-table'"
  childParameters:
    - label: "'IP address'"
      parameter: IPAddress
    - label: "'MAC address'"
      parameter: PhysAddress
    - label: "'Host name'"
      parameter: HostName
    - label: "'Interface'"
      parameter: Layer1Interface
- element: "'div'"
  type: "'container'"
  components:
    - element: "'h3'"
      type: "'container'"
      components:
        - "'Faults'"
    - type: "'device-faults'"
- element: "'div'"
  type: "'container'"
  components:
    - element: "'h3'"
      type: "'container'"
      components:
        - "'All parameters'"
    - type: "'all-parameters'"
- type: "'device-actions'"

Other configuration: cwmp.deviceOnlineThreshold = 10000 or more
this configuration need to be added if you experience the error message 'No contact from device' when Summon clicked.

as state on the wiki (https://wiki.mikrotik.com/wiki/Manual:TR069-client), MikroTik will accept the following file types from ACS, they are :
1 Firmware Upgrade Image
3 Vendor Configuration File
X MIKROTIK Factory Configuration File

Important notes:
on the Mikrotik Router, please issue the following command :
/tr069-client set acs-url=http://192.168.28.8:7547 enabled=yes periodic-inform-interval=5m
so the router will start the communication sessions to GenieACS.
Make sure GenieACS and the target router can be ping each other, and no firewall that will block the communication among them.

Example of use :
● upgrade MikroTik RoS and Firmware, please create the following files and upload them to genieacs with type 1 Firmware Upgrade Image

Files:
ros-smips-6.46.8.xml:
<upgrade version="1" type="links">
   <config/>
   <links>
      <link>
         <url>http://192.168.28.8:7567/advanced-tools-6.46.8-smips.npk</url>
      </link>
      <link>
         <url>http://192.168.28.8:7567/dhcp-6.46.8-smips.npk</url>
      </link>
      <link>
         <url>http://192.168.28.8:7567/ppp-6.46.8-smips.npk</url>
      </link>
      <link>
         <url>http://192.168.28.8:7567/security-6.46.8-smips.npk</url>
      </link>
      <link>
         <url>http://192.168.28.8:7567/system-6.46.8-smips.npk</url>
      </link>
      <link>
         <url>http://192.168.28.8:7567/tr069-client-6.46.8-smips.npk</url>
      </link>
      <link>
         <url>http://192.168.28.8:7567/wireless-6.46.8-smips.npk</url>
      </link>
   </links>
</upgrade>
note:
+ please include tr069-client-6.46.8-smips.npk package as well, otherwise you will loose the connection after upgrade.
+ please create another .xml for another architecture, such as mmips, mipsbe, ppc, tile, arm, etc.
+ please upload each individual .npk file mentioned on the above .xml files accordingly for each architecture used.
+ all files must with type 1 Firmware Upgrade Image

Create the following provisions:
ros-upgrade:
let version=declare("Device.DeviceInfo.SoftwareVersion",{value: 1}).value[0];
let archname=declare("Device.DeviceInfo.X_MIKROTIK_ArchName",{value: 1}).value[0];
log('Software version: '+archname+' - '+version);
if (version>="6.46.8") {
   log('No upgrade needed');
   declare("Tags.UPGRADED",null,{value: true});
} else {
   log('downloading Router OS files...');
   declare("Downloads.[FileType:1 Firmware Upgrade Image]", {path: 1}, {path: 1});
   declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName", {value: 1}, {value: "ros-"+archname+"-6.46.8.xml"});
   declare("Downloads.[FileType:1 Firmware Upgrade Image].Download", {value: 1}, {value: Date.now()});
   declare("Tags.UPGRADED",null,{value: true});
}

Let say you wanna upgrade the ROS version on the router hap mini with serial 1234567890
Create the following presets:
Name: router1-ros-upgrade
Events: 1 BOOT
Preconditon Device.DeviceInfo.SerialNumber = '1234567890'
Configurations Provision name: ros-upgrade

Power cycle the mentioned router – with serial number (1234567890) and the upgrade progress with be carried by GenieACS. Alternatively, you can disable and enable tr069-client on MikroTik router. When the ugprade finish, you will see UPGRADED under tags of index page.

● update current MikroTik configuration
Create any mikrotik script file and save it. Make sure the file has been tested with no errors.
If the file save with extention .alter than the script made will add the configuration on top of the existing configuration
If the file save with extention other than.alter (such as .rsc) than the script made will reset the router and load the configuration from the mentioned file.

Upload the created above files (.alter or other then .alter) to genieacs with type 3 Vendor Configuration File

To push the configuration, you can do Provisions and Presets like the previous example, or directly push the file under Device Tab.
This configuration will be loss when /system reset command issued.

● change the MikroTik default factory configuration
the file type X MIKROTIK Factory Configuration File will replace the default factory configuration.
As GenieACS v1.2.7 does not have an option to add X MIKROTIK Factory Configuration File type, than you can edit file app.js under /lib/node_modules/genieacs/public and add “X MIKROTIK Factory Configuration File” after “5 Ringer File” in 2 places, so it will become
“5 Ringer File”,“X MIKROTIK Factory Configuration File”
Refresh the browser and you will see the new type “X MIKROTIK Factory Configuration File” shown up.

Create the newly .rsc file, test it and make sure no errors. Than upload it into GenieACS with file type X MIKROTIK Factory Configuration File.

To push the configuration, you can do Provisions and Presets like the previous example, or directly push the file under Device Tab.
This configuration will be load on every /system reset command issued.

I will try to make the video on regards of this tutorial as soon as i have time.

Thank you

Paul Darius
Last edited by prawira on Wed Sep 29, 2021 4:48 am, edited 15 times in total.
 
Dude2048
Member Candidate
Member Candidate
Posts: 184
Joined: Thu Sep 01, 2016 4:04 pm

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Mon Feb 08, 2021 2:26 pm

Thanks. Will try it in a few days.
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Mon Mar 01, 2021 10:47 am

dear all,

genieacs launch version v1.2.4 since Feb 25th and than launch the version v1.2.5 on March 12th
as my lab, there are no major changes on the installation step-by step, unless the first command of genieacs installation from NPM.
sudo npm install -g genieacs@1.2.5
So just change the last number after @ become the recent version.

as file type X MIKROTIK Factory Configuration File does not come from genieacs as one of the file type, than we have two options to deal with this starting genieacs version 1.2.5
option 1: put "X MIKROTIK Factory Configuration File" manually as Type everytime you wanna to upload the mentioned file
option 2: edit app.js as mentioned earlier and put "X MIKROTIK Factory Configuration File" after the second "5 Ringer File", so :
before : "5 Ringer File"]}
after : "5 Ringer File","X MIKROTIK Factory Configuration File"]}
so you just select the last option (X MIKROTIK Factory Configuration File) everytime when upload this kind of file.

Paul
Last edited by prawira on Wed Sep 29, 2021 4:57 am, edited 4 times in total.
 
jcastellet
Trainer
Trainer
Posts: 1
Joined: Thu Mar 30, 2017 3:03 pm

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Wed Mar 10, 2021 10:40 am

For ros-upgrade you can use this version, which deals better with major/minor.
// Actualitza la version del RouterOS
log("->UPGRADE");

const new_major=6;
const new_minor=45;
const new_revision=9;

log("New version....: "+new_major+"."+new_minor+"."+new_revision);

let arch=declare("Device.DeviceInfo.X_MIKROTIK_ArchName",{value:1}).value[0];
log("Arch: "+arch);
let filename="upgrade-"+arch+"-"+new_major+"."+new_minor+"."+new_revision+".xml";

let str=declare("Device.DeviceInfo.SoftwareVersion",{value:1}).value[0];
log("Current version: "+str);

let version = str.split(".");
var cur_major=Number(version[0]);
var cur_minor=(version[1] !== undefined)?Number(version[1]):0;
var cur_revision=(version[2] !== undefined)?Number(version[2]):0;

var needupgrade=false;
var uptodate=false;
if (cur_major<new_major) {
   needupgrade=true;
} else if ( cur_major==new_major) {
  if (cur_minor<new_minor) {
    log ("minor diferente");
  } else if (cur_minor==new_minor) {
    if (cur_revision<new_revision) {
       needupgrade=true;
    } else { 
        uptodate=true;
      }
  }
}

declare("Tags.UPGRADE",null,{value:false});
if (!needupgrade) {
  log("No uprgrade needed.");
  if (uptodate)
    declare("Tags.UP_TO_DATE",null,{value:true});

} else {
  log("upgrading firmware");
  declare("Tags.UPGRADING",null,{value:true});
  declare("Downloads.[FileType:1 Firmware Upgrade Image]",{path:1},{path:1});
  declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName",{value:1},{value:filename});
  declare("Downloads.[FileType:1 Firmware Upgrade Image].Download",{value:1},{value: Date.now()});
}

log("<-UPGRADE");
Last edited by jcastellet on Tue Apr 20, 2021 11:14 pm, edited 1 time in total.
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Mon Mar 15, 2021 12:45 pm

dear jcastellet,

as your advice. as the new version (1.2.5) just issued, i will try to update my ros-upgrade file

Thank you

Paul
 
User avatar
loloski
Member Candidate
Member Candidate
Posts: 121
Joined: Mon Mar 15, 2021 9:10 pm

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Mon Mar 15, 2021 9:17 pm

It's working mostly but pushing X MIKROTIK Configuration File does not work for some reason. i can confirm that i was able to send the factory.rsc file to device
by seeing this verbose log starting session, events: [7 TRANSFER COMPLETE, M Download (178374c9fe80000), ]

but when i reset my device it doesn't work.

edit:

After countless hours of trouble shooting, I finally figure this out the actual file transmission was happening on port 7567/tcp and it was closed and i have to poke a hole in the firewall
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Fri Apr 23, 2021 12:32 pm

when clicked the status of devices does not real time, so need to clicked summoned to see the recent status; such as number of clients connected on both wlan1 & wlan2 and number of dhcp clients as well.

for the isp, we HAVE TO give write access (rather than read-only) to support so they can see real time status with summoned botton.

BUT, when write access given, the support team can do anythings including 'Reset' that means reset the device to factory setting.
to prevent this, than put this command [mutationType <> "task" OR mutation.name <> "factoryReset"] on Permission - Validate column rather than true.

I have tried this and all support team will not be able to execute the Reset function with message "Not Authorized"
 
tiran
newbie
Posts: 38
Joined: Fri Aug 07, 2015 2:53 pm

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Sat May 15, 2021 8:25 am

I am new to Genieacs and TR069, i have followed mikrotik and genieacs documents to install and use of genieacs. basic functions are working properly. but i need to upload X MIKROTIK Factory Configuration File. but when i upload file genieacs says "faultCode: "9003" faultString: Invalid arguments setParameterValuesFault: null" help me to resolve this issue. it is better anyone can post sample X MIKROTIK Factory Configuration File
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Sat May 15, 2021 11:37 am

before you decide to put one of .rsc become X MIKROTIK Factory Configuration File, make sure it imported to the target router with no error(s).
by uploading untested the .rsc as X MIKROTIK Factory Configuration File, the router with execute nothing with /system reset issued.
please consult the error into genieacs forum, perhaps you miss something during installation and or configuration.

according to our live genieacs server, the above step by step should be enough IF you get the same result.

regards
 
vytuz
newbie
Posts: 30
Joined: Mon Jul 31, 2017 3:12 pm

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Fri May 28, 2021 9:47 am

Where does genieacs push firmware files? To ram or to flash? I use 1.2.0 version and there are problem with 16mb devices, genieacs pushes files to flash (not enough free space). I can't find possibility to change it.
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Sun May 30, 2021 10:00 am

the files push to flash. see my presentation with title Most common mistake on MikroTik installation about how to free up the space on the router.
https://mum.mikrotik.com/2019/MY/agenda/EN

In sort, please use xtra package and upload only the necessary packages instead of bundle package as you will not use all the packages that have been bundled.

cheers
 
didis81
just joined
Posts: 10
Joined: Mon Apr 06, 2015 1:29 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Sun May 30, 2021 10:16 am

Thanks prawira really nice instructions
 
prawira
Trainer
Trainer
Topic Author
Posts: 341
Joined: Fri Feb 10, 2006 5:11 am

Re: TR069 with GenieACS v1.2.3 (Step-by-Step)

Wed Jun 09, 2021 5:11 am

dear jcastellet,

For ros-upgrade you can use this version, which deals better with major/minor.
i did try to upgrade my old hap mini (6.42.12) to 6.47.10 via genieacs using your provision script yesterday and it wont't run, the ros did not upgraded but the mentioned device got UP TO DATE flag. need couple hours for me to find out the problem source.

Here is my correction on regards of your provision script :
// Update the RouterOS version
log("->UPGRADE");

const new_major=6;
const new_minor=47;
const new_revision=10;

log("New version....: "+new_major+"."+new_minor+"."+new_revision);

let arch=declare("Device.DeviceInfo.X_MIKROTIK_ArchName",{value:1}).value[0];
log("Arch: "+arch);
let filename="ros-"+arch+"-"+new_major+"."+new_minor+"."+new_revision+".xml";

let str=declare("Device.DeviceInfo.SoftwareVersion",{value:1}).value[0];
log("Current version: "+str);

let version = str.split(".");
var cur_major=Number(version[0]);
var cur_minor=(version[1] !== undefined)?Number(version[1]):0;
var cur_revision=(version[2] !== undefined)?Number(version[2]):0;

var needupgrade=false;
var uptodate=false;
if (cur_major<new_major) {
   needupgrade=true;
} else if ( cur_major==new_major) {
  if (cur_minor<new_minor) {
    log ("minor different, need upgrade");
    needupgrade=true;
  } else if (cur_minor==new_minor) {
    if (cur_revision<new_revision) {
      log ("revision different, need upgrade");
      needupgrade=true;
    } else { 
        uptodate=true;
    }
  }
}

declare("Tags.UPGRADE",null,{value:false});
if (!needupgrade) {
  log("No uprgrade needed.");
  if (uptodate) {
    declare("Tags.UPGRADING",null,{value:false});
    declare("Tags.UPGRADED",null,{value:true});
  }
} else {
  log("upgrading firmware");
  declare("Tags.UPGRADING",null,{value:true});
  declare("Downloads.[FileType:1 Firmware Upgrade Image]",{path:1},{path:1});
  declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName",{value:1},{value:filename});
  declare("Downloads.[FileType:1 Firmware Upgrade Image].Download",{value:1},{value: Date.now()});
}

log("<-UPGRADE");
my .xml file names are ros-<arch>-<version>.xml
e.g ros-smips-6.47.10.xml

cheers

Who is online

Users browsing this forum: anetuser and 46 guests