Hi,
for the autoprovsion where I need to write my credentials PPoE ,so that the CPE goes to get them?
Thank you in advance for the support
Hi,
for the autoprovsion where I need to write my credentials PPoE ,so that the CPE goes to get them?
Thank you in advance for the support
Yes, I have already take these 2 piece of code but then I have this fault:
NAME:
SyntaxError
MESSAGE:
Unexpected token < in JSON at position 0
STACK:
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at IncomingMessage. (/usr/lib/node_modules/genieacs/config/ext/cpe-config.js:35:31)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
Well, without seeing what data is actually being returned by what ever your cpe-config script is getting the data from none of us will be able to help you…
But where does the cpe-config data come from?
const API_URL = process.env.API_URL || 'https://your-host.com/api';
in place of ‘https://your-host.com/api’ what I need to put?
I do not know if I have explained myself well, but I would like to understand from where the cpe gets the pppoe credentials, where should I put them?
In order to get them and push them with my provision script
Thank you for your time
I have this fault :
{ uri: ‘https://0.0.0.0/api/ResetPPPoECreds?serial=48575443677B5B9E&productClass=EG8145V5&oui=00259E’,
serial: ‘48575443677B5B9E’ }
args
{ ‘0’:
{ Error: connect ECONNREFUSED 0.0.0.0:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
errno: ‘ECONNREFUSED’,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘0.0.0.0’,
port: 443 } }
Someone could kindly help me?
At this point, it appears you are just slinging together code bits you’ve found without understanding how to make all the pieces work together. This is not a good scenario. I’m all for helping people, but you need to have a foundation in how all the pieces of the puzzle work together.
I highly suggest you engage @zaidka and pay for commercial support.
I know… I’m so sorry for this but I’m only asking you like other people where is the problem because it isn’t so simple to learn in a few days how everything works, and at work they rush me and I am completely new to this environment. I was hoping for your help
At this point, what you need is more than help on a forum. You need paid, professional help. I do not have enough hours in the day currently to offer professional services. This is why its best to engage with @zaidka.
Ok, someone else could help me?
Thanks
The example scripts are nothing but mere examples to show you how to start to build your own auto-provisioning service. They are just a provisioning script executing the ext-script which by itself queries a website for the device’s credentials. It assumes that you know how to return a JSON object from a web-query of a script you built. IT isn’t always just copy & paste.
Ok guys, now my provision script works but I only would to kindly ask someone (if you don’t feel like it, I understand) how to get the configuration returned. Because the script does not return a config.
The config must be the JSON object you speak of?
ActionController::RoutingError (No route matches [GET] "/ResetPPPoECreds"):
actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:22:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.5) lib/rack/method_override.rb:22:in `call'
rack (2.0.5) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.5) lib/rack/sendfile.rb:111:in `call'
railties (5.2.1) lib/rails/engine.rb:524:in `call'
rack (2.0.5) lib/rack/urlmap.rb:68:in `block in call'
rack (2.0.5) lib/rack/urlmap.rb:53:in `each'
rack (2.0.5) lib/rack/urlmap.rb:53:in `call'
puma (3.12.0) lib/puma/configuration.rb:225:in `call'
puma (3.12.0) lib/puma/server.rb:658:in `handle_request'
puma (3.12.0) lib/puma/server.rb:472:in `process_client'
puma (3.12.0) lib/puma/server.rb:332:in `block in run'
puma (3.12.0) lib/puma/thread_pool.rb:133:in `block in spawn_thread'
2020-09-10T10:38:04.192Z [INFO] x.x.x.x 00259E-EG8145V5-48575443677B5B9E: Script: No config returned from API
Redirected to http://...devices/00259E-EG8145V5-48575443677B5B9E
Completed 302 Found in 1547ms (ActiveRecord: 0.0ms)
You haven’t gotten your provisioning script working. You have pointed it to the GenieACS web UI.
Yes, but now I tried to write a small JSON which I pass to my ext script.
My ext script is trivial :
function getConf(args, callback) {
let json = require('/.../config/ext/cpe-config.json')
console.log('Returning credentials to client', json);
return callback(null, json);
}
exports.getConf = getConf;
and now there is on the log:
Returning credentials to client { CustomerCode: { CodiceCliente: 4545645 },
Name: { Nome: 'boh' },
SerialNumber: { SerialNumber: '48575443677B5B9E' },
'PPPoE-Username': { username: 'jaid@fdni },
'PPPoE-Password': { password: 'iequ2Aizee' } }
Now there is something that works, or am I wrong?
the returned json structure is not match with the one which is referred by provisioning script.
I changed my json in something easier but I don’t know how filter by SerialNumber from the provision script for pushing the right pppoe