• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

TashRouter: An AppleTalk Router

tashtari

PIC Whisperer
Yes, the SE/30 was on LocalTalk. And, yes, your suggested workaround above fixes the issue! Not only is it now showing the Zone, but the lookup runs about 10x faster. It used to pause for 5-10 seconds after the Appletalk control panel icon was selected - now it pops up instantly.
On the one hand, that stands in specific defiance of Inside AppleTalk... on the other, it sort of makes sense, as the start index in GetZoneList and GetLocalZones is 1-relative and GetMyZone is supposed to follow the same format. "Do as I do, not as I say"? Any case, I removed that check and pushed the change to the repo. Thanks for testing it.
 

shirsch

Well-known member
Glad to be of help! TashTalk and TashRouter are essentially ready to become a replacement for obsolete LT-Ethernet hardware. To that end I'm working on a re-mix of one of the Pi Zero case designs with the proper cut out for the LocalTalk jack. Will post STLs here when it's done.

It would be great to keep a documentation or wiki page outlining places where Inside Appletalk isn't quite correct or complete.
 

NJRoadfan

Well-known member
The RTMP broadcasts from netatalk's atalkd and the Fastpath 5 on Ethernet use a destination network of "0", so broadcasts are always to 0.255.
 

mmjs

Member
FYI, when using @finkmac's tap solution changing to destination_network=port.network in sending.py breaks functionality. This is with a newly pulled version from repo and a config file that works (other than a timeout on a Mac 512K) when destination_network=0x0000.

This is on a network where tashrouter functions as seed for the LT zone and non-seed for Ethertalk (seed routing is handled by Apple Internet Router in this setup).

When destination_network=port.network zones will be available but no resources are visible. I'm happy to collect any logs if helpful.

For RTMP broadcast packets, it appears that netatalk uses ATADDR_ANYNET, which appears to be whatever network the NIC is configured for. Ex: The router is at 6502.122, so RTMP packets are broadcast to 6502.255. I can test this after work with atalkd and my Fastpaths by setting up my EtherTalk network with a fairly large netrange.

The reason things "work" for about a minute is that the client get initial network configuration information via ZIP requests. Once it has the network and zone information, things progress as working, but a countdown timer starts. That timer is reset by RTMP packets refreshing the network information for the client. If the timer expires, the client assumes its disconnected and stops responding. Basically things enter an uncertain state without regular RTMP packets refreshing the network information. It doesn't help that Apple's networking stacks have very poor error handling and reporting for this situation.

The Mac 512k errors above lines up with the problems I was having when netatalk wasn't broadcasting RTMP. What version of System Software is it running? Early Macintosh AppleTalk stacks may have the same limitations as the Apple II Workstation card.

Side Note: The Fastpath sends out RTMP information on EtherTalk Phase 1 in short DDP packets too. Yes, Ethertalk Phase 1 supports short packets.

The Mac 512K is running 6.0.8 which I think is the highest you can go to with less than 2MB of memory
 
Last edited:

RolandJuno

Active member
Can you pull the latest from the repo, comment out the checksum check again, and see if you can get through a whole print job now?
Sorry, and apply the changes to the multicast method and the name information server? Bleah, hacks on top of hacks...
Alright-- I pulled the latest tashrouter from GitHub and applied these patches:
  • Commented out the 4 checksum lines (45-48) in tashrouter/datagram.py
  • Changed the multicast function on line 193 to send long headers in tashrouter/port/localtalk/__init__.py
  • Changed the multicast destination network on line 111 to "destination_network=entry.port.network" in tashrouter/service/name_information.py
I tried the ImageWriter on LocalTalk/TashTalk shows up successfully in the Chooser in Mini VMac. I select it and immediately start a print job. It finishes quickly (about 1 minute). I then go to the Chooser to look for it again, and it's not showing up now. Tashrouter log is showing a lot of frames coming in via the tashtalk hat of type 84 with zero length? I believe this is the same behavior before the most recent change.

Let me know if I can test anything further.
 

Attachments

  • tashrouter-rickards6-debugout.txt.zip
    31.5 KB · Views: 3

shirsch

Well-known member
FYI, when using @finkmac's tap solution changing to destination_network=port.network in sending.py breaks functionality. This is with a newly pulled version from repo and a config file that works (other than a timeout on a Mac 512K) when destination_network=0x0000.

This is on a network where tashrouter functions as seed for the LT zone and non-seed for Ethertalk (seed routing is handled by Apple Internet Router in this setup).

When destination_network=port.network zones will be available but no resources are visible. I'm happy to collect any logs if helpful.
Interesting. I'm using the same tun/tap setup and seeing no issues at all with Macs on the LT side. Everything shows up as expected on both sides of the router. The only difference is that I use the tashrouter to seed both ethernet and localtalk.

I assume you edited the code to prevent seed on the ethernet side? Or is there a switch I missed.
 

NJRoadfan

Well-known member
@shirsch I'm not seeing this odd ZIP packet behavior from a System 7.5.3 install on minivmac via LToUDP. What is the SE/30 running and are there any extensions running that might affect AppleTalk? Something seems off with that install as I haven't had any weird ZIP issues with TashRouter. Chooser always popped right up for me.
 

shirsch

Well-known member
Yes, you have me wondering as well. The info box reports that Open Transport is installed - would that make a difference?
 

shirsch

Well-known member
@shirsch I'm not seeing this odd ZIP packet behavior from a System 7.5.3 install on minivmac via LToUDP. What is the SE/30 running and are there any extensions running that might affect AppleTalk? Something seems off with that install as I haven't had any weird ZIP issues with TashRouter. Chooser always popped right up for me.
Ah, I think we're talking past each other. Chooser was not the issue. It was the Appletalk control panel. The machine is a 32 MB SE/30 running System 7.5.5. There are a number of things installed, but nothing network related.
 

mmjs

Member
Interesting. I'm using the same tun/tap setup and seeing no issues at all with Macs on the LT side. Everything shows up as expected on both sides of the router. The only difference is that I use the tashrouter to seed both ethernet and localtalk.

I assume you edited the code to prevent seed on the ethernet side? Or is there a switch I missed.
Yup, here's my config without seed:

Code:
import logging
import time

import tashrouter.netlog
from tashrouter.port.ethertalk.tap import TapPort
from tashrouter.port.localtalk.ltoudp import LtoudpPort
from tashrouter.port.localtalk.tashtalk import TashTalkPort
from tashrouter.router.router import Router


logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s: %(message)s')
#tashrouter.netlog.set_log_str_func(logging.debug)  # comment this line for speed and reduced spam

router = Router('router', ports=(
  LtoudpPort(seed_network=999, seed_zone_name=b'JUPAK'),
#  TashTalkPort(serial_port='/dev/ttyAMA0', seed_network=988, seed_zone_name=b'JUPAKL TashTalk'),
  TapPort(tap_name='tap2', hw_addr=b'\xDE\xAD\xBE\xEF\xCA\xFE'),
))
print('router away!')
router.start()

try:
  while True: time.sleep(1)
except KeyboardInterrupt:
  router.stop()

As soon as it starts, my LT devices can see both the local and remote (via AIR) zones, but only my LT devices are visible. Notably however, tashrouter immediately reports that its LToUDP network (999) is timing out.

2024-03-18-235120_1360x606_scrot.png

If I do add my zone information:
Code:
TapPort(tap_name='tap2', hw_addr=b'\xDE\xAD\xBE\xEF\xCA\xFE', seed_network_min=990, seed_network_max=998, seed_zone_names=[b'JUPAK']),

The same thing happens. Perhaps there's something in my config causing LToUDP to immediately fail when destination.network=port.network?

In any case, this configuration, with the seed-less config in conjunction with AIR, works great with all my LT and LToUDP devices without issues showing all zones and devices except on the 512K.
 
Last edited:

tashtari

PIC Whisperer
FYI, when using @finkmac's tap solution changing to destination_network=port.network in sending.py breaks functionality.
The RTMP broadcasts from netatalk's atalkd and the Fastpath 5 on Ethernet use a destination network of "0", so broadcasts are always to 0.255.
Shoot. Okay, I'm working on something that will hopefully make everyone happy, please stand by...
 

tashtari

PIC Whisperer
Okay, so I added a separate broadcast method to Port and updated everything that sends broadcast datagrams to use it - this will allow LocalTalk broadcasts to use the short header and EtherTalk broadcasts to use network number zero.

Repo is updated, @mmjs can you pull it and see if things are working on your end, and @shirsch can you pull it and make sure I haven't broken you?
 

tashtari

PIC Whisperer
It would be great to keep a documentation or wiki page outlining places where Inside Appletalk isn't quite correct or complete.
Good idea, I added a document to TashNotes for that purpose here - let me know if you can think of any other additions.
 

shirsch

Well-known member
Okay, so I added a separate broadcast method to Port and updated everything that sends broadcast datagrams to use it - this will allow LocalTalk broadcasts to use the short header and EtherTalk broadcasts to use network number zero.

Repo is updated, @mmjs can you pull it and see if things are working on your end, and @shirsch can you pull it and make sure I haven't broken you?
A bit tight on time this AM, but SE/30 and IIe are behaving themselves. I'll do some further testing with ethertalk clients this evening. Thanks for the update!
 

mmjs

Member
Okay, so I added a separate broadcast method to Port and updated everything that sends broadcast datagrams to use it - this will allow LocalTalk broadcasts to use the short header and EtherTalk broadcasts to use network number zero.

Repo is updated, @mmjs can you pull it and see if things are working on your end, and @shirsch can you pull it and make sure I haven't broken you?
Thank you for the quick turnaround! This now works with all my regular LT and LToUDP machines, with both configurations (ie. both with and without tashrouter serving as a seed router).

However, the 512K is still struggling. When tashrouter is NOT set as a seed router, then it still doesn't see anything. When it is set to be a seed router, it will only see the Ethertalk devices in its local zone, no other devices and no other zones, and it will time out after a minute. Which I think makes sense considering that destination_network is set to 0x0000 in the current version of sending.py on github, right?

2024-03-19-101754_582x286_scrot.png

I need to do some more testing on my end. I think an additional factor is whether the 512K is hooked directly to tashtalk, or if it has a LocalTalk dongle between them. When I was first testing this with it connected directly to the tashtalk hat, it actually would see the other zones for a minute until it timed out.
 

shirsch

Well-known member
I need to do some more testing on my end. I think an additional factor is whether the 512K is hooked directly to tashtalk, or if it has a LocalTalk dongle between them. When I was first testing this with it connected directly to the tashtalk hat, it actually would see the other zones for a minute until it timed out.
I think there are some electrical issues with a direct connection due to the way the tashtalk hat localtalk interface is designed.
 

mmjs

Member
I think there are some electrical issues with a direct connection due to the way the tashtalk hat localtalk interface is designed.
Interesting! In this particular case it seems like a direct connection actually worked *better* since I could at least see and browse other zones, but I need to actually properly test now
 

tashtari

PIC Whisperer
I think there are some electrical issues with a direct connection due to the way the tashtalk hat localtalk interface is designed.
This is correct - to the best of my knowledge, the TashTalk 2 Hat that I sell requires the use of a LocalTalk or PhoneNet dongle. It connects the Rx and Tx lines together, which isn't a problem when they go into the same transformer, but this is not what the Mac expects when speaking LocalTalk over its ports.

Notably however, tashrouter immediately reports that its LToUDP network (999) is timing out.
Is this still happening with the latest code?
 
Top