Telnet Server test complete, thanks all
prof_braino
Posts: 4,313
EDIT: Test completed successful, thanks all
EDIT: telnet server is still up if you want to play with
EDIT: FORTH on the prop over the internet
test: telnet to
99 7 4 73 port 23
Test was to confirm it works on the internal network, and the external internet access.
Its not the spinneret, but it is a wiznet w5100 on the wiznet811mj which should be similar.
You should see a forth prompt, execute the word "words" to do a forth
dictionary dump, and execute other forth commands
ports 22 23 24 25 should also be running prompts on different cogs.
If the port is already occupied you won't be able to connect, but it times out after inactivity, so it should be available again in a couple minutes.
Thanks to those that posted, please play with this and post your result or PM me.
Thanks!
EDIT: telnet server is still up if you want to play with
EDIT: FORTH on the prop over the internet
test: telnet to
99 7 4 73 port 23
Test was to confirm it works on the internal network, and the external internet access.
Its not the spinneret, but it is a wiznet w5100 on the wiznet811mj which should be similar.
You should see a forth prompt, execute the word "words" to do a forth
dictionary dump, and execute other forth commands
ports 22 23 24 25 should also be running prompts on different cogs.
If the port is already occupied you won't be able to connect, but it times out after inactivity, so it should be available again in a couple minutes.
Thanks to those that posted, please play with this and post your result or PM me.
Thanks!
Comments
Connected to 99.7.4.73.
Escape character is '^]'.
braino PF v3.5c 20101104 22:38 1
Cog1 ok
braino PF v3.5c 20101004 22:38 1
cog 1 ok
cog 1 ok
No response for me.
then, after every Enter,
and, upon hitting ctrl-],
after which I typed q to quit the session.
-Phil
When you see Then you have the forth prompt, if you wish you can see the forth words with
etc.
It works!
So, how many clients are possible at one time? Maybe Bill should try again?
That is a LOT of defined words...
VERY COOL
Up to four sessions at once:
Port 22
Port 23
Port 24
Port 25
There seem to be several folks testing it, but the timer reboots after 2 minutes of inactivity, it it will clear old sessions and become available again.
If you have two running, lefts say Port 22 on cog0 and Port 25 on cog4,
you can enter from cog4
c" words" 0 cogx
This send the "words" command to the input area of cog0, and it begins executing.
Sure. But by convention "telnet" uses port 23. See this page for "well-known" server ports: http://www.iana.org/assignments/port-numbers ... of course nothing is wrong with re-purposing ports temporarily until the multi-threaded software can be written to allow N clients on port 23 the way it should be.
Good luck with forth - I'm not a user but I know it has a dedicated following.
So, does this violate some law or regulation if it uses other than port 23? I almost got in trouble when I started my first DNS server, it started assigning address for my internet provider instead of my internal network, apparently some touchy people get really mad about such small things.
Could you give me a hint about how to allow N clients on port 23? I thought I was lucky just to get one client one one port, I didn't know ports could be shared. Can this be among four users at four different IP addresses, or do they all have to go to the same IP address?
Hey, thanks for that; and good luck to the Bulgarians with their "Bulgarian". It also has a small but dedicated following; apparently it too is useful, on occasion. Personally, I'm not dedicated, just too lazy to learn another language.
MG117
I don't understand as well.
Only person that have Hive can try this test?
Trying 99.7.4.73...
Connected to 99.7.4.73.
Escape character is '^]'.
braino PF v3.5c 20101104 22:38 1
Cog1 ok
telnet> q
Connection closed.
sexiewasd@WASD:~$
Thanks! Coming from you, that's extra nice.
It's pretty much what's needed for a kernel on the prop. The assembler and disassembler, and the software logic analyzer, are added as extensions, but are added to individual cogs to keep the dictionary as small as possible.
Sorry I was unclear.
This is running on a Prop Demo Board.
Anything that can run a telnet client should be able to connect to it.
The Demo Board is running propforth 3.5 or 3.6 and with IPserver.f added.
This uses the wiznet811mj for ethernet, which is similar to the spinneret part that is coming out on Monday. The Hive configuration uses a different part for ethernet, and Sal has not done that implementation yet, he's still doing the multi-prop serial interface.
Please try to access the experiement using any telnet client you have avaialbe. I have used TeraTerm and windows Hyperterm successfully, and some of the others have use linux by the looks of it. Your linux should have no problems.
I was able to access a device in Vancouver from Chicago and define and execute words with no apparent difference in response time from the unit in my lab.
If you have trouble connecting, there could be somebody already connected; please try changing the port from 23 to 22, 24, or 25
In other languages where the "sockets" interface is used, the port is just a server connection ID starting point. Once the IP address is "bound" other not "well-known" ports (usually > 16000) are used to maintain the connection between the client/server in conjunction with the user's IP address. Of course a new thread would be required for each connection.
If I ever have a good reason to visit Bulgaria for an extended stay, I might invest significant effort to learn the language. Until then I'll be happy with all the others I already know or can easily learn that follow similar form without risking getting stuck in Bulgaria ;-)
No. On our own machine you can use whatever port numbers you like for anything. I guess there is the possibiliyt your network provider does not let all ports in to you though.
People will be a bit more touchy about DNS, if you start assigning addresses to your private machines that clash with those of the public internet or your ISP and then those private machines try to speak across the internet.
But then again I would have thought your ISPs routing would be smart enough to drop all such addresses.
I don't think you will get multiple connections to the same port unless your interface supports creating sockets, listening for connections and accepting those connections.
Jazzed, It is not necessary to use threads in order to make use of multiple socket connections. You can use select() in a loop to find out from which file descriptors you program needs to read data.
That's fine for a super simple case where resources can be hogged by users.
Giving a user their own pid/shell is a different story.
I just imagining one day logging into another of Humanoidos's "Towering Inferno" creations that has 1000 Prop IIs each with some hundreds of megabytes of SDRAM.
In which case PID becomes "Propeller ID":)
The software multi-tasking one a single cog could handle all sessions as separate threads, but that is more application level and might not make it on the task list for a while. At least until there is a specific need for it. Is "each telnet port on a separate thread" critical to some higher function?
Multiple threads (in software rather than hardware using separate cogs) might come up again in creating the web page server, but I don't know much about that either, it might also be a ways away.
Unless somebody wants to help on the web server part for the spinneret project? should i move this part of the conversation to the spinneret threads?
I think I like forth, but I don't know where to start.
What are the other cogs doing?
How deep is the stack?
Is there a way to get the calculation output and input in decimal?
Anybody have a similar thing using an ENC28J60?
Take Care,
Doug
ENC28J60 is on the Hive hardware, Sal has not gotten around to it since he's busy with multi-prop serial. But the Wiz811MJ code should work OK on the spineret, since they are both w5100, although we won't know till we receive the parts.
1) other tasks (terminals on other ports, serial comm, apps)
2) default is 32 elements, this is excessive, but there's plenty of room so why not
3) type in and tpye to change it back
posting forth references page per request
I opened a Terminal window in Mac OSX (Snow Leopard) and used 'telnet'
I closed the connection and reconnected right away and hung, unresponsive, at the 'braino' line. I escaped and closed the connection and waited 5 minutes and this time all OK again
Neat .... nice job
cheers ... BBR
That is so cool.
Was this telnet server written in spin?
So much with so little.
rich
It is like a forth evangelism tool.
I still havent gotten it do display in decimal though. Could you please supply a complete command line to add 8 and 9 and display it in decimal instead of hex?
If I could get it to do floating point decimal, I could use it as my calculator instead of bc.
Thanks,
Doug
decimal
8 9 + .
Numeric mode is then decimal until changed again.
The original "primitive" forth kernel (memory read, memory write, primitive dictionary structure) was written in spin. This was used to create the initial simple kernel. This was used to make a forth program that converts the forth code back into spin. The spin was used to define more forth which was used to define more spin, until the present kernel was reached.
Now PropForth.spin defines the full forth kernel. This is done so that the proptool can be used to resolve forward references. [Normally the forth kernel simply re-creates itself with no outside PC, OS, or programming language; but since its here and it works and its pretty good, we may as well take advantage of it]
This telnet server as well as all the rest of the propforth stuff was written in high level forth, and optimized into assembler using the forth assembler.
If you want to use and of the forth stuff with spin or catalina or propbasic (I think) you can call it as assembler routines, but the interface stuff is not standardized until version 4 in December.