Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #2104 > unrolled thread

Marina now Uthernet II compatible - January 2016 edition released

Started byD Finnigan <dog_cow@macgui.com>
First post2016-01-11 20:08 +0000
Last post2016-01-19 21:15 +0000
Articles 15 — 3 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-11 20:08 +0000
    Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-11 18:47 -0600
      Re: Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-12 18:52 +0000
        Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-12 16:09 -0600
          Re: Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-12 23:20 +0000
          Re: Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-13 18:51 +0000
            Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-13 15:57 -0600
              Re: Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-13 22:19 +0000
                Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-14 16:28 -0600
                  Re: Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-14 22:38 +0000
                    Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-14 19:51 -0600
                      Re: Marina now Uthernet II compatible - January 2016 edition released D Finnigan <dog_cow@macgui.com> - 2016-01-15 20:45 +0000
                        Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-15 18:14 -0600
                        Re: Marina now Uthernet II compatible - January 2016 edition released ultramagnus_tcv <mikew@thecomputervalet.com> - 2016-01-16 10:41 -0600
    Re: Marina now Uthernet II compatible - January 2016 edition released ol.sc@web.de (Oliver Schmidt) - 2016-01-19 21:15 +0000

#2104 — Marina now Uthernet II compatible - January 2016 edition released

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-11 20:08 +0000
SubjectMarina now Uthernet II compatible - January 2016 edition released
Message-ID<dog_cow-1452543075@macgui.com>
The January 2016 edition of Marina is compatible with the new Uthernet II
from a2RetroSystems.

Find updated demo disk, user's manual, and source code at the Marina web
site.

The source code disk also has some sample programs that use the Uthernet
II's built-in TCP/IP stack. Marina's Uthernet II driver is in UTH2.S and is
an example of how to interface with the MAC Raw mode of the W5100.

Several bugs are fixed, and there have been some advancements towards the
TCP implementation, mostly in the sockets interface, but I also have the TCP
checksum routine written, and parts of the port demultiplexer going too. The
DNS resolver now uses the sockets API, but I'm in the middle of writing a
GETHOSTBYNAME function call, so in this edition of Marina it never processes
the reply from the server. Not a big deal.

Now that I've got the Uthernet II driver done, I can switch back to the
Uthernet and focus on completing TCP, as well as other smaller items on my
to do list.

But I am also open to working on other areas of Marina. So if anyone has any
suggestions or other input, I'm all ears.

Now that the Uthernet II is out and in the hands of hundreds of people,
completing Marina is really now just a learning exercise for me.

Anyone who is seriously considering writing a networking application, or
heaven forbid, a game, should go with the Uthernet II's built-in TCP/IP
stack, which you will find is fairly competently described in the Uthernet
II manual, which I will also update later this week (and hopefully finish
before too long).

There is also a new document in the Marina Technical Library called "The New
Uthernet II Send Sequence" which describes a less-headache-inducing method
of transferring data to/from the W5100. It may need to be updated a little,
but overall the technique is sound.

And now, here's the big change list since the October 2015 edition of
Marina: 

- Uthernet II driver added
- ARPINIT sets MAC address in various ARP templates
- Fixed check for LLBCAST flag in HANDLEIP
- Don't pad DHCPDISCOVER and REQUEST messages to 300 bytes
- Fixed check for DHCP replies when no IP address is configured
- Allow SOTYPETCP in SOCKET
- Started writing LISTEN for TCP sockets
- Moved HANDLETCP to TCP.S
- Moved IPHEADCHKSUM to IP.S
- Moved IPCONFIG and IPRECONFIG to IPCONFIG.S
- Removed missed frame count from ETH.S
- Wrote TCPCHKSUM
- Fixed random number generation for link-local address
- Fixed check for NSTXID in DNSRESOLVE
- Wrote VERIPADDR
- Wrote GETHOSTBYNAME
- Modified DNSRESOLVE to use Sockets API
- OUTPHEAD buffer size increased for TCP
- Moved HANDLEIP to IP.S
- Wrote GETSOCKOPT
- Added REUSEPORT socket option
- Uthernet driver scans slots for CS8900A
- Uthernet driver counts transmission failures in TXFAILS
- Socket RECV demo prints all data received, beyond 256 bytes
- SEND eliminated from Uthernet driver; falls into SEND16

-- 
]DF$
The Marina IP stack for Apple II--
http://marina.a2hq.com/

[toc] | [next] | [standalone]


#2107

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-11 18:47 -0600
Message-ID<n71ian$k75$1@dont-email.me>
In reply to#2104
On 2016-01-11 20:08:35 +0000, D Finnigan said:

> The January 2016 edition of Marina is compatible with the new Uthernet II
> from a2RetroSystems.

I've done a very brief test with my UII. This is the first time I've 
used Marina, so I read the manual.

Unfortunately, I am not getting assigned an IP from DHCP.

I've got a peculiar setup here. My office has no ports to which I can 
plug in an Ethernet cable. The UII is plugged into a small DLink 
unmanaged switch. That uplinks to a TPLink Wireless AP set in Wireless 
Client mode. This creates a bridge to my wireless router in the other 
room.

It's unusual but I can successfully get an IP via DHCP when using the 
UII-blessed ADTPro. So, I know it _can_ work. I tried that again 
tonight as well just to confirm.

I can do better tests, just not tonight. I can stretch a long Ethernet 
cable to eliminate all that messy Layer 2 stuff. I also have a managed 
switch that can do port mirroring so I could potentially get some good 
information out of Wireshark for you. 

[toc] | [prev] | [next] | [standalone]


#2109

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-12 18:52 +0000
Message-ID<dog_cow-1452624906@macgui.com>
In reply to#2107
ultramagnus_tcv wrote:
> 
> I can do better tests, just not tonight. I can stretch a long Ethernet 
> cable to eliminate all that messy Layer 2 stuff. I also have a managed 
> switch that can do port mirroring so I could potentially get some good 
> information out of Wireshark for you.
>

That would be much appreciated.

[toc] | [prev] | [next] | [standalone]


#2112

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-12 16:09 -0600
Message-ID<n73tct$p8b$1@dont-email.me>
In reply to#2109
On 2016-01-12 18:52:26 +0000, D Finnigan said:

> ultramagnus_tcv wrote:
>> 
>> I can do better tests, just not tonight. I can stretch a long Ethernet
>> cable to eliminate all that messy Layer 2 stuff. I also have a managed
>> switch that can do port mirroring so I could potentially get some good
>> information out of Wireshark for you.
>> 
> 
> That would be much appreciated.

I brought home a known good ethernet cable and connected the IIGS 
direclty to my edge router. Nothing in between. No go. I have a spare 
Netgear managed switch that can do port mirroring. I set that up and 
captured everything from Marina and from ADTPro 2.0.1. I have three 
Wireshark captures to share with you.

I am going to email you a link to the file (compressed). In case you 
don't get it, let me know because I am assuming the email address you 
have here is valid. If not, email me and I'll send you the link.

I can keep this configuration in my office for some time. If you need 
more tests, let me know.

Apple IIGS
ROM 01
UII
CFFA3000

[toc] | [prev] | [next] | [standalone]


#2113

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-12 23:20 +0000
Message-ID<dog_cow-1452641008@macgui.com>
In reply to#2112
ultramagnus_tcv wrote:
> 
> I am going to email you a link to the file (compressed). In case you 
> don't get it, let me know because I am assuming the email address you 
> have here is valid. If not, email me and I'll send you the link.

Yeah, even the spammers know this is a good address! ;-)

Thanks, and I'll pore over this tonight.

[toc] | [prev] | [next] | [standalone]


#2115

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-13 18:51 +0000
Message-ID<dog_cow-1452711249@macgui.com>
In reply to#2112
ultramagnus_tcv wrote:
> I can keep this configuration in my office for some time. If you need 
> more tests, let me know.
> 

It took me all of 5 minutes to notice that the DHCP discoveries weren't
being sent with an Ethernet source address. The fix was to add a call to
ARPINIT to copy the MAC address into OUTPHEAD.

Since this is a hugely fundamental problem in Marina, and because the fix
was so easy, I have updated all the files on marina.a2hq.com without
changing the release date.

-- 
]DF$
The Marina IP stack for Apple II--
http://marina.a2hq.com/

[toc] | [prev] | [next] | [standalone]


#2116

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-13 15:57 -0600
Message-ID<n76h3m$l94$1@dont-email.me>
In reply to#2115
On 2016-01-13 18:51:28 +0000, D Finnigan said:

> ultramagnus_tcv wrote:
>> I can keep this configuration in my office for some time. If you need
>> more tests, let me know.
>> 
> 
> It took me all of 5 minutes to notice that the DHCP discoveries weren't
> being sent with an Ethernet source address. The fix was to add a call to
> ARPINIT to copy the MAC address into OUTPHEAD.

Confirmed. DHCP works fine now.

[toc] | [prev] | [next] | [standalone]


#2117

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-13 22:19 +0000
Message-ID<595909534474416439.655526dog_cow-macgui.com@news.eternal-september.org>
In reply to#2116
ultramagnus_tcv <mikew@thecomputervalet.com> wrote:
> On 2016-01-13 18:51:28 +0000, D Finnigan said:
> 
>> ultramagnus_tcv wrote:
>>> I can keep this configuration in my office for some time. If you need
>>> more tests, let me know.
>>>>> It took me all of 5 minutes to notice that the DHCP discoveries weren't
>> being sent with an Ethernet source address. The fix was to add a call to
>> ARPINIT to copy the MAC address into OUTPHEAD.
> 
> Confirmed. DHCP works fine now.

Great. The Feb 2016 edition will respond to ICMP echo requests (ping). I
got that going last night. We have a pretty good ping time for an Apple II!

[toc] | [prev] | [next] | [standalone]


#2119

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-14 16:28 -0600
Message-ID<n7979d$mh5$1@dont-email.me>
In reply to#2117
On 2016-01-13 22:19:40 +0000, D Finnigan said:
>> 
>> Confirmed. DHCP works fine now.
> 
> Great. The Feb 2016 edition will respond to ICMP echo requests (ping). I
> got that going last night. We have a pretty good ping time for an Apple II!

Heh. What's the response time? Or maybe it should be a surprise!

[toc] | [prev] | [next] | [standalone]


#2120

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-14 22:38 +0000
Message-ID<dog_cow-1452811265@macgui.com>
In reply to#2119
ultramagnus_tcv wrote:
> On 2016-01-13 22:19:40 +0000, D Finnigan said:
>>> 
>>> Confirmed. DHCP works fine now.
>> 
>> Great. The Feb 2016 edition will respond to ICMP echo requests (ping). I
>> got that going last night. We have a pretty good ping time for an Apple
>> II!
> 
> Heh. What's the response time? Or maybe it should be a surprise!

I'm going to put together a little report tonight. Basically, you've got to
disable all the debugging code so nothing is printed on screen, and then
because all the data has to be manually copied out of the W5100 and
checksummed (we check IP and ICMP checksums), obviously time goes up for
larger payloads. Under these conditions, a "normal" sized ping on two
computers directly connected, Marina averages around 2 ms.

-- 
]DF$
The Marina IP stack for Apple II--
http://marina.a2hq.com/

[toc] | [prev] | [next] | [standalone]


#2121

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-14 19:51 -0600
Message-ID<n79j5o$u53$1@dont-email.me>
In reply to#2120
On 2016-01-14 22:38:24 +0000, D Finnigan said:

> I'm going to put together a little report tonight. Basically, you've got to
> disable all the debugging code so nothing is printed on screen, and then
> because all the data has to be manually copied out of the W5100 and
> checksummed (we check IP and ICMP checksums), obviously time goes up for
> larger payloads. Under these conditions, a "normal" sized ping on two
> computers directly connected, Marina averages around 2 ms.

So, this is when I ping Marina from another machine. 2ms is very 
impressive considering. 

[toc] | [prev] | [next] | [standalone]


#2122

FromD Finnigan <dog_cow@macgui.com>
Date2016-01-15 20:45 +0000
Message-ID<dog_cow-1452890873@macgui.com>
In reply to#2121
ultramagnus_tcv wrote:
> 
> So, this is when I ping Marina from another machine. 2ms is very 
> impressive considering.
>

Yes. Looks like it's actually closer to 3 ms, but who's counting? :-) Here
are my times:


Marina IP Ping Response Times

Using Uthernet driver.
Marina Feb 2016 edition pre-release, no debug code (ie, no screen output).
Direct connection using cross-over cable.


ping -c 20 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: icmp_seq=0 ttl=64 time=2.783 ms
64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=2.794 ms
[...]
64 bytes from 192.168.2.2: icmp_seq=19 ttl=64 time=2.780 ms

--- 192.168.2.2 ping statistics ---
20 packets transmitted, 20 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.770/2.783/2.797/0.008 ms



ping -s8 -c 20 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 8 data bytes
16 bytes from 192.168.2.2: icmp_seq=0 ttl=64 time=1.883 ms
16 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=1.896 ms
[...]
16 bytes from 192.168.2.2: icmp_seq=19 ttl=64 time=1.886 ms

--- 192.168.2.2 ping statistics ---
20 packets transmitted, 20 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.871/1.885/1.898/0.008 ms



ping -s308 -c 20 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 308 data bytes
316 bytes from 192.168.2.2: icmp_seq=0 ttl=64 time=7.613 ms
316 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=7.641 ms
[...]
316 bytes from 192.168.2.2: icmp_seq=19 ttl=64 time=7.618 ms

--- 192.168.2.2 ping statistics ---
20 packets transmitted, 20 packets received, 0% packet loss
round-trip min/avg/max/stddev = 7.613/7.629/7.643/0.009 ms



ping -s616 -c 20 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 616 data bytes
624 bytes from 192.168.2.2: icmp_seq=0 ttl=64 time=13.594 ms
624 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=13.598 ms

[...]
624 bytes from 192.168.2.2: icmp_seq=19 ttl=64 time=13.615 ms

--- 192.168.2.2 ping statistics ---
20 packets transmitted, 20 packets received, 0% packet loss
round-trip min/avg/max/stddev = 13.594/13.605/13.620/0.009 ms


-- 
]DF$
The Marina IP stack for Apple II--
http://marina.a2hq.com/

[toc] | [prev] | [next] | [standalone]


#2125

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-15 18:14 -0600
Message-ID<n7c1sm$dvb$2@dont-email.me>
In reply to#2122
On 2016-01-15 20:45:11 +0000, D Finnigan said:

> Yes. Looks like it's actually closer to 3 ms, but who's counting?


Oh, then forget it. :-P

[toc] | [prev] | [next] | [standalone]


#2130

Fromultramagnus_tcv <mikew@thecomputervalet.com>
Date2016-01-16 10:41 -0600
Message-ID<n7drn3$lgm$1@dont-email.me>
In reply to#2122
On 2016-01-15 20:45:11 +0000, D Finnigan said:

> Yes. Looks like it's actually closer to 3 ms, but who's counting? :-) Here
> are my times:


But seriously, what's the output like with the screen on? 

[toc] | [prev] | [next] | [standalone]


#2157

Fromol.sc@web.de (Oliver Schmidt)
Date2016-01-19 21:15 +0000
Message-ID<n7m927$7u9$4@news.albasani.net>
In reply to#2104
Hi David,

>Anyone who is seriously considering writing a networking application, or
>heaven forbid, a game, should go with the Uthernet II's built-in TCP/IP
>stack, which you will find is fairly competently described in the Uthernet
>II manual, which I will also update later this week (and hopefully finish
>before too long).

I certainly second that. However what someone going down that road
will miss pretty soon is a DHCP client and a DNS client based on the
Uthernet II's built-in TCP/IP stack without any lagacy coming from
IP65/Marina/...

I'd personally really appreciate if you could leverage your excellent
know-how regarding the DHCP and DNS protocols paired with your new
knowledge on getting along with the W5100 buffer wraparound to provide
these two pieces of software !

>There is also a new document in the Marina Technical Library called "The New
>Uthernet II Send Sequence" which describes a less-headache-inducing method
>of transferring data to/from the W5100. It may need to be updated a little,
>but overall the technique is sound.

In that context it might worth to mention (again) the comment in
https://raw.githubusercontent.com/oliverschmidt/ip65/master/supplement/w5100.h

In section '2.2 Shadow Register' I describe an approach pretty much
identical to what you describe as "The New Uthernet II Send Sequence"
in http://macgui.com/blogs/?e=467

In section '2.1 Copy Split' I describe what would be from your
perspective "The Old Uthernet II Send Sequence".

In section '2.3 TCP Stream Split' I describe yet another approach
(specific to actually using the Uthernet II's TCP/IP stack for a TCP
connection).

Regards,
Oliver

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2.programmer


csiph-web