|
Forum Index : Microcontroller and PC projects : TCP/IP stack for CMM2
| Author | Message | ||||
| alynna Newbie Joined: 05/10/2021 Location: United StatesPosts: 28 |
So I just want to make a small note that I am working on a new project altogether (though I am keeping my mm.info(mem) enhancement in my own firmware, i'll still submit it if there is any desire for it to exist in the mainline) I have an ESP8266 and I am flashing the SLIP router firmware onto it (like I have used for the original MiST and other projects) and I intend to write an actual TCP/IP stack for it in BASIC. I've actually already started it. Right now the following features are planned: At least 1000000 bps speed (100k/s) (Looking at how fast I can actually get it to go, using LONGSTRING for my buffers) Listening sockets with auto port forward from ESP8266 Interrupts for notification of new packet arrivals CONF8266.INC: Router firmware configuration library CONF8266.BAS: Router firmware configuration program MMIP.INC: Raw IPv4 stack MMIPV6.INC: Raw IPv6 stack (Not definite yet) TCP.INC: Full TCP implementation UDP.INC: Full UDP implementation DNS.INC: DNS client library with forward/reverse resolve, DNS record type support FTP.INC: FTP client library (Passive mode only) HTTP.INC: HTTP client library (1.0/1.1) FTP.BAS: FTP client and server (using the library) HTTP.BAS: Basic HTTP client (using the library) TELNET.BAS: Telnet client IRC.BAS: Basic IRC client More details will be coming as I code it. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10611 |
Sounds a really interesting project. On the port I did for the Raspberry Pi (now defunct) I wrote some code that allowed MMbasic variables to automatically populate html and had support for TCP and UDP Feel free to use/abuse the ideas as you wish. More info in the manual for MMbasic on the PI-Cromite Pi-cromite Manual.zip |
||||
| alynna Newbie Joined: 05/10/2021 Location: United StatesPosts: 28 |
Will do :) Is it possible to create a sub or function that will accept a string that is not quoted as an argument, such as if I wanted to have like: TCP CLOSE 1 instead of something like TCP "CLOSE 1" or TCP "CLOSE",1 How could I do this with a SUB? So far I have been considering the syntax using periods as function indicators: socket = TCP.OPEN(RESOLVE("www.google.com","A"),80) do print TCP.READ(socket) loop until TCP.Closed(socket) TCP.CLOSE socket And stuff like this. But i'd rather use like, "TCP CLOSE socket" and other forms of this. |
||||
| alynna Newbie Joined: 05/10/2021 Location: United StatesPosts: 28 |
Ever consider a port of this to CircleLib? https://github.com/rsta2/circle It'd be alot nicer to see such a thing running on bare hardware and it avoids having Raspbian breaking your code too. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10611 |
Not as such but you can make CLOSE a constant and use a top level subroutine TCP. Except of course CLOSE and OPEN are reserved words so it would have to be something like const T_CLOSE=1 CONST T_OPEN=2 SUB TCP mode as integer, otherparams.... select case mode |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |