Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixing Basic_rBoot, Basic_Serial and Telnet_TCPServer_TCPClient #380

Closed
fvpalha opened this issue Oct 30, 2015 · 11 comments
Closed

Mixing Basic_rBoot, Basic_Serial and Telnet_TCPServer_TCPClient #380

fvpalha opened this issue Oct 30, 2015 · 11 comments
Labels

Comments

@fvpalha
Copy link

fvpalha commented Oct 30, 2015

Hi guys.

Currently my project have the ESP8266-transparent-bridge code as base.

I want develop an alternative TCP-Serial bridge with Sming, using the OTA feature of Basic_rBoot example.

I don't can use the Serial port to debug.

Someone have any tips to help me?

@alonewolfx2
Copy link
Member

you can use serial for debug. wat is your problem ? i saw your project. you need to look telnet example and basic rboot. just it. join us on gitter https://gitter.im/SmingHub/Sming

@AutomationD
Copy link
Contributor

This is something I'm looking for as well, if I'm understanding it correctly.

I've seen 2 so far
http://tuanpm.net/esp8266-opensouce-firmware-bridge-for-arduino-mcu/

Sent from my iPhone

On Oct 30, 2015, at 4:55 PM, Fernando Vilmar Palha notifications@github.com wrote:

Hi guys.

Currently my project have the ESP8266-transparent-bridge code as base.

I want develop an alternative TCP-Serial bridge with Sming, using the OTA feature of Basic_rBoot example.

I don't can use the Serial port to debug.

Someone have any tips to help me?


Reply to this email directly or view it on GitHub.

@hreintke
Copy link
Contributor

@fvpalha :
Do you want to say "technically I can use serial to debug but I can't because of the nature of my program" ?

If so, you can use the debug implementation shown in Telnet_TCPServer_TCPClient.

TelnetServer tnet;
tnet.setDebug(true);
tnet.listen(23);

debug then with :
Debug.printf(" ....");
If Telnet server is connected, it will go to telnet.

@hreintke
Copy link
Contributor

BTW : What do you mean with "Using the OTA feature of basic_rboot" ?

@fvpalha
Copy link
Author

fvpalha commented Oct 30, 2015

Thank you @hreintke .

That's exactly this. Debug with serial port do not can be used.

The OTA feature of Basic_rBoot example I need adding to my project.

I will try your tip, debug over telnet.

@fvpalha
Copy link
Author

fvpalha commented Oct 30, 2015

Thank you @kireevco but I want to use the Sming library.
I think a bridge TCP-UART example will be very usefull.

@fvpalha
Copy link
Author

fvpalha commented Oct 30, 2015

Thank you @alonewolfx2 I will go join on gitter.

@fvpalha
Copy link
Author

fvpalha commented Oct 30, 2015

My initial development based on Basic_rBoot example.

The "application.cpp" file:

#include <user_config.h>
#include <SmingCore/SmingCore.h>
#include <SmingCore/Network/TelnetServer.h>

// If you want, you can define WiFi settings globally in Eclipse Environment Variables
#ifndef WIFI_SSID
    #define WIFI_SSID "PleaseEnterSSID" // Put you SSID and Password here
    #define WIFI_PWD "PleaseEnterPass"
#endif

void init() {
    debugf("---> BEGIN <---");
    TelnetServer tnet;
    tnet.setDebug(true);
    tnet.listen(23);
    debugf("---> END <---");
}

That is the output on Serial port:

ÿr��ÿlœØrŸÿŒc�ân€�ˆà �Œ �‚ì�pŒ<Ž‚Ÿÿì8�’ßÇ’Üäl�p � ònnä�Ä;ònÄ’œä �Ž b�bl`�$`�þpònàƒÜ€ �à‚ÇÀl�€ �€ �€ b€�nâãnÀ$Ž’l�œ bÀľ~ònî�ÄÁŒŽÿl`�ü��Ü#‚nÀ$ŽŒl`�ä¸`rn|’’nÀ�Žà‚ÜÀl`��¹~�ÄÀ ���Ü#‚nÀ$ŽŒ �Œònnî�ÄÈl`��nnàÃÜ€ �àrÇ�âœ�� �€ �p �p’Ü<�„ß �€ bÀľ~ònî�ÄÁŒ�ÿl`�ü��Ü#‚nÀ�Žr����nrŽ’ß;�„À �â �r���rŸÛ’n€�Žà� �r��r��ŒbØ?ònä�ÄÜ�Ç<Œ�|l�ÿlbÀľbrÜ �ÜÄ‚œ�bÜÛbßØònß�Ø�’nà�nÜâbp~’n�#`�‚nà{ß°�„ÇIvì’Üä �ÿ �ŽŒ�ÿllÃ�nä’`�Ä�x�ÜÇ�nÀ$lnÄ’œä �ÿ �‚›Äùl�c`�‚nà;ß°�ÄÇ x�’Ü�b �ÿ Ž€ �r�ı’`�ľ ›nnä�Ä? x��nnßb � ÛäyN€Œœ8�ÜÇ�n�c`�cà ›nnä�nßòÜÿŒ|~’nÀ�Ž|l`�þr��+TCP connection
timeout updating: 70 -> 65535
DebugClass Instantiating
---> BEGIN <---
+TCP connection
timeout updating: 70 -> 65535
---> END <---
TCP connection closing
~TCP connection
mode : sta(18:fe:34:9f:d8:b1)
add if0
f 0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
pm open phy_2,type:2 0 0
cnt 

connected with dd-wrt, channel 6
dhcp client start...
ip:192.168.1.126,mask:255.255.255.0,gw:192.168.1.1

@hreintke
Copy link
Contributor

@fvpalha :
If you have not yet experienced with Sming and the TCP environment of that I suggest you start with the Telnet_TCPServer_TCPClient example.
In there you will see how to start tcpserver and telnetserver. And also experiment with debug to telnet.

Second step would then be to start implementing you tcp bridge functionality.
When that is working and finished, you can easily add the rboot functionality.

@fvpalha
Copy link
Author

fvpalha commented Oct 30, 2015

Thank you @hreintke . I will follow your tips, after I will share the example.

@hreintke
Copy link
Contributor

@fvpalha :
OK, if you have trouble with creating the appliaction just leave a question on gitter or forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants