Cheap web-modem for the beeb/master (and arc if ya like!)

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
Andy1979
Posts: 110
Joined: Mon Mar 27, 2017 9:04 pm
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Andy1979 » Sun May 20, 2018 3:33 pm

danielj wrote:So I've had a bit of a poke with Communitel
Thanks for trying that out. Sounds like it'll be easier to stick to Commstar.

MadeGray
Posts: 3
Joined: Wed Dec 27, 2017 4:44 pm
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by MadeGray » Sat May 26, 2018 9:33 am

Just a thought of mine will look at this weekend unless anyone else has? Just pure laziness but has anyone moded the commstar Rom image to default the send and receive and parity options to N81 9600 ? Just saves the time! I’ve moded Daniels Sketch to add a ATMYFI command that adds in my ssid etc and will probably add some extra commands to load up the common pages such as ATGLASS and ATCC14 etc. Happy to put the modified sketch up it’s not pretty but works!
John Gray

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Sat May 26, 2018 10:35 am

If you come up with a generic solution to save autodials in eeprom, we can pull that into the main branch?

d.

Andy1979
Posts: 110
Joined: Mon Mar 27, 2017 9:04 pm
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Andy1979 » Mon May 28, 2018 9:40 pm

Domino DIN plugs arrived and now have this working with flow control.

Not sure what I’m doing wrong but I’m struggling to navigate Prestel once connected - doesn’t seem to respond to pressing # to return to the main menu, hitting enter works but then can’t find my way back from e.g. the news page. Have tried a few different versions of Commstar.

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Mon May 28, 2018 10:07 pm

*0# to get back to the main page :) hash being enter in commstar.

d.

Andy1979
Posts: 110
Joined: Mon Mar 27, 2017 9:04 pm
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Andy1979 » Fri Jun 01, 2018 9:07 am

danielj wrote:
Mon May 28, 2018 10:07 pm
*0# to get back to the main page :) hash being enter in commstar.

d.
Thanks for that. Realised that the problem was Commstar not mapping the keyboard correctly on my Master Compact. On the numerical keypad '#' displays an 's' and on the main keyboard Shift-3 generates a '£' sign. All working now I've figured out which key is which!

Also found that Commstar needs DFS otherwise it throws out file system errors when you try to 'Escape' back to the menu. Really wasn't designed with the Master Compact in mind, which isn't surprising given it was written in 1983/4.

johnkenyon
Posts: 168
Joined: Wed Jul 20, 2011 2:21 pm
Location: Coventry
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by johnkenyon » Mon Jun 04, 2018 4:14 pm

MadeGray wrote:
Sat May 26, 2018 9:33 am
Just a thought of mine will look at this weekend unless anyone else has? Just pure laziness but has anyone moded the commstar Rom image to default the send and receive and parity options to N81 9600 ? Just saves the time! I’ve moded Daniels Sketch to add a ATMYFI command that adds in my ssid etc and will probably add some extra commands to load up the common pages such as ATGLASS and ATCC14 etc. Happy to put the modified sketch up it’s not pretty but works!
I've done some disassembly of the Commstar 1.40 ROM which reveals two tables of configuration data, which contains amongst other things:

Prestel Mode:
&9497 - Rx Baud rate (=&04 1200)
&9498 - Rx Baud rate (=&01 75)
&9499 - ACIA configuration (= &08 7E1)

Terminal Mode:
&92CD - Rx baud (=&03 300)
&92CE - Rx baud (=&03 300)
&92CF - ACIA configuration (=&14 8N1)

Baud rate values are:
1 - 75bd
2 - 150bd
3 - 300bd
4 - 1200bd
5 - 2400bd
6 - 4800 bd
7 - 9600 bd

I can't remember off the top of my head how I determined the ACIA config values - I assume that 7E1 and 8N1 would probably cover most use cases.

And before you ask, no I haven't tried making the change myself.

/John
(PSThe disassembly is untested - I'd need to format it into an suitable format to feed into an assembler to check that my disassembly works, and it almost certainly contains errors...)
PPS - Commstar 1.40 is only 8k - lots of space for client side hacking (e.g sending init strings, autodialling etc.)

User avatar
pau1ie
Posts: 542
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by pau1ie » Wed Jun 13, 2018 8:08 am

I gave this a go with my bbc master and the terminal program that comes with it. It works!

I had to disable hardware flow control in the sketch (New versions have enabled it). It just crashed the ESP8266 otherwise.

Then I had to do:

*configure baud 5
*configure data 5

and CTRL-BREAK to make it take place. I couldn't get the viewdata service to work, but I connected to a random MUD (I didn't create a character):
IMG_20180613_090011009.jpg
I'm working on http://bbcmicro.co.uk

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Wed Jun 13, 2018 8:32 am

Well done! Concerned the hw flow crashed the esp8266! What implementation of it are you using?

d.

User avatar
pau1ie
Posts: 542
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by pau1ie » Wed Jun 13, 2018 3:57 pm

