-1

Examples

Example A:

It shows that the JSON is sent from Android and is received for NodeMCU

Example B and C:

It shows that the JSON can't be decoded

Example D:

Here It's sent a string and the example shows that the string is received

Example E:

This example shows that the string can't be converted to number

Example F:

This is shows the string is nil


I don't undestand what's wrong and I driving me mad. I have tried with Flask and Python and the same thing happens.

Cesar SC
  • 19
  • 7
  • Various issues with no single answer. However, you seem to be using a very old NodeMCU firmware (0.9.x?) because [`socket:send()`](http://nodemcu.readthedocs.io/en/master/en/modules/net/#netsocketsend) can no longer be called consecutively, was a "bug" in the Espressif SDK this ever worked. Furthermore, for JSON decoding there's a [CJSON module](http://nodemcu.readthedocs.io/en/master/en/modules/cjson/). I don't know how `tonumber ` behaves on integer vs. float firmware. – Marcel Stör Jun 07 '16 at 11:24
  • All examples pressing NODEMCU button, that It's btnd variable used in setOnClickListener. – Cesar SC Jun 07 '16 at 11:26
  • @Marcel Stor: I have flashed as It says here http://nodemcu.readthedocs.io/en/dev/en/flash/ in section "Upgrading from SDK 0.9.x Firmware" with NodeMCU flasher and the same fail. – Cesar SC Jun 07 '16 at 12:42

1 Answers1

0

I found a solution!!

Using sockets there are no problems. I hope this helps to other people.

Cesar SC
  • 19
  • 7