Connecting a viewdata terminal to a wifi modem?

Talk about non-Acorn classic computers/hardware/software here (including retro consoles)
Post Reply
tjewell
Posts: 5
Joined: Thu Sep 27, 2018 9:10 am
Contact:

Connecting a viewdata terminal to a wifi modem?

Post by tjewell » Fri Sep 28, 2018 11:50 am

Hi all, I've been reading with much interest the discussions on Viewdata services and wifi modems here. I've got a Tandata 1404 viewdata terminal with a serial connection that I'd love to connect to a wifi modem, and actually see it work again with the Glasstty service! But there's a problem - of course, the serial works at 1200/75 - and none of wifi modems go as slow as 75 baud. So what would be needed to support this? A new firmware? Or is there a technical limitation?

(Ps. this is part of a wider project at the Centre for Computing History to get our various Viewdata systems hooked up and actually doing something!)

User avatar
danielj
Posts: 7059
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by danielj » Fri Sep 28, 2018 12:42 pm

Hey there!

If they're hardwired to communicate 1200/75, it's problematic. If there's scope to configure the comms settings, the world's your oyster? Some of them have built in modems iirc?

Firmware wise it's just a question of rejiggling the firmware to respond to whatever commands the terminal is able to push down the line to connect and then do a telnet connect on the other end. That bit is fairly easy.

d.

User avatar
danielj
Posts: 7059
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by danielj » Fri Sep 28, 2018 12:49 pm

Further - just looking - it might be possible to coax it into playing at 1200/75 using the software serial library: https://github.com/plerup/espsoftwarese ... Serial.cpp

It won't be as reliable as the hardware library, but it's not going very fast so it might just work!

d.

tjewell
Posts: 5
Joined: Thu Sep 27, 2018 9:10 am
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by tjewell » Fri Sep 28, 2018 1:13 pm

I've managed to track down a manual here at the museum, and alas, 1200/75 is fixed (I'd been hoping for 1200/1200 as an option, but no). Software-serial looks interesting - you're right, it's very slow, so errors should be minimised. How would I go about using that?

Thanks all!

User avatar
danielj
Posts: 7059
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by danielj » Fri Sep 28, 2018 1:29 pm

I think you might have to rewrite the library in order to let it use the two separate baud rates, but once you've done that, the light-weight option is to tell the FreeFi-232 firmware on the stardot github to use software serial instead of hardware serial, and work on the basis that it's hard-coded to 1200/75. It'll need a bit of code-jiggling to do it, and you'll need a wifi-modem. Happy to send a version 2.4 PCB to the museum if you can nobble the rest of the bits to put one together?

d.

User avatar
1024MAK
Posts: 8526
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by 1024MAK » Fri Sep 28, 2018 3:51 pm

If plan A above does not work, here are two other options.

Plonk a microcontroller in between. Use one with either two internal UARTs or one with one internal UART and use code to bit-bash another ‘serial port’. The microcontroller can then do the data speed adjustment.

Alternatively, if you have a spare old PC (386 or later) that has two RS232 serial ports (or you have suitable expansion cards to bring the total up to two serial ports). Then a relatively simple QBASIC (maybe even GWBASIC) program can auto boot from a MSDOS system floppy (or hard drive) and do the speed conversion.

Mark
Last edited by 1024MAK on Fri Sep 28, 2018 3:52 pm, edited 1 time in total.

guesser
Posts: 259
Joined: Mon Jun 26, 2006 9:21 pm
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by guesser » Fri Sep 28, 2018 5:28 pm

I was thinking if you wanted to have a display of a several terminals I'd get a small linux box with a serial port for each hidden away behind the display. It could run a server too so the entire thing was self contained, or route the connections out over the internet.

"Viewdata Rob" might be the person to talk to https://twitter.com/ViewdataUK
He's keen to get a public display of viewdata going (I think he wants a viewdata museum so he can get all the clutter out of his house!)
A web based teletext editor which can export as Mode 7 screen memory: https://zxnet.co.uk/teletext/editor

tjewell
Posts: 5
Joined: Thu Sep 27, 2018 9:10 am
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by tjewell » Sun Sep 30, 2018 10:28 am