I'm working on http://bbcmicro.co.uk

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Wed Jun 13, 2018 5:48 pm

Did it crash, or did you find you couldn't connect from the beeb? If you've not wired up rts/cts on the beeb end, you need to link rts/cts on the lolin board? Because I'm using exactly the same board and hardware flow control works fine with the beeb :?

User avatar
pau1ie
Posts: 542
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by pau1ie » Wed Jun 13, 2018 6:16 pm

I followed your instructions for wiring things up, so I have the link at the beeb end. It crashed with a message like:

Code: Select all

ets Jan 8 2013,rst cause:4, boot mode:(3,7)
I can get the whole message if you need, it comes up at 115200 baud in the arduino output window no matter what the baud rate is set to in the program. It repeats every few seconds, and nothing on the beeb. It happens even if it isn't attached to the level shifter board.

Cause 4 is watchdog reset according to the documentation (I don't know what that means). I was powering it from my PC using the USB cable, some search results suggest a better power supply is needed, but it works OK with hardware flow control disabled. The test program that lists the access points also works if I set the speed to 2400baud.
I'm working on http://bbcmicro.co.uk

User avatar
hoglet
Posts: 7450
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by hoglet » Wed Jun 13, 2018 6:21 pm

I'd be interested in the whole error log message please.

User avatar
pau1ie
Posts: 542
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by pau1ie » Wed Jun 13, 2018 6:36 pm

If I press reset, I get a line of rubbish, as if it is talking at a different baud rate (Though nothing on the BBC screen - I can't copy the gobbledeygook) then the following repeats every 6 seconds or so (2 iterations pasted, I believe it is identical every time:

Code: Select all

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
I'm working on http://bbcmicro.co.uk

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Wed Jun 13, 2018 6:40 pm

The watchdog kicks in IIRC if loops are taking too long for the ESP8266 to service background functions. Let me check the latest version from my PC is committed to the repo a bit later.
d.

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Wed Jun 13, 2018 7:25 pm

Actually, I remember now, try powering it from an external source when using the hardware flow control - I think you end up with a clash with both things connected at once.

d.

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by 1024MAK » Thu Jun 14, 2018 1:12 am

wdt reset - means watchdog reset - the system restarted after it was reset by the watchdog.

In a computer system, including microcontrollers, you can have a timer circuit. During normal program execution, the program resets (clears) the watchdog counter repeatability during normal program execution. If the program/computer/microcontroller crashes or stalls, the watchdog counter will eventually roll over. At this point, the watchdog will reset the CPU/MPU/microcontroller. But the same thing can happen if too long a time period goes by due to the routing taking too long.

This system is allegedly called watchdog, because a (watch) guard dog never fully sleeps...

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

Stewie66
Posts: 15
Joined: Sun Jan 16, 2011 2:44 am
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Stewie66 » Fri Jun 15, 2018 2:08 pm

johnkenyon wrote:
Mon Jun 04, 2018 4:14 pm


I've done some disassembly of the Commstar 1.40 ROM which reveals two tables of configuration data, which contains amongst other things:

I can't remember off the top of my head how I determined the ACIA config values - I assume that 7E1 and 8N1 would probably cover most use cases.

And before you ask, no I haven't tried making the change myself.

/John
(PSThe disassembly is untested - I'd need to format it into an suitable format to feed into an assembler to check that my disassembly works, and it almost certainly contains errors...)
PPS - Commstar 1.40 is only 8k - lots of space for client side hacking (e.g sending init strings, autodialling etc.)
Hi, have made the changes based on the values and locations and tested works

Thanks
Stewie

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Thu Jul 12, 2018 4:18 pm

Okay after a bit of faffing I created a little adaptor called 'convert Sprow's BBC to PC null modem cable for use by this project'.
IMG_4064.jpg
This means that when the Freewifi card comes along I should just be able to use this to swap RD/TD and RTS/CTS back around the right way, and have a nice ready made cable I already own.
IMG_4063.jpg
That now gets to the reset screen, first issue and first feature request (whcih I hacked in) is to show the Mac address for people who have Mac address restrcition on wifi network
esp mac.jpg
Further testing tonight after restarting wifi access point.

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Thu Jul 12, 2018 6:37 pm

Right - so - the firmware in the main repository is designed to work with the new hardware - if you check the releases page, there's the last version that I had working nicely with the lolin setup. On a more positive note though, if this one works with the lolin board, that's all to the good. Have added code that (I think) displays the MAC in the help message.

I should also add, make sure you're using a MAX3232 with the LoLin - it likes 3.3V, not 5. If you're using a 232 it'll probably work, but you might be stressing the IOs.

d.
Last edited by danielj on Thu Jul 12, 2018 6:44 pm, edited 1 time in total.

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Thu Jul 12, 2018 7:32 pm

Max3232 are 5v tolerant. It is the Max232 that is 3.3v. Unless the datasheets are lying.

Edit: only read the 3232 datasheet of course, forgot max232 being older would be 5v not 3.3v.
Last edited by Elminster on Thu Jul 12, 2018 8:49 pm, edited 1 time in total.

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Thu Jul 12, 2018 8:19 pm

It's the ESP8266 on the NodeMCU that's not 5V tolerant. Max3232 can work over a voltage range, and converts ~ between 3 and 5V to 12V and back again, MAX232 is just designed to work at 5V. http://www.ti.com/lit/ds/symlink/max232.pdf -> it's why I used the 3237 (same as the 3232 but with more transceivers) on the FreeFi232.

Basically if you're using a 3232 supplied with 3.3V it'll take the RS232 voltages back to 3.3V, if you're using it with 5V it brings them back to that. The GPIOs on the NodeMCU are directly into the ESP8266, and hence really need to be supplied with signals at 3.3V.
Last edited by danielj on Thu Jul 12, 2018 8:19 pm, edited 1 time in total.

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Thu Jul 12, 2018 8:34 pm

Ah I misunderstood what you meant. Yes it is a 3232 being supplied with 3v. I made mistake of re programming with original firmware and now it doesn’t want to talk to Beeb whichever version I use. Virtual interface still works but neither version wants to talk either of WiFi networks.

Was looking so promising as well :) I always break something.
Last edited by Elminster on Thu Jul 12, 2018 8:39 pm, edited 2 times in total.

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

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by danielj » Thu Jul 12, 2018 8:51 pm

Use esptool.py to completely erase the flash, then start again:
https://nodemcu.readthedocs.io/en/latest/en/flash/


d.

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Thu Jul 12, 2018 9:14 pm

Switching off the Master seemed to fix the issue. Not sure why as the Lolin was disconnected from the master when it was flashed. But I shall make a note of the link.

Only thing is I am back on the Freewifi fimware now, but I think more of an issue now is to work out why it doesnt connect to my wifi.

So back to looking at why it doesnt connect to Wifi. All the time I shall spend on it today. I am really just playing until you I get a freewifi to play with. And I have some soldering to do as well. (not for this. something else)

User avatar
hoglet
Posts: 7450
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by hoglet » Fri Jul 13, 2018 7:09 am

Elminster wrote:
Thu Jul 12, 2018 9:14 pm
So back to looking at why it doesnt connect to Wifi. All the time I shall spend on it today. I am really just playing until you I get a freewifi to play with. And I have some soldering to do as well. (not for this. something else)

Code: Select all

Connect to WIFI: ATWIFI<ssid>,<key>
Long shot, but do make sure you are not putting a space after ATWIFI.

This, together with incorrect line endings, caught me and Ed out for a while.

Dave

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Fri Jul 13, 2018 9:08 am

No. Nothing wrong with the command entered. I am used to AT commands from back in the day (bring back memories) of getting Slackware 3/4 on a 486 PC to use dialup and PPP or SLIP. Those were the days, where you spend a week trying to configure something to talk to the internet or company network over a phone or ISDN. One area of retro I dont miss.

But I have higher security than usual and weird characters in my SSID, all of which have can cause issues (a space in you SSID name used to break loads of things). But I have a guest network, but it is the other end of the house. Need to attach Lolin board to laptop and walk it closer and test it there.

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Fri Jul 13, 2018 9:40 am

I used one of the example Lolin sketches and that connects to my Wifi fine. So not a hardware issue, wifi access point setup or compatability issue.

So unless I am doing something silly it is probably a bug in the sketch.

Will play with more DEBUG
Attachments
Mozilla_Firefox_and__dev_cu_wchusbserial141410_and__6__WEBINAR___All_you_need_to_know_about_DockerCon_2018_announcements_-_YouTube.jpg
Last edited by Elminster on Fri Jul 13, 2018 9:44 am, edited 1 time in total.

User avatar
Elminster
Posts: 2935
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by Elminster » Fri Jul 13, 2018 10:00 am

Okay Scratch that it is working now. I wonder if it was just the Freewifi sketch when run on Lolin hardware that was issue. Wasnt a typo as was copy and paste.

T$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Welcome to theCTELSTAR
videotex service.

You are connected toCCURRER.
T$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

BT
BTAEFL
BTAEFLDSGT
BTAEFLDSGTEACR
FLDSGTEACR
GTEACR
CR


Or maybe when it is hooked to Beeb it doenst work for some reason. Hmm. Will have to try that next. Everything is working in isolation.Lets join it all and test it.
Last edited by Elminster on Fri Jul 13, 2018 10:04 am, edited 1 time in total.

User avatar
marcusjambler
Posts: 404
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Cheap web-modem for the beeb/master (and arc if ya like!)

Post by marcusjambler » Fri Jul 13, 2018 10:28 am

Annnd... The bits n bobs finally arrived.

I have it working on a Master and a Beeb B... except its not as pretty as teletext.
There's something I'm missing I think.
IMG_4063a.jpg

Post Reply