Telnet device #6719
Replies: 1 comment
-
Posted at 2016-08-05 by @gfwilliams Maybe, for whatever reason Something needs to be in there though, or every other platform will have a 'Telnet' symbol :) Posted at 2016-08-05 by JumJum Telnet exists in generated jswrapper.js, search in the file returns 24 times
require("Telnet") returns a variable which at least can be used for switching mode
Posted at 2016-08-05 by JumJum After changing wrapper part, there is an object Telnet1 now, similiar to Serial1
Posted at 2016-08-05 by @gfwilliams Hmm... Maybe there is a module or something else called 'Telnet' and that's causing some confusion for build_jswrapper? Posted at 2016-08-05 by JumJum There is a library called Telnet, see jswrap_telnet.c Posted at 2016-08-05 by tve Good idea about the Telnet1. So it looks like the problem is that the object has the same name as the class. Maybe the best it to rename the class. "TelNet"? "TNet"? "TelnetConsole"? Posted at 2016-08-05 by @gfwilliams If you just removed the:
that might fix it? I guess everything would be on the global object If that fixes it then it could possibly be fixed in Posted at 2016-08-05 by tve I renamed the class to TelnetConsole, but that didn't do the trick. I also noticed https://github.com/espruino/Espruino/blob/master/scripts/build_tern_json.js#L81-L82 which hopefully just affects docs generation? Edit: the renaming does work. Maybe "TelnetServer" is more appropriate, though. Posted at 2016-08-05 by tve I'm still stumped. What I'm trying to do is call I'm actually not sure that setting the console to Telnet works. I think it'll block once the buffer is full. If I do Posted at 2016-08-05 by tve Mhh, so it looks like something is not initialized properly at cold-boot on the esp8266. After a HW reset Posted at 2016-08-05 by tve I'm not seeing what is missing is the esp8266 init sequence to ensure that SerialX etc. are created at boot time. Gordon, can you shed some light on where these objects are created at boot time? Posted at 2016-08-12 by @gfwilliams The objects should be created 'on-demand' via jswrapper.c - after they're created, the function pointer inside them points to the constructor function for that object - and that is used by jswrapper to figure out what' inside them. All I can think is that the function pointer has changed somehow. I guess, most likely, you've saved some code and then updated the firmware without clearing out the area reserved for saved code? That'll have moved the function addresses around and will have broken the pointers. That's been a common thing all along... one of the reasons I've been pushing for all-in-one hex files that overwrite saved code. I guess you could change the hex file to write another |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-08-05 by tve
I'm a bit puzzled abouit the Telnet serial device. A static object is defined in https://github.com/espruino/Espruino/blob/master/src/jswrap_serial.c#L152-L160 but on the esp8266 I don't actually get that device.
Telnet
just doesn't exist. I can fortunately get to the device asrequire("Telnet").Telnet
. Why is that?Update: mhh, doesn't look like
require("Telnet")
does anything useful :-(Beta Was this translation helpful? Give feedback.
All reactions