DreamPi Software (DC <> Pi)

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

  1. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    So I'm cleaning up and archiving my DreamPi work, since I've sold through my inventory of parts. I figured I'd pop back on here to document what I've learned for posterity, etc. All of the below works for US and Canada (56k Dreamcast modems and 110v power in the house) but can be modified for other regions/voltage requirements.
    Note I am not the creator, just a fellow nerd and sometime seller of kits. Lots of documentation exists for DreamPi, I'm just adding what I learned along the way. If you're new to this thread, read up at http://blog.kazade.co.uk/ first.

    Building a Nice Looking DreamPi
    Here's what my final product looked like. I made them in white and black, and I think both looked pretty awesome. The voltage inducer is decidedly un-awesome, but the end resulted didn't look horrible. The best modem to use is a Dell RD02 modem. My full shopping list is below. I also shipped a Browser Disc (PlanetWeb 2.0) and the attached Quick Start guide with every kit I sold.

    20160218_234010042_iOS.jpg IMG_1039.JPG

    Building the Voltage Inducer
    This is a pain in the butt. I made a walk-through video here, that should hopefully augment the instructions found here.
    You can build a version of this same inducer that does not need a battery, with the same instructions, but using a 9v "wall wart" power adapter instead of the battery clip. It works perfectly, although it does introduce another power supply!

    WiFi
    Wifi enabling DreamPi is pretty easy, but hard to do in a out-of-the-box fashion. Instructions for modifying your /etc/network/interfaces and corresponding supplicants file were here:
    http://pingbin.com/2012/12/setup-wifi-raspberry-pi/
    I bought a tiny Edimax WiFi dongle for my Pi2 that just worked -- no drivers needed.

    Raspberry Pi 3
    The Raspberry Pi3 is a nice upgrade, and works fine with the DreamPi script. However, if you want to re-use your SD card/image from a Pi2 on your new Pi3, don't get rid of your Pi2 just yet! You'll want to run:
    apt-get update
    apt-get -y upgrade

    repeatedly from the Pi2 until no more updates get downloaded, THEN you can move the card to your new Pi3.
    See note below about dealing with small cards/images and OS updates.

    In case you skipped that step, or never had a Pi2 to begin with, here's a disc image with Raspbian Jessie, and DreamPi, that you might want to use:
    http://1drv.ms/1TGjw27
    If you have trouble with OneDrive links, try following this link in "Private Browsing" mode (or whatever the equivalent is on your browser of choice.)

    Parts List
    Good quality parts make a difference. So does construction. See my video link above on how to assemble a solid voltage inducer...
    I included a battery, browser and USB cord, but not the required 2.1 amp USB power adapter, and was able to consistently build these for just under $90 in about 25 minutes. Shipping in the US fits perfectly inside a $6.50 Priority Mail small box. Sold for $110 shipped after eBay takes $10.4 in fees, and you'll do just a little bit better than break-even.

    Troubleshooting the Build
    The two most common problem symptoms are easy to troubleshoot:
    - Do both modem lights come on after the Pi boots? If not, run the script in --no-daemon mode and look for errors. The most likely (non-obvious) cause is an incompatible modem.
    - If both modem lights come on and there are no errors, but the Dreamcast still complains/won't connect, do yourself a favor and find an old corded phone that you can plug into the voltage inducer to listen for a dial tone. If you can't hear an audible dial tone, your voltage inducer is borked.

    Home Wiring
    You can serve your entire household with a single DreamPi, as long as:
    - Your house has a phone line network
    - You don't need said phone line network for anything else

    If you disconnect any external line coming into the house, and connect your voltage inducer phone line directly into any phone outlet in the house (including your de-marc) every other phone jack in the house will get your DreamPi dial-tone!
    I set this up with a WeMo WiFi power outlet, so I could turn my DreamPi on from my phone -- and didn't have to leave it on all the time.
    (I further connected my WeMo to my Amazon Echo, so I can just say "Alexa, turn on the DreamPi")
    Note, just like with a telephone, only one Dreamcast at a time can use the DreamPi.

    Note that the Pi/DreamPi script (not sure which) doesn't like running forever and will eventually go into an un-useful idle state that forces you to reboot before you can use it, so you can't just leave the Pi there on all the time. If you use a WeMo power outlet, you can set it to trip off after 2 hours (or whatever you want.)

    Games that I tested regularly that work (and don't)

    After dozens, if not hundreds, of hours of testing, here's what I'm confident in, regardless of configuration:
    • Quake 3: flawless
    • Maximum Pool: with the necessary VMU file present its almost perfect, once connected. Some flakiness in finding the server sometimes -- not sure which end that's on. Host and join without issues.
    • 4x4 Evolution: works great once connected. Cannot host a game from DreamPi, but can join existing games.
    • Starlancer: I swear this once worked, but it doesn't now. You can see games (after a pause), but can't join. Can't host games either.
    • PSO: flawless -- once its patched (use custom disc image, or boot disc)
    • PlanetWeb 2.0: flawless, and re-directs to the its new home on the web, DreamPipe.net
    Bonus: Dealing with Disc Images
    Download a GParted Live CD, which makes it possible to re-size and copy disc images. If you try to upgrade the OS on a small card, you'll run out of space almost immediately. You'll find that if you simply duplicate that image to a larger card, you'll still be stuck with the same partition size on the larger card -- and still run out of space.
    The solution is a little convoluted: use GParted on the bigger card to make the partition larger, apply the changes, put the card back in the Pi, then run the updates.
    If you want to go back to use the smaller card afterward (easier to upload to people on the Internet, for example), size the larger partition on the bigger card back down in Gparted, then use copy and paste feature (in GParted) to paste the partitions back onto the smaller card. Then take an image of the smaller card.
    You'll need both cards in the computer at the same time to do copy/paste, so you'll need two SD Card adapters (cheap USB ones work fine.)
     

    Attached Files:

    Last edited: Mar 14, 2016
  2. kdkane

    kdkane Active Member

    Joined:
    Jan 20, 2016
    Messages:
    30
    Likes Received:
    6
    Holy .... you are a genius in my opinion, having such a cool idea in first is awesome and to see your Development trough the last weeks going to the FINAL steps giving us all a piece of our DREAMcast back which some i intend may have never or just seen for a short while (back then in germany internet was paid per minute and blocked your Phone line for callers so it was a pain in the *** going online)
    Just gotta say awesome brillant piece of code you created and for sure some damn nice looking hardware Bundle you got us all there looks so good could have been soled by Sega back then :)
    But as I'm in Europe i can't use the actual solution any change theres gonna be an EU Kit in the future ? Is there only the voltage difference to overcome from 110v to 220v or would there be more things to fit for an EU Version!

    Thank you very much for your inspiring work and leeting us all be part of an idea becoming some awesome piece of Hardware & Software ! Wish you all the best and that each and every one owning a DC may buy one of your MAGIc boxes ;-)

    gr33tings from germany
     
  3. Nopileus

    Nopileus Rapidly Rising Member

    Joined:
    Mar 19, 2015
    Messages:
    77
    Likes Received:
    13
    The line voltage inducer runs off a 9v battery, the Raspberry Pi off a USB power supply. There shouldn't be any issues there.

    It's nothing you can't just do yourself as long as your are able to solder a few wires together.
    However modems are unnecessarily expensive over here, might have to get creative or import one.

    @kazade
    are you planning to make the designs for that USB line voltage inducer available eventually?
    I've gotten the SMD soldering bug recently, somehow i greatly enjoy even the horrifically tiny stuff.
     
    Last edited: Mar 14, 2016
  4. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @Jon all that information is awesome, thanks for sharing it!

    @Nopileus yeah, I'll release the Fritzing files under an open licence

    @kdkane I'm the author of the Dreampi software, glad you like it! Although Jon's kits don't work in the EU, you can connect 2 batteries rather than one and it should work. I'll be selling some EU compatible voltage adapters soon, I'll keep you posted!
     
  5. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164


    I only noticed this the other day, because I normally switch stuff off at the wall - my best guess is it's something to do with the dial tone generation but I'll look into it

    Yeah, this is my bad - pcwzrd13 asked me to switch to a new server which appeared more reliable - but then it didn't work and I haven't had a chance to switch back yet. The old one is pretty flaky too though :/
     
  6. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    Getting starlancer working would be amazing, as I've never actually been able to connect even with netopia
     
  7. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    FWIW I have a half finished custom server for Starlancer - but I don't know when I'll have time to complete it :/
     
  8. ultramecha

    ultramecha Rising Member

    Joined:
    May 20, 2016
    Messages:
    68
    Likes Received:
    70
    Just curious, can dreampi be used to connect Sega Saturn netlink to the internet? What about the possibility of connecting two Saturns together via a Ras Pi?
     
  9. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    Should work... I guess someone will have to try and see ;)
     
  10. dingdongyo

    dingdongyo Newly Registered

    Joined:
    Sep 17, 2015
    Messages:
    1
    Likes Received:
    0
    hi, forgive me if this is already answered somewhere in this thread:
    the phone lines in my house are live. if i make this project, will it still work as long as i leave the 9v battery disconnected?
     
  11. Kappa

    Kappa Peppy Member

    Joined:
    Aug 12, 2014
    Messages:
    346
    Likes Received:
    35
    Im pretty sure something like this has been tried for the saturn before, because of the fact that you connect directly to each other on the saturn rather than a server you get desyncs between the 2 players
     
  12. fluffymadness

    fluffymadness Active Member

    Joined:
    Jul 7, 2016
    Messages:
    35
    Likes Received:
    5
    Not so easy to get this thing online :/
    When starting the raspberry (raspberry pi 1) only one light on the modem is on.
    I measured the wires of my cable with a continuity tester all ends are ok and on the red wire I have my 18v.
    Is my modem not compatible ? I bought one from aliexpress which looks exactly the same as the one linked by kazade.

    Here's my lsusb output
    Bus 001 Device 004: ID 0572:1300 Conexant Systems (Rockwell), Inc. SoftK56 Data Fax Voice CARP
    According to a user on kazade's blog, this is the output of the modem that kazade has linked
    Bus 001 Device 004: ID 0572:1340 Conexant Systems (Rockwell), Inc.​

    So I guess there are two version of this thing floating around.

    And here's what happens when I start dreampi with the --no-daemon option

    Code:
    dreampi --no-daemon
    Something went wrong...
    Traceback (most recent call last):
      File "/usr/local/bin/dreampi", line 368, in main
        return process()
      File "/usr/local/bin/dreampi", line 310, in process
        modem = Modem(None, dial_tone_enabled)
      File "/usr/local/bin/dreampi", line 175, in __init__
        self._device, self._speed = detect_device_and_speed()
      File "/usr/local/bin/dreampi", line 76, in detect_device_and_speed
        output = subprocess.check_output(command, stderr=subprocess.STDOUT)
      File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    CalledProcessError: Command '['wvdialconf', '/dev/null']' returned non-zero exit status 1
    
    Any ideas whats wrong ?
     
  13. fluffymadness

    fluffymadness Active Member

    Joined:
    Jul 7, 2016
    Messages:
    35
    Likes Received:
    5
  14. ultramecha

    ultramecha Rising Member

    Joined:
    May 20, 2016
    Messages:
    68
    Likes Received:
    70
    So I can now confirm the Dreampi setup does also connect the Sega Saturn to the internet :)

    Now if only there was a way to maybe emulate the netlink connection so two saturns can connect with the pi? Or if there were a possibly reliable VOIP with an Analog modem Adapter that would work?
     
    TerdFerguson likes this.
  15. AlligatorTaffy

    AlligatorTaffy Member

    Joined:
    Aug 3, 2016
    Messages:
    5
    Likes Received:
    0
    Hey everyone, long time lurker but still a big DC enthusiast. I remember doing the PC-DC server with Win98/WinrouteLITE and using the official Sega servers for PSO and the like. I had dabbled in running a PC-DC server in 2009/2010 running it in VM with Debian and a Zoom USB modem and a patched PSO loader disc to redirect the servers to Sylverant. However, I managed to pick up a BBA in a steal ebay auction and have been using that since. However, I have been following this project for awhile and I may be interested in this to get a few friends online to get down on some serious PSO action like we used to in 2001/2002.

    First things first, I want to thank everyone involved in this project and give you all credit where it is due. An automated script to answer the call so you dont manually have to is utter brilliance.

    My main question is the reasoning of hosting DNS locally/remotely? As i read through the thread, it seemed having it cycle through resolving addresses per game caused timing and disconnect issues. Now that the DNS is being hosted on a central server, it makes the script solely dependent on it until the server goes down, whether that be temporarily or indefinitely. When i used to play PSO on both Schthack and Sylverant, I just made a script that was called upon pressing the "Quick connect" button on my dd-wrt router that would swap host files on the fly that would forward traffic from dead Sega servers to either Sylervant or Schthack. Why is an active DNS used in this case when forwarding traffic via a host file in the Pi would suffice? I guess I can see doing an active DNS to update server paths if/when they change so you dont have to write a new image each time but how often do the community DC servers change?

    Just merely curious if there is, or could be, different releases of DreamPi that essentially act as a dial in server and power users can reserve an IP for the DC in DHCP and make firewall rules for it that would forward traffic to the specific community servers from the stock Sega ones. Then it isn't dependent on the outside DNS to stay up, aid in speeding up the server authentication process, and is basically a standalone, set it up and never need to update device.

    Also, I was looking at what Jon posted about placing the DreamPi into the de-marc. Not a bad idea, granted I don't have phone service, yet being about to toss my pi in my network closet and have it always work would be nice. However, he was mentioning that this isn't feasible because the modem or pi drop into an idle state after so long and require a reboot. Has anyone looked at the TTL of the tone generation state?

    Merely my two cents and tossing some questions out that were on the top of my head. Just was seeing if anyone else out there had a similar thought.
     
    Last edited: Aug 3, 2016
  16. fluffymadness

    fluffymadness Active Member

    Joined:
    Jul 7, 2016
    Messages:
    35
    Likes Received:
    5
    I'm trying to connect to schthack since I finally managed to get a working modem.
    How can I teach dreampi to not ignore the entries in the /etc/resolv.dreampi.conf

    GNU nano 2.2.6 File: /etc/resolv.dreampi.conf

    server=/pso-dc.ath.cx/74.91.127.175
    server=/pso-dc.ath.cx/31.170.162.82
    server=/pso-dc.ath.cx/104.232.32.53
    #Slyverant server
    nameserver 67.222.144.120

    # Google DNS
    nameserver 8.8.8.8
     
  17. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    Just to clarify everything. There is a local DNS server which you can configure however you wish, and by default it upstreams to my DNS server which I update regularly as new servers come online, or servers move etc. This is by *far* the best way of making sure that things keep working for everyone without having to update the image. And like I said, if this doesn't suit your purposes then you can edit the configuration on your PI (this is why there is a local DNS server, so that people can do that).

    I've been working with Jonas, Pcwzrd13 and @TerdFerguson (Dreampipe.net) to keep things up to date so that when Chu Chu Rocket and Next Tetris came back online, DreamPi users didn't have to do anything - it just worked. I'll do the same when AFO comes back. AFO is actually even more fun because that uses a hard-coded IP address and I'm going to have to on-the-fly alter packets for that.

    FWIW, Chu Chu Rocket was running on my server for a while, and then we switched to Jonas' and no-one knew any different. This stuff happens all the time.

    Nothing is stopping you doing this, but it would be a bad idea to make that the default behaviour for non-power users. FWIW the Dreamcast IP is more-or-less static on your subnet x.x.x.98 IIRC, unless .98 is in use in which case it goes searching for another free one.

    There is also the pragmatic fact that, there aren't *that* many Dreamcast users online. By being slightly opinionated about the default server for each game it means that if you connect, you might run into someone, and if there's a Dreamcast Live gaming night on, then no-one has to fiddle around with DNS.

    No, I haven't yet. To be honest the dial-tone generation was a huge amount of trial and error, and I got to the point where when it worked I never wanted to touch it again :p A simple workaround would be to just restart the listening every 10 minutes or so if the user isn't connected. It's fairly trivial, I just haven't had a chance to do it yet.

    No worries :)
     
    TerdFerguson likes this.
  18. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    I don't have access to my dreampi atm. I think the file needs to be in /etc/resolv.d/dreampi.conf though to be picked up...
     
  19. shark69

    shark69 Rapidly Rising Member

    Joined:
    Feb 17, 2014
    Messages:
    77
    Likes Received:
    1
    very cool!
     
    kazade likes this.
  20. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    Yes but what is cool is all the things we're doing make it more likely that the new player will tell his friends
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page