Diff of /sdcard/lejosfs/home/root/lejos/bin/startwlan [000000] .. [dc022b] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/sdcard/lejosfs/home/root/lejos/bin/startwlan
@@ -0,0 +1,25 @@
+#! /bin/sh
+. /etc/default/lejos
+# We act as a server for USB and Bluetooth network connections. Bridge
+# both types of connections together and run dhcpd on them
+# get our network address
+LJBIN=${LEJOS_HOME}/bin
+NETADDRESS=`cat ${LJBIN}/netaddress`
+HOSTNAME=`hostname`
+# Now we start wlan
+# kill any existing processes
+killall wpa_supplicant udhcpc 2> /dev/null
+# start wpa_supplicant note must use the Lego version not the default system
+if [ -f ${LJBIN}/utils/wpa_supplicant.conf ];
+then
+  echo "using lejos config"
+  ${LMS2012_HOME}/sys/wpa_supplicant -B -Dwext -iwlan0 -c${LJBIN}/utils/wpa_supplicant.conf
+else
+  echo "using system default"
+  ${LMS2012_HOME}/sys/wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
+fi
+# get ip address etc.
+echo hostname is ${HOSTNAME}
+sleep 20
+exec udhcpc -i wlan0 -h ${HOSTNAME}
+