You must download/create those yourself
There is currently vsftpd built into this, but it's not working just yet. Having it there doesn't effect the usage of this.
To set up on stock Raspbian:
- sudo git clone https://github.com/brodyck/ata-provserver-rpi.git
- sudo ./update-docker
- Get the cfg.xml and firmware and put them in the root-www folder
- for my purposes, I run
sudo ./get-provfiles
which gets them from a private repo only I can access
- for my purposes, I run
- sudo ./ata-provserver enable # Enables the service on boot of RPi
- sudo ./ata-provserver start (or reboot)
To use:
- Plug RPi into power
- Plug ATAs into power
- Factory reset ATAs (if they are being reused)
- Plug ATAs into RPi, preferably by network switch for bulk
- Wait
- Done
What happens:
0. Assuming the ‘cfg.xml’ file has this in it:
<P192>whatever.ca/prov</P192>
<P237>whatever.ca/prov</P237>
<P212>2</P212> # this is for HTTPS; 1 is for HTTP
- (at boot) Two Docker services start up; ISC-DHCP and Lighttpd
- DHCP leases IP to ATA
- Lease includes DHCP option 160, which is a captive portal that overrides the default config server and points to http://192.168.20.1/gs
- ATA asks for firmware from http://192.168.20.1/gs
- If the firmware is newer, ATA flashes some lights to show it's upgrading; this takes a minute or so
- ATA asks for cfg.xml from http://192.168.20.1/gs
- This is what sets the config server path to whatever.ca/prov
- Ends with 'Power' & 'Internet', on 80xs, additionally 'Link/Act' on 70xs
- Once ATA is plugged into a customer modem, it checks https://whatever.ca/prov and does whatever needs to be done
Note: Assumes you're in the default /home directory of a stock Raspbian installation, /home/pi.
Uses these two programs within docker:
- ISC-DHCP server that has a custom option 160 set up for grandstreams HT70x/HT80x to provision/update over HTTP.
- The HTTP server is lighttpd.
Some notes/articles here: https://github.com/brodyck/ata-provserver/tree/master/isc-dhcpd
Explenation of DHCP options from Grandstream here: http://www.grandstream.com/sites/default/files/Resources/DHCP_Options_Guide_Linux_0.pdf
todo:
- FTP service for editing configs remotely
- possible option for auto-updating files in www-root/gs/ folder
Should work out of the box after installing docker & docker compose on Raspbian for the Raspberry Pi, and on anything else so long as the init-system and paths line up in the scripts.
At the time of this writing, only working docker-compose is through PIP, so that's why it's included in the 'update-docker' script.