Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Last yeer I kudn't spel Engineer. Now I are won.


devel / comp.lang.forth / An IP stack on the Raspberry Pi Pico W in Forth

SubjectAuthor
* An IP stack on the Raspberry Pi Pico W in ForthTravis Bemann
`- Re: An IP stack on the Raspberry Pi Pico W in ForthHowerd

1
An IP stack on the Raspberry Pi Pico W in Forth

<4f8b6771-45e0-414b-9660-625de83839ean@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24776&group=comp.lang.forth#24776

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:1452:b0:417:b53c:5d4c with SMTP id v18-20020a05622a145200b00417b53c5d4cmr190905qtx.1.1696211657411;
Sun, 01 Oct 2023 18:54:17 -0700 (PDT)
X-Received: by 2002:a05:6808:1520:b0:3ae:61f:335e with SMTP id
u32-20020a056808152000b003ae061f335emr5061260oiw.5.1696211657122; Sun, 01 Oct
2023 18:54:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 1 Oct 2023 18:54:16 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:7990:24e0:1746:a593:1a9b:8d9e;
posting-account=Crnq4woAAABK99A43gBY5KlP3EUyAJAK
NNTP-Posting-Host: 2600:1700:7990:24e0:1746:a593:1a9b:8d9e
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4f8b6771-45e0-414b-9660-625de83839ean@googlegroups.com>
Subject: An IP stack on the Raspberry Pi Pico W in Forth
From: tabemann@gmail.com (Travis Bemann)
Injection-Date: Mon, 02 Oct 2023 01:54:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Travis Bemann - Mon, 2 Oct 2023 01:54 UTC

Just in case anyone is interested, I have a working IP stack, which I call "zeptoIP" as it runs on zeptoforth, implemented in Forth for the Raspberry Pi Pico W. It makes use of the CYW43439 WiFi chip on the board. Aside from a the CYW43439 firmware and a tiny bit of code written in assembly (namely byte order-switching operations) it is written entirely in Forth (even if it uses an OO layer which, despite being written in Forth itself, may not be all too Forthy, and even though it severely abuses local variables). It does make heavy use of multitasking operations provided by zeptoforth, so it is strictly unportable without significant modification.

Note that for legal reasons (i.e. non-free code) it is up to the user to upload the firmware, which is distributed separately from zeptoforth, for the CYW43439 to their Pico W and then load the CYW43439 driver (note that it is not derivative of Damien George's non-free CYW43439 driver) and zeptoIP on top of it.

In case you are wondering, it does not follow the typical BSD socket model from an API standpoint. Rather one receives pending "endpoints", for lack of a better term (I do not call them "connections" because they also include listening for UDP packets), with state or data changes, processes it (whether immediately or by storing the data into buffers for later handling), and then declares the endpoints "done". There is no need to copy the data into a separate buffer, whereas using a BSD socket model would inherently involve maintaining separate buffers to copy data into.

Currently the code is in a beta state, so it is not in the master branch of zeptoforth but rather in the devel branch. You can find a guide to the installation and use of zeptoIP at:

https://github.com/tabemann/zeptoforth/blob/devel/BUILDING_AND_USING_ZEPTOIP.md

Also, for some example programs, you can find a very rudimentary HTTP server using zeptoIP at:

https://github.com/tabemann/zeptoforth/blob/devel/test/rp2040/pico_w_net_http_led.fs

and a (warning - very insecure) TCP console server using zeptoIP at:

https://github.com/tabemann/zeptoforth/blob/devel/test/rp2040/pico_w_net_repl_notify.fs

Warning - there appear to be a few glitches in it - connections do not seem to always be correctly closed, for whatever reason.

Hope you find this useful or interesting,

Travis

Re: An IP stack on the Raspberry Pi Pico W in Forth

<2eec4e42-9424-44d7-b26f-0a601c67bef0n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24788&group=comp.lang.forth#24788

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:882:b0:76e:f686:cac6 with SMTP id b2-20020a05620a088200b0076ef686cac6mr159861qka.8.1696272425809;
Mon, 02 Oct 2023 11:47:05 -0700 (PDT)
X-Received: by 2002:a05:6870:3a18:b0:1dd:39ce:e252 with SMTP id
du24-20020a0568703a1800b001dd39cee252mr5138933oab.0.1696272425457; Mon, 02
Oct 2023 11:47:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 2 Oct 2023 11:47:04 -0700 (PDT)
In-Reply-To: <4f8b6771-45e0-414b-9660-625de83839ean@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:c22:b945:fd00:e0d0:aebf:d5ca:f43b;
posting-account=o1zNBwoAAABP2KiH5g6nPQp_sYWidVdt
NNTP-Posting-Host: 2a01:c22:b945:fd00:e0d0:aebf:d5ca:f43b
References: <4f8b6771-45e0-414b-9660-625de83839ean@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2eec4e42-9424-44d7-b26f-0a601c67bef0n@googlegroups.com>
Subject: Re: An IP stack on the Raspberry Pi Pico W in Forth
From: howerdo@yahoo.co.uk (Howerd)
Injection-Date: Mon, 02 Oct 2023 18:47:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3970
 by: Howerd - Mon, 2 Oct 2023 18:47 UTC

On Monday, October 2, 2023 at 3:54:18 AM UTC+2, Travis Bemann wrote:
> Just in case anyone is interested, I have a working IP stack, which I call "zeptoIP" as it runs on zeptoforth, implemented in Forth for the Raspberry Pi Pico W. It makes use of the CYW43439 WiFi chip on the board. Aside from a the CYW43439 firmware and a tiny bit of code written in assembly (namely byte order-switching operations) it is written entirely in Forth (even if it uses an OO layer which, despite being written in Forth itself, may not be all too Forthy, and even though it severely abuses local variables). It does make heavy use of multitasking operations provided by zeptoforth, so it is strictly unportable without significant modification.
>
> Note that for legal reasons (i.e. non-free code) it is up to the user to upload the firmware, which is distributed separately from zeptoforth, for the CYW43439 to their Pico W and then load the CYW43439 driver (note that it is not derivative of Damien George's non-free CYW43439 driver) and zeptoIP on top of it.
>
> In case you are wondering, it does not follow the typical BSD socket model from an API standpoint. Rather one receives pending "endpoints", for lack of a better term (I do not call them "connections" because they also include listening for UDP packets), with state or data changes, processes it (whether immediately or by storing the data into buffers for later handling), and then declares the endpoints "done". There is no need to copy the data into a separate buffer, whereas using a BSD socket model would inherently involve maintaining separate buffers to copy data into.
>
> Currently the code is in a beta state, so it is not in the master branch of zeptoforth but rather in the devel branch. You can find a guide to the installation and use of zeptoIP at:
>
> https://github.com/tabemann/zeptoforth/blob/devel/BUILDING_AND_USING_ZEPTOIP.md
>
> Also, for some example programs, you can find a very rudimentary HTTP server using zeptoIP at:
>
> https://github.com/tabemann/zeptoforth/blob/devel/test/rp2040/pico_w_net_http_led.fs
>
> and a (warning - very insecure) TCP console server using zeptoIP at:
>
> https://github.com/tabemann/zeptoforth/blob/devel/test/rp2040/pico_w_net_repl_notify.fs
>
> Warning - there appear to be a few glitches in it - connections do not seem to always be correctly closed, for whatever reason.
>
> Hope you find this useful or interesting,
>
> Travis
Hi Travis,

Nice work! I will download it and take a look, when I have a free minute or two :-)

Cheers,
Howerd

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor