DreamPi Software (DC <> Pi)

Discussion in 'Sega Dreamcast Development and Research' started by kazade, Sep 2, 2015.

  1. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @treyldog - I'd go with a line voltage inducer, because it's cheaper and that's what I'm developing with :)

    @TerdFerguson - No I haven't looked at this, it *should* just work though... could someone have a play if they have DreamPi working?
     
    treyldog likes this.
  2. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    Do let us know if you get it working with a Line Voltage Inducer and a US Dreamcast modem!

    @TerdFerguson the only trick would be finding a mail server that would be OK with the Dreamcast's lack of modern authentication support. Unfortunately, such a server is likely to be quickly blacklisted by most of the common recipient servers... Are you looking for a DC > DC messaging solution? Or to actually use your DC for typical mail correspondence with the broader internet?

    @kazade downloading the new build now, will update this post with findings. However, I'm not holding out much hope -- I too managed to strip down the AT commands to a minimal set, but it didn't change much.

    Update: Connection success rate change...
    - Quake 3: 0 out of 8 attempts got past "ATA" -- Quake seems to have been broken by this update :(
    - Starlancer: 2 out of 3 attempts connected and got a to a lobby!! Need to do more testing, but this is a definite improvement!
    - 4x4 Evo: 0 out of 3 attempts got past "ATA", note that 4x4 times out fairly quickly (about 30 seconds) so its not very tolerant. (Quake waits like 3 minutes to negotiate a connection.)
    - Maximum Pool: 1 out of 2 attempts succeed and get to a lobby! Also an improvement.

    Note that Quake and Maximum Pool are more verbose about what's happening during a dial attempt, and even when the connection fails, the on-screen status shows that the remote system has answered the call. Quake even shows log-in success, getting hung up at "Configuring..."

    Also, Starlancer and Maximum Pool do make it to lobbies, but its very slow to get there after connection succeeds. The game appears hung for a long time while fetching stuff over the Internet. In the logs there are a number of "Received bad configure-rej:" records, not sure if that's related. Since no one was online, I couldn't test throughput during a game.

    Summary is that what you've done has some impact...but not always what we'd hoped. Quake was the one game I could rely on to eventually connect, but its unhappy with me now...
     
    Last edited: Nov 30, 2015
    TerdFerguson likes this.
  3. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    I was thinking setting up an SMTP send-only server on the pi using postfix or something if you can
    https://www.digitalocean.com/commun...ix-as-a-send-only-smtp-server-on-ubuntu-14-04

    Incoming mail still works, I don't think it will matter too much what server the mail is sent from

    This is great, I've gotten to lobby once on netopia out of many attempts

    Great work on this guys. A lot has been done in a short period of time
     
  4. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @TerdFerguson for pcwzrd and I connecting to starlancer has a 100% success rate! It's slow though, need to investigate those errors. @Jon I'm at a loss, the process now effectively hangs up the phone once the DC starts dialling (ending the dial tone generation) and then answers a few seconds later; a completely new call, with a completely reset modem. I don't think it's a 56k thing, pcwzrd is using his simulator basically just for line voltage and it works fine. The randomness of it doesn't make sense either. I'm wondering if maybe you have a dodgy cable? Perhaps there's noise on the line somewhere?
    Perhaps it's a power thing? Is your modem connected to a hub or directly to the Pi?
     
  5. LeHaM

    LeHaM Site Soldier

    Joined:
    May 5, 2013
    Messages:
    2,634
    Likes Received:
    292
  6. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    Potentially... You'd need a micro USB to 2x USB adapter. I'm waiting to get my hands on one to try :)
     
    Anthony817 likes this.
  7. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    Well its possible...that's why I ordered the line simulator, to rule it out. But I built my second one with a fresh phone cable, fresh cap and resistor, and fresh power supply. Also tried with a wall-wart power adapter instead of a battery. Also tried it with two different Dreamcasts. My network topology is a little odd -- but that's behind the Pi, which is connected directly to the Dreamcast... so I don't see how that could impact the "Answer" (ATA) part...especially if its only some of the time.

    I'll do some more testing when the simulator arrives. If that eliminates the problem, I'll try to tweak cap/resistance on my inducer to match what I can measure coming out of the line simulator, and maybe provide a better build-schematic for an inducer...
     
    Last edited: Dec 2, 2015
  8. treyldog

    treyldog Active Member

    Joined:
    Jul 22, 2015
    Messages:
    28
    Likes Received:
    8
    Alright i know that I'm "bumping"(whatever that means) this thread a lot without doing anything other than asking questions, and that, sadly, will not be changing to much until after Christmas(to young to get a job sadly, dang you early teenage years!), but does one just install the image and copy it to a micro SD card, then insert into the pi, as if the dreampi is just an OS? or do i need to install windows or Linux first?, does the program automatically start on boot-up, so i don't have to hook a keyboard, mouse, and monitor up to the pi to get the DC online? there are so many questions i couldn't find any answer to or no clear answer, I'm sorry if this was a pain to read or respond to, just questions that i, and anyone just getting a pi for dreampi with no significant knowledge of the pi, need answers to before that person could start.
     
  9. LeHaM

    LeHaM Site Soldier

    Joined:
    May 5, 2013
    Messages:
    2,634
    Likes Received:
    292
    can this whole thing be adapted as a general dial up to ip magic do-hickey
    Say if I want to go on pornhub with my Powerbook 100 ??
     
  10. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    @treyldog its almost as simple as that. You download the latest image, then write it to a SD Card from your PC operating system of choice. These instructions will help -- I find the Windows app to be the easiest way to do it.
    Once its written, eject the SD card from your PC and pop it into the PI. Make sure whatever hardware you want to use (display, modem, etc...) is plugged in first, then power up the Pi.

    If all works as designed, you won't need a keyboard, mouse or display -- if your modem has lights, wait for both to light up, signalling that startup is complete and the dial-tone is being transmitted, then dial from your Dreamcast.

    If it doesn't work as designed (which is the case for me) then you'll probably want to see what's happening. In that case, you have two options:
    - Use a display and keyboard to interact with the Pi (if you didn't have them plugged in at boot, you'll probably have to reboot)
    - Use a terminal emulator to remotely connect to the Pi -- this is built-in on Mac and Linux, but you'd have to download some tools to do this from Windows. Connect remotely with: ssh pi@192.168.1.x (supplying the IP address of the Pi on your own network)

    Either way, once you see the Pi's display, you'll need to log-in.
    The default Pi username is: pi
    The default password is: raspberry

    Then, you'll want to kill the background DreamPi process. There are two ways to do it -- I do both, just to be sure it lets go of the modem:
    sudo dreampi --stop
    sudo killall python


    Next you'll want to start DreamPi in interactive mode, so you can see what its doing:
    cd dreampi
    sudo ./dreampi.py --no-daemon


    Assuming you can work through whatever issues your set-up is having, you may want to return to fully automatic (background service) mode. Easiest way to do that is to reboot:
    sudo reboot

    @LeHaM yes, DreamPi could be used for any old device that uses a dial-up modem for Internet service. @kazade has done a great job so far! Dreamcast is one thing, but once I get this down, I want to try Saturn-to-Saturn connections (which will be harder, since the Saturn assumes its dialing another Saturn direclty). I've used DreamPi to connect my old PowerBook G3 and it works great. Whether you can find a browser for a device that old that will let you see more modern websites is another story. You might want to look into Classilla for an OS9 machine, or TenFourFox for an OSX machine.

    For a PowerBook 100, maybe you could find a Gopher or Usenet server somewhere that still has some of your favorite content on it :p
     
    Last edited: Dec 3, 2015
    Anthony817, BLUamnEsiac and LeHaM like this.
  11. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @Jon thanks for that excellent tutorial! I don't suppose you could send me the logs of the latest version with Quake 3 and perhaps also of Starlancer failing?
     
  12. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    I sent my hacking Dreamcast off to get Bios modded. Hopefully it and the Line Simulator arrive at the same time. I do have another 'cast I can test with, in the upstairs home theater, but its a little more disruptive to tinker up there. I'll try to find some time to do some more test runs over the weekend -- once I've made my wife happy by setting up the Christmas tree ;-)
     
  13. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @Jon yeah no rush, I don't have much time at the moment anyway :)
     
  14. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    I've uploaded a new video. I've made some tweaks that make Starlancer quite a bit nicer :)

     
  15. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    So, I got my Line Simulator. This is a quality device, that I bought brand new. It transmits a crystal clear dial tone. So these results are NOT due to line voltage or other phone line problems...

    I wrote a whole bunch of stuff, none of it turned out to be true. The Line Simulator had no impact on success rate. At all.

    I bought one more modem off eBay and will try that -- which will be four modems tested, lots of different phone lines, two voltage inducers, and a real line simulator. Only Quake works reliably, and only 1 out of 3 times.
     

    Attached Files:

    Last edited: Dec 4, 2015
  16. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    I haven't released that yet, and if it was that you'd get past ATA and onto PPP negotiation before it failed :(
     
  17. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    Wait! In send_command, there is a while loop which waits for a response of OK, CONNECT, or ERROR... I think ATA is returning something else and getting stuck! I'll improve the logging for the next release...
     
    Jon likes this.
  18. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    One of my modems often gets stuck at AT+VTX, and I did see that it was that while loop that was the problem. You could be right...

    I modified the function to write every (non-blank) line to the log...
    It looks like sometimes the response gets split across two lines, so that the string match fails. Like instead of:
    CONNECT
    I see:
    CONNE
    CT

    Which will never evaluate as true. Just proceeding with any response seems to mess up the timing, so we do need to wait for something. I modified line 260 thusly:

    if "OK" in line or "ER" in line or "CON" in line or "VCON" in line:


    I'm now at 6/6 success with Quake on 0.97
    Starlancer: 4/4.
    4x4 Evo: 2/2.

    Feeling good about calling this resolved! My solution is a little hacky, but I'm sure you can modify the while loop to be a little more elegant!

    There's some DNS issues still: Some games I have to use 8.8.8.8 (Quake), other games (4x4, Starlancer) I need DreamPI as the DNS Server. But now that I can connect reliably, I can help work on this!
     
    Last edited: Dec 4, 2015
  19. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    Ya, DNS is all messed up... I basically can only use Starlancer right now...

    To troubleshoot, I added my computer's IP and the two new IP addresses you setup for the Dreamcast (.98, .99) to the listen-address line in dnsmasq.conf, then I was able to add some more server=/ and address=/ lines to expand what I could reach. I didn't end up changing much for now...
    I commented out the lines for Quake, and routed those requests to 8.8.8.8. Since I'm using a patched Quake disc image, I think there was some conflict there. And I added a line for dreamcast-talk.

    Everything seems to work fairly reliably now (I'd say 99%) including initial start-up and reset after a call, which were lesser problems I was having before that I didn't bother posting about because of the larger problems.
    Modifying line 260 in dreampi.py as above did the trick.

    I also got Maximim Pool online.

    Played another fun game with two other DC peeps tonite! So happy to finally have it working!
     
    Last edited: Dec 4, 2015
  20. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    Yes!!!!! Cool I'll fix this! Next release will be the one!
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page