DreamPi Software (DC <> Pi)

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

  1. LordFenixNC

    LordFenixNC Peppy Member

    Joined:
    Aug 24, 2014
    Messages:
    300
    Likes Received:
    72
    and then we can mod my two thin clients lol
     
  2. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
  3. RedRingRico

    RedRingRico Rising Member

    Joined:
    May 26, 2009
    Messages:
    50
    Likes Received:
    28
    Using 0.98, DreamKey 3.0 seems not to be connecting:
    Dec 6 16:10:38 dreampi Starting daemon
    Dec 6 16:10:40 dreampi Detected device ttyACM0 with speed 460800
    Dec 6 16:10:40 dreampi kernel: [ 30.438267] Netfilter messages via NETLINK v0.30.
    Dec 6 16:10:43 dreampi Opening serial interface to ttyACM0
    Dec 6 16:10:43 dreampi ATZ0
    Dec 6 16:10:43 dreampi OK
    Dec 6 16:10:43 dreampi AT+FCLASS=8
    Dec 6 16:10:43 dreampi ERROR
    Dec 6 16:10:43 dreampi AT+VLS=1
    Dec 6 16:10:43 dreampi OK
    Dec 6 16:10:43 dreampi AT+VSM=1,8000
    Dec 6 16:10:43 dreampi OK
    Dec 6 16:10:43 dreampi AT+VTX
    Dec 6 16:10:43 dreampi OK
    Dec 6 16:11:10 dreampi Heard: 5
    Dec 6 16:11:13 dreampi ATH0
    Dec 6 16:11:13 dreampi OK
    Dec 6 16:11:13 dreampi ATZ0
    Dec 6 16:11:13 dreampi OK
    Dec 6 16:11:18 dreampi ATZ0
    Dec 6 16:11:18 dreampi OK
    Dec 6 16:11:18 dreampi ATA

    At this point the browser states it cannot connect, then when I try to reconnect nothing else happens. I had it connect two times, but there's no consistency or reason for it not connecting. After the first connection attempt fails, the modem lights switch off (OH and DATA).

    Here's what the successful connection looks like:
    Dec 6 16:24:06 dreampi Starting daemon
    Dec 6 16:24:08 dreampi Detected device ttyACM0 with speed 460800
    Dec 6 16:24:08 dreampi kernel: [ 26.638981] Netfilter messages via NETLINK v0.30.
    Dec 6 16:24:11 dreampi Opening serial interface to ttyACM0
    Dec 6 16:24:11 dreampi ATZ0
    Dec 6 16:24:11 dreampi OK
    Dec 6 16:24:11 dreampi AT+FCLASS=8
    Dec 6 16:24:11 dreampi OK
    Dec 6 16:24:11 dreampi AT+VLS=1
    Dec 6 16:24:11 dreampi OK
    Dec 6 16:24:11 dreampi AT+VSM=1,8000
    Dec 6 16:24:11 dreampi OK
    Dec 6 16:24:11 dreampi AT+VTX
    Dec 6 16:24:11 dreampi CONNECT
    Dec 6 16:24:35 dreampi Heard: 5
    Dec 6 16:24:37 dreampi ATH0
    Dec 6 16:24:37 dreampi OK
    Dec 6 16:24:37 dreampi ATZ0
    Dec 6 16:24:38 dreampi OK
    Dec 6 16:24:43 dreampi ATZ0
    Dec 6 16:24:43 dreampi OK
    Dec 6 16:24:43 dreampi ATA
    Dec 6 16:24:57 dreampi CONNECT 9600
    Dec 6 16:24:59 dreampi Call answered!
    Dec 6 16:25:01 dreampi kernel: [ 63.731488] PPP generic driver version 2.4.2
    Dec 6 16:25:01 dreampi
    Dec 6 16:25:01 dreampi Connected
    Dec 6 16:25:01 dreampi pppd[2862]: pppd 2.4.5 started by root, uid 0
    Dec 6 16:25:01 dreampi pppd[2862]: Using interface ppp0
    Dec 6 16:25:01 dreampi pppd[2862]: Connect: ppp0 <--> /dev/ttyACM0
    Dec 6 16:25:04 dreampi pppd[2862]: found interface eth0 for proxy arp
    Dec 6 16:25:04 dreampi pppd[2862]: local IP address 192.168.2.99
    Dec 6 16:25:04 dreampi pppd[2862]: remote IP address 192.168.2.98
     
    Last edited: Dec 6, 2015
  4. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    @kazade I'm also seeing hangs at ATA on 0.98 -- I think your approach to resolve didn't work. It catches the error and crashes, killing the script, but still doesn't seem to evaluate partial responses as true.
    Adding "CO" and "ER" as valid responses at line 254 of dreampi.py resolves the issue almost 100%. But the timeout interval is a little short, and sometimes kills the loop (and the whole script!) too fast...

    Also, can you please add some lines to dnsmasq.conf to improve connectivity?
    server=/dreamcast-talk.com/8.8.8.8
    server=/dctalk1.servequake.com/8.8.8.8

    These lines are necessary to allow patched Quake 3 discs to get to the lobby.

    If there's a way to do CNAME style re-direction, doing
    master2.4x4evolution.com -> master5.4x4evolution.com
    Would dramatically speed up time to lobby in 4x4 Evolution. master5 is the only server that works, but the game tries every other server first!!
     
    Last edited: Dec 6, 2015
  5. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    That's weird, it looks like your modem is refusing to enter voice mode. Did this just start happening in 0.98 or was it always happening??

    You mean the timeout for send command? It's throwing the IOError? I'll up it to 30 seconds - hopefully that will fix it.

    I don't understand this. All DNS requests that aren't listed should fall back to 8.8.8.8 unless the PSO entry in /etc/resolv.dreampi.conf is still causing issues? I don't really want to add these lines without understanding why it's not working, and why those lines seem to fix it. Especially as unpatched Q3 is working fine...

    I'll get on this!
     
  6. RedRingRico

    RedRingRico Rising Member

    Joined:
    May 26, 2009
    Messages:
    50
    Likes Received:
    28
    It's just started happening. The last version I used was 0.92 or 0.93, I can't remember which version exactly.

    Before I was getting issues with "AT+VLS=1." Though that seems to be resolved.
     
  7. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @RedRingRico Yeah the AT+VLS=1 was affecting everyone - what you are seeing right now is very weird because it's literally the second command we send to the modem besides the soft reset command... and the fact that it only happens sometimes is odd. How comfortable are you editing the code? If you could insert a time.sleep(1.0) line before the line that sets AT+FCLASS=8 we can see if it's a timing issue. I do remember reading that some modems require a bit of a wait after a soft reset before sending more commands...

    @Jon Does upping the timeout (to say 30 seconds) alone fix your ATA problem? If not, can you see how my new logic is failing in send_command?
     
  8. kazade

    kazade Spirited Member

    Joined:
    Jul 22, 2015
    Messages:
    155
    Likes Received:
    164
    @RedRingRico There is one other thing bothering me about your output:

    Dec 6 16:24:57 dreampi CONNECT 9600

    That is a ridiclously slow speed for the connection to succeed with. Presumably you are using a 56k Dreamcast modem so I'd expect that to be something like 460800, or at least whatever the value is for 33.6k..

    Is your phone line OK? Line voltage alright?
     
  9. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    Just going to leave this here http://www.ebay.com/itm/272067435045

    The price of it might be $88 with an actual DC.. A rasperry pi + modem is like $60 MAX MAX MAX. I feel bad for the people that spent $110 on this..

    Edit: Maybe overpay a bit to not make the voltage inducer, but damn not by more than double what it should be
     
  10. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
  11. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,566
    Likes Received:
    1,311
    It does say he had permission
     
    TerdFerguson likes this.
  12. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    That's my eBay post, and yes it's with permission. It sold out in 24 hours, with over 20 more people expressing interest in buying, if I can make more. Not everyone is comfortable assembling their own, and at $104 it's worth it to them. Here's how the BOM breaks down to $88.28.

    High quality phone line: $4.95 each
    Capacitors: $0.21 each
    Resistors: $0.05 each
    Good 9v battery: $2 each
    Battery clip (good quality): $4
    Pi 2 rev B: $37.98
    Pi Case: $7
    Project case to protect voltage inducer: $3
    Modem: $15 (average, factoring in that 1 in 4 bought are garbage)
    SD card: $3 (if bought in a pack)
    Solder supplies: $0.06 per
    Glue supplies: $0.03 per
    Browser (retail disc): $8 (average on Amazon/eBay)
    Micro-USB cable: $3

    Edit: Here's my Amazon shopping list for parts, for full transparency:
    http://www.amazon.com/gp/registry/wishlist/T8DA36MW8LE0/ref=cm_wl_list_o_13?

    My goal was $100 retail, $10 shipping. eBay wouldn't let me charge more than $6 for shipping (even though that's what it'll cost) so it ended up at $104. That's gets me $10 to cover shipping and $11.72 of mark-up for the hour+ I spend building and testing each one -- not exactly a big money maker!

    In fact, if I sell 20 of these, it will make up most of the cost of equipment I spent on this project. (does anyone want to buy a Viking DLE-200B Phone Line Simulator?!) At that point, I'll invest more in seeing if I can get the costs down (eg: Pi Zero), and maybe a cheaper source for battery clips (most cheap ones are garbage, and since the inducer is the most delicate part of the solution, I'm doing everything I can to make it high quality!)

    Incidentally, I'm Canadian, not American. But I do believe that there's value in building things people want. From a customer perspective, this is better than a BBA for $50 (or more) less.
    Kazade has made great free software -- which I am not selling. I'm selling a ready-to-use kit, with instructions my 9 year old can follow, for people who love Dreamcast, but don't know how to solder.

    Update: a half dozen "potential customers" have contacted me for advice on how to make their own. I've given each of them as much information as I could to help them do it themselves -- including sending them to Kazade's blog. Information and ideas should be free. Products should not.
     
    Last edited: Dec 7, 2015
  13. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    I don't know, but commenting out the timeout entirely fixed the problem :) at least in conjunction with making the string check more tolerant. I'll try a 30 second time out when I can - probably Friday night, since I have to travel for work this week.
     
  14. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    I stand corrected
     
    Anthony817 and Jon like this.
  15. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    Open to ideas to get costs down!! I really just want more people to play Dreamcast with me :)
     
    Anthony817 likes this.
  16. LordFenixNC

    LordFenixNC Peppy Member

    Joined:
    Aug 24, 2014
    Messages:
    300
    Likes Received:
    72
    @Jon any % off for bulk orders?? Im working towards opening a small location. A place for people to come play arcade machines and consoles also I know a few ppl here who would want one but $115 out thier budget.
     
  17. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    893
  18. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    Scale is hard -- it doesn't really get cheaper: most of the prices above already assume commodity parts are bought in some kind of bulk, plus its just me and my afore-mentioned 9-year old assembling everything (I think @kazade plans to do his own production too.) The Pi Zero would certainly get costs down, but it would need a dongle/hub for the modem and a USB-ethernet adapter -- and until the software is 100% perfect, they're a little harder to troubleshoot.
    That said, its really the soldering of the voltage inducer that takes the most time. As @TerdFerguson pointed out, setting up the Pi itself is pretty simple.

    @LordFenixNC, if you want to handle purchasing and setting-up Pi's locally, I could think about stepping up voltage inducer production -- honestly though, I'm not sure my output quality is good enough for any significant scale. I'm using the best parts I can find, and I'm starting to get pretty good at the solder. But the phone line wire is fiddly and small, and the cap and resistor are on equally fine wires. Gluing the wires inside a little case has so far stood up to my 3 year old tripping on it and my cat chewing on it -- compared to bare wire, its certainly a step up. But ideally this should be done on a printed circuit board.

    Someone on the Facebook page had the idea to embed these in the DC itself -- that would be even harder to scale. I kind of like the idea of ripping apart the DC modem to see if there's enough room to jam a Pi Zero in there and building everything in. I'm thinking that what @kazade's done so far is 90% of the way to a plug-and-play solution -- that's why I felt comfortable increasing the reach a little through eBay. But at this point I'm also signing up to support those "customers" personally through whatever problems they run into -- on the theory that I've learned all the potential problems the hard way :p At $11 profit from each one, that support can't scale either!!
     
    Last edited: Dec 7, 2015
    Anthony817 likes this.
  19. LordFenixNC

    LordFenixNC Peppy Member

    Joined:
    Aug 24, 2014
    Messages:
    300
    Likes Received:
    72
    The zero should fit. But you would also need to fit the two 2 usb modems and power source. Also heat

    Edit.

    You can sodder a eithernet port
     
    Last edited: Dec 7, 2015
    Anthony817, -=FamilyGuy=- and Jon like this.
  20. Jon

    Jon No longer active

    Joined:
    Nov 5, 2015
    Messages:
    50
    Likes Received:
    24
    What would be REALLY awesome is if we could solder a wireless NIC onto a Pi Zero embedded in the DC modem, then digest the dial up credentials passed by the DC as a SSID and WPA key. Even if it still needed external power hanging off the modem, that would be a million times more convenient than the current three wire + battery solution...

    Yup, I'm gonna have to try this.
     
    Last edited: Dec 7, 2015
    Anthony817 likes this.
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page