ESP8266 App works in Viewer but not stand alone in Cordoba

Ask, and ye shall receive.
kosmonout
Posts: 4
Joined: 22:03, 27 Jan 2016

ESP8266 App works in Viewer but not stand alone in Cordoba

Postby kosmonout » 22:14, 27 Jan 2016

Tried the ESP8266 demo in the Evo things viewer. It works there perfectly and I can remotely switch a led on and off.

Followed one to one the Cordova guide to setup the compilation environment.
I compiled the same code succesfully in Cordova and upload it to my Phone. After executing the app I got the connecting screen and try to connect to esp8266 (filled in the correct IP of course) and no succes. It stays in the connect screen and do not even time out on the netwerk connection (what happens in the viewer if the esp is not reachable).

What could be the problem?

Android version 5.1.1

alex
Posts: 92
Joined: 00:59, 19 Nov 2013

Re: ESP8266 App works in Viewer but not stand alone in Cordoba

Postby alex » 10:51, 28 Jan 2016

Hi!

In order to be successful, you'll need to add Chromium Socket TCP plugin in your build.

Code: Select all

cordova plugin add org.chromium.socket.tcp


Good luck!

kosmonout
Posts: 4
Joined: 22:03, 27 Jan 2016

Re: ESP8266 App works in Viewer but not stand alone in Cordoba

Postby kosmonout » 18:40, 28 Jan 2016

Hi Alex,

Thanks for your quick answer!!

Unfortunately I was not able to install the plugin. Installing other plugins like the vibration plugin worked flawless.

This is what I got as output:

Fetching plugin "org.chromium.socket.tcp" via plugin registry
Error: 404 Not Found: org.chromium.socket.tcp
at RegClient.<anonymous> (C:\Users\kosmonout\AppData\Roaming\npm\node_modules\cordova\node_modul
es\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\request.js:268:14)
at Request.self.callback (C:\Users\kosmonout\AppData\Roaming\npm\node_modules\cordova\node_modul
es\cordova-lib\node_modules\npm\node_modules\request\index.js:148:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (C:\Users\kosmonout\AppData\Roaming\npm\node_modules\cordova\node_modules
\cordova-lib\node_modules\npm\node_modules\request\index.js:876:14)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (C:\Users\kosmonout\AppData\Roaming\npm\node_modules\cordova\node
_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:827:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)


Do you have an alternative plugin?

Greetings,
Remco

alex
Posts: 92
Joined: 00:59, 19 Nov 2013

Re: ESP8266 App works in Viewer but not stand alone in Cordoba

Postby alex » 00:29, 29 Jan 2016

Sorry I got it wrong, it was "sockets", not "socket", my typo, so org.chromium.sockets.tcp

Source: https://developer.chrome.com/apps/sockets_tcp

Please have another go! BTW, here is a list of all the plugins pre-packaged inside the Viewer app:

Note that the JavaScript source files for the plugins are packaged into the Evothings Viewer app. You don't need to explicitly include these files in your HTML code, they are included automatically with cordova.js.

https://evothings.com/doc/studio/api-overview.html

Bluetooth
Evothings Bluetooth Low Energy (BLE) Plugin
Bluetooth Serial Plugin (available in Evothings Viewer for Android only)

Network plugins (WiFi connectivity)
chrome.system.network
chrome.socket (deprecated)
chrome.sockets.tcp
chrome.sockets.tcpServer
chrome.sockets.udp

Eddystone Beacons and iBeacon
Evothings Eddystone Plugin
Cordova iBeacon Plugin
Estimote Beacons and Nearables
Estimote Cordova Plugin
Background Notifications
Cordova Local Notification Plugin

Standard Cordova plugins
Battery Status
Camera
Console
Device
Device Motion (Accelerometer)
Device Orientation (Compass)
Dialogs
Geolocation
Globalization
InAppBrowser
Network Information (Connection)
Statusbar
Vibration
Legacy Whitelist

kosmonout
Posts: 4
Joined: 22:03, 27 Jan 2016

Re: ESP8266 App works in Viewer but not stand alone in Cordoba

Postby kosmonout » 19:38, 30 Jan 2016

Thanks it works now!


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 1 guest