tessel / openwrt-tessel

OpenWrt build scripts and package feed for Tessel 2
Other
32 stars 14 forks source link

Adds default config for Access Point setup #31

Closed HipsterBrown closed 9 years ago

HipsterBrown commented 9 years ago

In tandem with this PR, this is the default config needed to enable an access point using the ap command from t2-cli. This does not include IP forwarding, which would allow Tessel to act as a router as well.

Reference Material:

Very open to feedback since this is yet untested (until I get home and flash my Tessel), and I'm very new to OpenWRT/networking concepts.

Update - 30/10/2015: After setting up this configuration on my Tessel, then running /etc/init.d/dnsmasq start and /etc/init.d/odhcpd restart, my computer was able to connect to the broadcasted and ping the IP address. The one caveat I'm still investigating is the need for Tessel to be connected to a wifi network as well. Not sure if this could be resolved by using a different network ID / ifname.

johnnyman727 commented 9 years ago

@kevinmehall it would be great if you could check out this PR as well.

@HipsterBrown this looks good to me but what's the plan for the /etc/init.d/dnsmasq start and /etc/init.d/odhcpd restart commands? I notice you don't call them from the CLI. Do you need to have them called upon boot?

HipsterBrown commented 9 years ago

@johnnyman727 I need to update the CLI PR to include those commands. I'm not sure how to start dnsmasq during bootup, or if I should at all. Should I try to restart and if there is an error, call start?

johnnyman727 commented 9 years ago

@HipsterBrown it looks like the dnsmasq process already runs on boot by default:

 1420 nobody     984 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf -k -x /va

Will you need to restart it after configuring the ap with the CLI?

HipsterBrown commented 9 years ago

@johnnyman727 Ah ok cool. I believe I do need to restart that and odhcpd as well when configuring ap settings.

johnnyman727 commented 9 years ago

@HipsterBrown gotcha! Well I think the best thing to do is to /etc/init.d/dnsmasq restart and /etc/init.d/odhcpd restart from the CLI after setting the credentials.

HipsterBrown commented 9 years ago

I removed the default encryption option under the wifi config because it was blocking access point creation by default. This should "just work" now.

johnnyman727 commented 9 years ago

I don't even know what the Travis CI check does. It may try to build the branch on a google cloud server but I think most people don't have access. I'll go ahead and merge. :+1: