Skip to content

Commit

Permalink
Merge pull request #22 from CreatorKit/dev
Browse files Browse the repository at this point in the history
Merge dev to master
  • Loading branch information
nikhil-zinjurde-imgtec authored Jul 7, 2016
2 parents 9977d03 + 979e2bf commit 525b9df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ If there is no ethernet connected, you can also use the SoftAp to onboard the de
- It should connect to the selected wireless network.

### Outstanding issues
- WiFi MAC address is hardcoded to 00:11:22:33:44:55.
- SoftAp is always active even after connecting to WiFi network.
8 changes: 8 additions & 0 deletions src/cgi-bin/connection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ function configure_network(network, encryption, key)
else
uci.delete("wireless", "sta", "key")
end
os.execute(". /usr/bin/get_mac.sh 0")
local file = io.open("/tmp/MAC", "r")
if not file then
return 1
end
local mac_address = file:read "*a"
file:close()
uci.set("wireless", "sta", "macaddr", mac_address)
uci.save("wireless")
uci.commit("wireless")
end
Expand Down

0 comments on commit 525b9df

Please sign in to comment.