Skip to content

Golang tool to configure the Barco CX-20 station in one click. The CX-20 connect wireless to existing huddle room camera, speakerphones and audio peripherals, saving time and maximizing efficiency.

License

Notifications You must be signed in to change notification settings

Maxoulfou/CX-20-speed-config

Repository files navigation


Logo Barco
CX-20-speed-config
Build status

A tool to configure fastly Barco CX-20 station. It's free and open-source.


Table of Contents

  1. Configuration
    1. config.json
    2. env.yml
  2. Structures
  3. Routes
  4. Auth

Configuration

In this project, so far, I have decided to include two configuration files. One that will be used to define the environments we are in.

The other one will be used to define the basic information of the CX-20 station and the parameters to be applied to it, like for example, the welcome message, the localization or the language...

config.json

File to define the values to be injected into the station, as well as its basic information

The network section is only dedicated to the information for the good progress of the operations. There is no data in this file that will be applied to the station.

The sections just below are dedicated to the configuration to be applied to the station. Here they are:

  • Personalization
    • OnScreenID
    • Wallpaper
  • WifiNetwork
    • LanSettings
      • LanHostName
      • PrimaryInterface
    • Services
    • WirelessNetwork

env.yml

File to define the values of the current environment

File content :

env: "env-type"
log: "log-method"
api-url: "http://192.168.1.1:4003/v2"
# ---
api-user: "user"
api-password: "password"
# ---
api-token: "tokentoken"

env: valid options :

  • debug
  • test
  • pre-prod
  • prod
  • alpha
  • beta

log: valid options :

  • all-in-one : all log level in same file
  • separated : each log level separate by dedicated file

Structures

The structure below may not change, or there may be only additional possibilities

type YmlConfig struct {
	Env          string  `yaml:"env"`
	Log          string  `yaml:"log"`
	ApiUrl       string  `yaml:"api-url"`
	ApiUser      string  `yaml:"api-user"`
	ApiPassword  string  `yaml:"api-password"`
	ApiToken     string  `yaml:"api-token"`
}

The following structure may change in the future

type Barco struct {
	Network struct {
		IP         string
		SubnetMask string
		Gateway    string
	}
	Personalisation struct {
		OnScreenID struct {
			Language           string
			MeetingRoomName    string
			Location           string
			WelcomeMessage     string
			ShowNetworkInfo    bool
			EnableThreaterMode bool
		}
		Wallpaper struct {
			Number int
		}
	}
	WifiNetwork struct {
		LanSettings struct {
			LanHostName struct {
				Hostname string
			}
			PrimaryInterface struct {
				Method                     string
				PrimaryInterfaceIP         string
				PrimaryInterfaceSubnetMask string
				PrimaryInterfaceGateway    string
				PrimaryInterfaceDnsServer  string
			}
		}
		Services struct {
			ShareViaAirPlay    bool
			ShareViaGoogleCast bool
		}
		WirelessNetwork struct {
			SsidName     string
			Wpa2Password string
		}
	}
}

Routes

Not coded at this time

Auth

For authentication, it will be enough to enter either the user and the password, or to encode the user and the password in base64 with the following formatting: "user:password"

I strongly recommend using the following code: req.Header.Add("Authorization", Auth) with Auth as the environment variable that contains the token. Refer to the line above

LineCounter benchmark -> it would be deleted

/*
	BenchmarkBuffioScan   500      6408963 ns/op     4208 B/op    2 allocs/op
	BenchmarkBytesCount   500      4323397 ns/op     8200 B/op    1 allocs/op
	BenchmarkBytes32k     500      3650818 ns/op     65545 B/op   1 allocs/op
*/

About

Golang tool to configure the Barco CX-20 station in one click. The CX-20 connect wireless to existing huddle room camera, speakerphones and audio peripherals, saving time and maximizing efficiency.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages