diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs
index 5f18488a..11153dfd 100644
--- a/.settings/org.eclipse.cdt.core.prefs
+++ b/.settings/org.eclipse.cdt.core.prefs
@@ -1,6 +1,6 @@
eclipse.preferences.version=1
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/delimiter=;
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/operation=append
-environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/value=C\:\\Espressif\\xtensa-lx106-elf\\bin
+environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/value=C\:\\Espressif\\xtensa-lx106-elf\\bin;C\:\\MinGW\\bin;C\:\\MinGW\\msys\\1.0\\bin;C\:\\Python27
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/append=true
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/appendContributed=true
diff --git a/README.md b/README.md
index 2f90d8b2..87a4ce80 100644
--- a/README.md
+++ b/README.md
@@ -26,18 +26,19 @@ Tencent QQ group QQ群: 309957875
- add coap module
# Change log
+2015-01-18
+merge mqtt module to [new branch mqtt](https://github.com/nodemcu/nodemcu-firmware/tree/mqtt) from [https://github.com/tuanpmt/esp_mqtt](https://github.com/tuanpmt/esp_mqtt).
+merge spi module from iabdalkader:spi.
+fix #110,set local port to random in client mode.
+modify gpio.read to NOT set pin to input mode automatic.
+add PATH env with C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Python27 in eclipse project. resolve #103.
+
2015-01-08
fix net.socket:send() issue when multi sends are called.
*NOTE*: if data length is bigger than 1460, send next packet AFTER "sent" callback is called.
fix file.read() api, take 0xFF as a regular byte, not EOF.
pre_build/latest/nodemcu_512k_latest.bin is removed. use pre_build/latest/nodemcu_latest.bin instead.
-2015-01-07
-retrive more ram back.
-add api file.format() to rebuild file system.
-rename "NodeMcu" to "NodeMCU" in firmware.
-add some check for file system op.
-
[more change log](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#change_log)
[更多变更日志](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log)
diff --git a/app/include/user_config.h b/app/include/user_config.h
index 822287bc..6211f09a 100644
--- a/app/include/user_config.h
+++ b/app/include/user_config.h
@@ -7,7 +7,7 @@
#define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION "NodeMCU 0.9.5"
-#define BUILD_DATE "build 20150108"
+#define BUILD_DATE "build 20150118"
// #define FLASH_512K
// #define FLASH_1M
diff --git a/app/modules/net.c b/app/modules/net.c
index dba4fc7e..92514c9b 100644
--- a/app/modules/net.c
+++ b/app/modules/net.c
@@ -672,16 +672,20 @@ static int net_start( lua_State* L, const char* mt )
{
if(isserver)
pesp_conn->proto.tcp->local_port = port;
- else
+ else{
pesp_conn->proto.tcp->remote_port = port;
+ pesp_conn->proto.tcp->local_port = espconn_port();
+ }
NODE_DBG("TCP port is set: %d.\n", port);
}
else if (pesp_conn->type == ESPCONN_UDP)
{
if(isserver)
pesp_conn->proto.udp->local_port = port;
- else
+ else{
pesp_conn->proto.udp->remote_port = port;
+ pesp_conn->proto.udp->local_port = espconn_port();
+ }
NODE_DBG("UDP port is set: %d.\n", port);
}
diff --git a/app/platform/platform.c b/app/platform/platform.c
index c44fa013..8480a3bb 100644
--- a/app/platform/platform.c
+++ b/app/platform/platform.c
@@ -129,11 +129,11 @@ int platform_gpio_read( unsigned pin )
return -1;
if(pin == 0){
- gpio16_input_conf();
+ // gpio16_input_conf();
return 0x1 & gpio16_input_get();
}
- GPIO_DIS_OUTPUT(pin_num[pin]);
+ // GPIO_DIS_OUTPUT(pin_num[pin]);
return 0x1 & GPIO_INPUT_GET(GPIO_ID_PIN(pin_num[pin]));
}
diff --git a/pre_build/0.9.5/nodemcu_20150108.bin b/pre_build/0.9.5/nodemcu_20150108.bin
new file mode 100644
index 00000000..f72815c2
Binary files /dev/null and b/pre_build/0.9.5/nodemcu_20150108.bin differ
diff --git a/pre_build/0.9.5/nodemcu_latest.bin b/pre_build/0.9.5/nodemcu_latest.bin
index f72815c2..3fd92e0b 100644
Binary files a/pre_build/0.9.5/nodemcu_latest.bin and b/pre_build/0.9.5/nodemcu_latest.bin differ
diff --git a/pre_build/latest/nodemcu_latest.bin b/pre_build/latest/nodemcu_latest.bin
index f72815c2..3fd92e0b 100644
Binary files a/pre_build/latest/nodemcu_latest.bin and b/pre_build/latest/nodemcu_latest.bin differ