Hi everyone, thanks for all your ideas!

Given that it's possible we're going to have a number of machines with the same challenge (plus, surely, we're not going to be the only people who'd like to get old Viewdata kit going?), I think the first thing to try is to build a wifi-modem that can actually support 1200/75, as that seems the neatest solution. @danielj, many thanks for the offer of a PCB. Do you also sell a finished board? Rewriting the firmware is a bit outside of my comfort zone, so I'm off now to read the various discussions about FreeFi on the forum while I wait for my personal Tandata to arrive. Any pointers on any other background reading I could do?

Thanks all!

djrm
Posts: 4
Joined: Thu Feb 21, 2019 10:28 pm
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by djrm » Fri Feb 22, 2019 8:54 am

Greetings everyone,
I'm new here, first post.
I found the site searching for Tandata TD1404 information.
I am having some success with a combination of a modified Zimodem together with a 1200/75 baudrate convertor.
I can connect to and use the telstar prestel servive this way at glasstty.com
more information to follow if anyone is interested.
Kind regards, David.

tjewell
Posts: 5
Joined: Thu Sep 27, 2018 9:10 am
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by tjewell » Fri Feb 22, 2019 1:54 pm

Definitely interested to know more! Especially about the baud rate convertor.

Cheers, Tony

djrm
Posts: 4
Joined: Thu Feb 21, 2019 10:28 pm
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by djrm » Fri Feb 22, 2019 3:12 pm

Hi, The photo shows the assembly of components used to access glasstty.com from the Tandata 1404.
1) MAX3232 RS232 to 3.3v level converter
2) Arduino pro min modified for 3.3 volts operation converting keyboard 12 to 1200 bps
3) Wemos D1 mini running Zimodem modem to wifi bridge software

Image

I took the code posted in this forum and adapted it for 75 baud operation:
http://forum.arduino.cc/index.php?topic=251764

The wifi modem software is from here:
https://github.com/bozimmerman/Zimodem

I have adapted this to do DTR autodial because the serial interface on my Tandata 1404 doesn't get the dialling numbers from the connection menu.

The Tandata sets its DTR line active when it attempts to make a connection,enter # or a number on the keyboard to start. The DTR signal is read by the zimodem and used to trigger the dialling of a preset phonebook entry. When connected the zimodem activates its DCD line which is used by the Tandata to enter on-line mode. Calls are terminated by the keyboard sequence 'FUNCTION' then '1'

The zimodem needs to be configured before use with the following:
1) The wifi access point and password.
2) phonebook entry for online TELSTAR videotex service, glasstty.com on port 6502
3) Serial framing 1200,7E1
These settings are saved in non-volatile memory so they only have to be entered once.

The configuration and programming of he Wemos board is done using the micro USB connector, I need to unlink the yellow serial data lead from the arduino to do this successfully. it may be possible to use some kind of diode or resistor network to save having to do this.

The simple software serial driver needed to be reworked to use the slowest clock pre-scaler to operate at 75 bps.
I changes some of the constants to include calculations to work better with the new timings.
The 75 to 1200 baud converter is configured for 8 bit data no parity, however the parity is passed strait through unchanged by the software.
(just as well as there is no parity function in the converter software)
Only one data direction is used in this application although the simple software serial drivers are bi-directional, half duplex.

The little MAX3232 board has four data channels, two in and two out. its not obvious from looking at the board but the signal connections are discrete on the top and bottom of the board. The power connections are duplicated on the top and bottom of the board and on the left and right sides, i.e. there are four identical 0v pads.

I intend to try and incorporate the 75 baud reception into the zimodem software to free up the Arduino mini board. The serial reception software it needs an interrupt and timer to be available, I'm not sure if ESP8266 arduino has this available or not.

I may feed 5 volts out of the Tandata through the 25 way D connector to make think a bit neater. I shall the mount the boards on a bit of prototype board soldered to the D connector.

The Tandata will accept commands from a PC connected to the serial din connector, this is at 1200 bps for both transmit and receive but there are no handshaking lines available to control the modem. I am using a simple MAX232 with 9 way D connector fed with serial and power from the Tandata DIN connector for this.
Note: My manual has the wrong connection details for DIN serial input. It should say pin 5 is RS423 input, pin 6 is TTL keyboard input.
This was very confusing as the signal polarity is opposite on the two inputs.

Kind regards, David.
Attachments
IMG_20190222_121647a.png

tjewell
Posts: 5
Joined: Thu Sep 27, 2018 9:10 am
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by tjewell » Sat Feb 23, 2019 1:05 pm

David,

Thanks for the wonderfully detailed reply. Right now, my Tandata is dead (the battery leaked and ate a chunk of the motherboard), so, pending repair, I'm trying to connect my Dragon 32 using Prestel software. But most of the issues are the same, it's 1200/75 (though I can patch the Dragon to 1200/1200) and expecting to dial into a Viewdata service.

The idea of using a preset phone number is great - I wish I'd thought of that. I'd been banging my head on how to issue AT commands from inside the Prestel software. But how did you do the DTR autodial?

Many thanks in advance, Tony

djrm
Posts: 4
Joined: Thu Feb 21, 2019 10:28 pm
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by djrm » Sat Feb 23, 2019 3:37 pm

Hi Tony,
Shame about the old battery damage, I'm in my second Tandata, one of them is damaged by leakage from the keyboard battery. You may get lucky if you clean up the mess with acetic acid and re-do any missing traces on the board. I think my keyboard is too far gone but maybe one day I'll have a go.

The function below is what I added into Zimodem to make the DTR autodial work. I copied and adapted the code in the Zimodem which detects DTR going inactive to drop the line.

In normal use then dialling 1234 is transposed into the glasstty invocation. In the function below the dial function is used to dial 1234 and the usual dialling function does the rest (its re-entrant) . If you can use 1200/1200 then you will not need the second processor, you should find everything you need will be in the Wemos.

Kind regards, David.

Code: Select all

void ZCommand::DTR_autodial()
{
  String dmodifiers = "";
  int vval = 1234;
  int vlen = 4;
  if(pinSupport[pinDTR])
  {
    if(lastDTR==dtrInactive)
    {
      lastDTR = digitalRead(pinDTR);
      if((lastDTR==dtrActive)
      &&(dtrInactive != dtrActive))      
      {
        PhoneBookEntry *phb = phonebook;
        if(phb->number == vval)
      	{
      		int addrLen=strlen(phb->address);
      		uint8_t *vbuf = new uint8_t[addrLen+1];
      		strcpy((char *)vbuf,phb->address);
          //serial.prints("DTR dialing");
      		ZResult res = doDialStreamCommand(0,vbuf,addrLen,false,phb->modifiers);
      		free(vbuf);
      	        //return res;
      	}
      }
    }
    lastDTR = digitalRead(pinDTR);
  }
}

void ZCommand::loop()
{
  checkPlusEscape();
  acceptNewConnection();
  if(serial.isSerialOut())
  {
    sendNextPacket();
    serialOutDeque();
  }
  checkBaudChange();
  DTR_autodial();
}
The separate RS423 DIN plug output is fed through another MAX3232 for connection to a PC RS232 port at 1200 7E1, see photo for details.
IMG_20190215_181814a.png
IMG_20190220_230857a.png

smokey
Posts: 16
Joined: Mon Mar 04, 2019 5:52 pm
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by smokey » Wed Mar 27, 2019 11:44 am

Hello

Having just acquired a prestel adapter

Iam very interested in any developments.

I wish i could connect to a network

even one that we create for us if that makes sense

James

djrm
Posts: 4
Joined: Thu Feb 21, 2019 10:28 pm
Contact:

Re: Connecting a viewdata terminal to a wifi modem?

Post by djrm » Sat Mar 30, 2019 8:25 pm

Hi James,
What interface does your teletext adapter have, if it TV rf input then the choice is limited.
There is a way to generate TV signals including teletext pages described here:
https://github.com/fsphil/hacktv
It uses a software define radio linked to a PC which receives teletext data from the internet and encodes it in a TV signal.
I tried it with a hackrf device, it works great.
Kind regards, David.

Post Reply