{"id":5518,"date":"2014-02-14T10:41:05","date_gmt":"2014-02-14T16:41:05","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=5518"},"modified":"2014-02-14T10:44:26","modified_gmt":"2014-02-14T16:44:26","slug":"setting-wi-fi-access-point-with-an-mt100eocg-and-an-mtpcie-bluetoothwi-fi","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/products\/multiconnect-ocg\/multiconnect-ocg-e\/mt100eocg-with-pciedk\/setting-wi-fi-access-point-with-an-mt100eocg-and-an-mtpcie-bluetoothwi-fi\/","title":{"rendered":"Setting Wi-Fi Access Point with an MT100EOCG and an MTPCIE Bluetooth\/Wi-Fi"},"content":{"rendered":"<p>To setup a Wi-Fi access point with an MT100EOCG and an MTPCIE Bluetooth Wi-Fi device:<\/p>\n<ol>\n<li>Build <strong>corecdp-wifi-ap-image <\/strong>and flash it into the MT100EOCG.<\/li>\n<li>Edit <strong>\/etc\/udhcpd.conf <\/strong>to configure the dhcp server.<\/li>\n<li>Edit <strong>\/etc\/hostapd.conf <\/strong>to configure access point settings. Configure <strong>ssid=<name><\/strong> with the access point name. Save <strong>hostapd.conf<\/strong>.<\/li>\n<li>To start the access point, type ocg-wifi-ap.sh start <desired IP address of AP> on the MT100EOCG. For example:<br \/>\n<strong>ocg-wifi-ap.sh start 192.168.2.1<\/strong><\/li>\n<li>If you run a script like the example, the MT100EOCG acts as a cell router that allows Wi-Fi and Ethernet endpoints to access the Internet through EOCG\u2019s cellular PPP link. Uncomment the ppd call line for your device model.<\/li>\n<li>Create a wireless network connection on a remote computer and configure it to use DHCP to obtain IP and DNS addresses.<\/li>\n<li>Enable the wireless connection on the computer. Verify that your computer can communicate to the Internet using MT100EOCG as the access point.<\/li>\n<\/ol>\n<h4>Example Wi-Fi Access Point Script<\/h4>\n<pre class=\"brush:xml\">\r\n#!\/usr\/bin\/env bash\r\n\r\necho \"Updating DNS, ppp scripts\"\r\necho \"nameserver 8.8.8.8\" > \/etc\/resolv.conf\r\n\r\nkillall pppd && sleep 2\r\n\r\necho \"Starting pppd\"\r\n\r\n#uncomment line below if gsm radio (H5, etc)\r\n#pppd call gsm\r\n\r\n#uncomment line below if cdma radio (EV3,etc)\r\n#pppd call cdma\r\n\r\nsleep 4\r\necho \"Setting up iptables\"\r\n\r\n# Flush all the tables first\r\niptables -t filter -F\r\niptables -t nat -F\r\niptables -t mangle -F\r\niptables -t filter -P INPUT DROP\r\niptables -t filter -A INPUT -i lo -j ACCEPT\r\niptables -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT\r\n\r\n# accept all traffic from LAN\r\niptables -t filter -A INPUT -i eth0 -j ACCEPT\r\niptables -t filter -A INPUT -i wlan0 -j ACCEPT\r\niptables -t filter -P FORWARD DROP\r\niptables -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT\r\niptables -t filter -A FORWARD -i eth0 -o ppp0 -j ACCEPT\r\niptables -t filter -A FORWARD -i wlan0 -o ppp0 -j ACCEPT\r\niptables -t filter -P OUTPUT ACCEPT\r\niptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE\r\n\r\n# turn on packet forwarding last\r\necho 1 > \/proc\/sys\/net\/ipv4\/ip_forward\r\n\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To setup a Wi-Fi access point with an MT100EOCG and an MTPCIE Bluetooth Wi-Fi device: Build corecdp-wifi-ap-image and flash it into the MT100EOCG. Edit \/etc\/udhcpd.conf to configure the dhcp server. Edit \/etc\/hostapd.conf to configure access point settings. Configure ssid= with the access point name. Save hostapd.conf. To start the access point, type ocg-wifi-ap.sh start on [&hellip;]<\/p>\n","protected":false},"author":537,"featured_media":0,"parent":5489,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-5518","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/5518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/537"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=5518"}],"version-history":[{"count":5,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/5518\/revisions"}],"predecessor-version":[{"id":5526,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/5518\/revisions\/5526"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/5489"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=5518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}