Jump to content
IGNORED

AspeQt for Android (beta).


greblus

Recommended Posts

hi greblus, it is a sloopy built device, should be ftdi based. anyway, it has id of 067b_2303 which is actually a prolific id, so, hope this helps.

 

PL2303 won't work :(. Prolific also provides Android driver (library, no rooting required), so serialport-unix.cpp could be nicely abstracted to support Prolific as well as any other driver, the question remains if it's worth it? FTDI is the winner if it's about usb2serial chips (unless something has changed recently) and two professional adapters are already based on FT232... But I'll add PL2303 to my TODO list anyway ;).

 

But first I've to achieve higher speeds with ftd2xx driver on Android just to keep the faith and have fun with it.

 

Thanks for your testing and time.

W.

Link to comment
Share on other sites

Ken, I'm sorry to hear that :(. Unfortunately the apk is not tested on Lolipop as I don't have any device with it yet, but my Samsung phone has a long time promissed upgrade to Lolipop soon. It doesn't support USB Host, but if crash you report is somewhat related to Lolipop, I'll have the chance to diagnose it.

 

Please keep watching github repo commits here:

https://github.com/greblus/aspeqt/commits/android

 

If you are brave enough to try debugging it with me I will prepare a debug build with higher level of logging enabled.

 

Then In order to debug the crash you'd have to do a few things:

 

1. Enable USB Debugging in your Android device.

2. Install Android SDK and adb driver for your device on the PC in order to be able to run adb tool to dump the log.

3. Check if adb works. After you install Android SDK, go to <your_sdk_path>/platform-tools/ and run adb.exe devices.

If adb works you'll see something like that:

 

$ /e/Tools/ASDK/platform-tools/adb.exe devices
List of devices attached
320454afadec916b device

It might be necessary to authorize your computer to access USB Debugging on your device (it'll show a popup

message asking for authorization after you connect your tablet to the PC using USB cable).

 

4. adb.exe shell logcat -c (to clean the log)

5. adb.exe tcpip 5555

6. adb.exe connect <ip of your tablet's wifi card>

7. Disconnect usb cable.

8. Connect ftdi cable and after crash run: adb.exe logcat -d > log.txt

 

Then send me the log.txt file. I'm aware that it sounds a bit crazy and not for everyone :) so I'll fully understand if you

say no and wish me luck ;P

 

Cheers,

W.

Link to comment
Share on other sites

GLORIOUSNESS! I just finally got my Sio2PC USB and I've been enjoying the everloving crap out of finally playing "Bounty Bob Strikes Back" on the original hardware! Now it appears I may be able to do this from my phone, my Shield, or perhaps a dedicated ODROID rather than having to run a USB cable across my room for my kid to trip over! Thanks, looking forward to playing with this!

Link to comment
Share on other sites

GLORIOUSNESS! I just finally got my Sio2PC USB and I've been enjoying the everloving crap out of finally playing "Bounty Bob Strikes Back" on the original hardware! Now it appears I may be able to do this from my phone, my Shield, or perhaps a dedicated ODROID rather than having to run a USB cable across my room for my kid to trip over! Thanks, looking forward to playing with this!

 

Thanks. I'm really hoping for at least one positive report in this thread ;) so good luck and let me know about your results.

 

Cheers,

W.

Link to comment
Share on other sites

 

Here's another movie. Hence I can't turn on hardware flow control in current version of d2xx driver for some reason which is unfortunately unknown to me yet (it may be my ignorance I'm afraid) speed greatly depends on the cpu speed. On my wife's phone @ 57600bps it does not choke.

 

Cheers,

W.

Link to comment
Share on other sites

 

I can't turn on hardware flow control in current version of d2xx driver for some reason which is unfortunately unknown to me yet (it may be my ignorance I'm afraid) speed greatly depends on the cpu speed. On my wife's phone @ 57600bps it does not choke.
It just have strucked me that probably I made false assumption about hardware flow control: the original code is simply opening the device, de-asserting DTR and RTS lines, setting the speed and checking "modem" status to react on COMMAND line changes. In Lotharek's device it's attached to DSR line and that's simply it. And that's what I'm currently doing following the original logic.
If I understand it well, setting ftDevice.setFlowControl(D2xxManager.FT_FLOW_DTR_DSR, (byte) 0x00, (byte)0x00 ) won't help here.
According to FTDI KnowledgeBase the device will transmit if DSR is active and will drop DTR if it cannot receive any more.
And that's the only thing that bothers me: turning it on shouldn't affect Sio2PC-USB work, but when it's enabled, (most probably due to incorrect timing) DSR low is preventing writes and communication fails without ACK's. Or there is some bug in d2xx.
That's my theory. If any of Atari wizards here could enlighten me, I'll be grateful ;).
Cheers,
W.
Edited by greblus
Link to comment
Share on other sites

Hi again.

 

I've just noticed this remark on atari8warez's website:

 

Atari8Warez Custom drivers (A8W) are used for devices pre-programmed with Atari8Warez custom product-ID (PID) and manufacturer name. The PC OS will not automatically install drivers for these devices.

 

So to have Ray's sio2usb device supported on Android some lucky owner would have to give me pid and vid of this device. Otherwise it won't be opened by the d2xx driver bundled with the apk.

Link to comment
Share on other sites

  • 4 weeks later...

Hello.

 

I've created an experimental branch of AspeQt for Android, where ftd2xx was replaced by slightly modified usb-serial-for-android library (added getStatus() to ftdi driver to poll "modem status" header and Ray's sio2pc-usb pids, plus some other minor changes).

 

It's here:

 

https://github.com/greblus/aspeqt/tree/us4a

 

and the apk is here:

 

https://github.com/greblus/aspeqt/raw/us4a/android/apk/aspeqt.apk

 

It's worth the effort as the library is opensource and:

 

1. The app could be added to Google Play (no licencing issues).

2. This driver library also supports Prolific PL2302 which I'll add soon.

 

It's the first released apk and it's the result of one evening spent on it, so don't be too optimistic yet (but it works for me, tested it this morning on my cheap tablet with JellyBean and on a mobile phone with Kitkat).

 

Cheers,

W.

Edited by greblus
Link to comment
Share on other sites

Hello.

 

I've created an experimental branch of AspeQt for Android, where ftd2xx was replaced by slightly modified usb-serial-for-android library [...]

[...]

2. This driver library also supports Prolific PL2302 which I'll add soon.

 

I've just added PL2303 support and switched to usb-serial-for-android in main android branch:

 

https://github.com/greblus/aspeqt

https://github.com/greblus/aspeqt/raw/android/android/apk/aspeqt.apk

 

it still needs some love here and there, but it works. My Sio2PC cable based on PL2303 is able to open the port at 38400bps stably but by ear it's something like 19200bps. It behaves exactly the same way on a PC, so FT232 is definitely recommended.

 

Previous branch renamed to ftd2xx is still there.

 

Cheers,

W.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

This is very interesting. I currently use a netbook with Windows 7 (to be honest, the netbook sat around collecting dust until I got a SIO2PC,) to run Aspeqt when I am using it with my Atari computer, but the convenience of using my phone would be really nice. Though my current one, a Samsung Galaxy S3 is probably too old to support this, I'll be keeping an eye on this for when I have a newer andriod device.

Link to comment
Share on other sites

This is very interesting. I currently use a netbook with Windows 7 (to be honest, the netbook sat around collecting dust until I got a SIO2PC,) to run Aspeqt when I am using it with my Atari computer, but the convenience of using my phone would be really nice. Though my current one, a Samsung Galaxy S3 is probably too old to support this, I'll be keeping an eye on this for when I have a newer andriod device.

 

Actually Galaxy S3 has better specs than my Android tablet ;), so if only it supports usb-host (you can test this functionality with this app: https://play.google.com/store/apps/details?id=eu.chainfire.usbhostdiagnostics&hl=pl)it should work well.

 

Cheers,

W.

Link to comment
Share on other sites

Hi.

 

Here's AspeQt-1.0-rc2 aka "two steps backward, one step forward" ;).

 

https://github.com/greblus/aspeqt/releases/tag/AspeQt-1.0-rc2

 

- xex files loading with SOFT command frame detection still does not work.

- atr loading stalls occasionally with hardware CF detection (it's a new regression).

 

But... SOFT mode with Pokey divisor set to 6 works great on JellyBean and Kitkat. My goal for -rc3 is to fix xex loading and i'll be happy with it as a default option.

 

Generally it's been quite an interesting thing: I decided to do hardware command frame detection on Java side (SOFT mode too). This way the amount of QAndroidJniObject::callStaticMethod() calls was reduced (JNI is expensive if one has to use it a lot).

 

Cheers,

W.

Edited by greblus
  • Like 1
Link to comment
Share on other sites

Hi.

 

And here is AspeQt-1.0-rc3:

 

https://github.com/greblus/aspeqt/releases/tag/AspeQt-1.0-rc3

 

This one I'm particularly proud of as it works really nicely in SOFT mode on all my Android devices.

 

And I also wanted to thank Drac030 for his sio2bsd where the idea of software command frame detection was beautifully implemented.

Link to comment
Share on other sites

Blackberry classic is one of three devices which are supporting USB host :)

 

http://developer.blackberry.com/develop/supported_media/bb10_accessory_usb.html

No kidding! That's really cool. I love BlackBerry. They totally lost their edge for awhile after the iPhone came out though. It's nice to see them back (more or less) again!

Link to comment
Share on other sites

I've started getting my ducks in a row. :)

 

Both my surviving Android tablets support host mode USB since they are designed to work with an external mouse and/or keyboard. All they needed was an on the go <OTG> cable that was ~$6 at Fry's. Both run Aspect for Android but there is some display corruption on the 4.3" tablet. I can't find a working SIO2PC cable at the moment. I have all the parts to build one of course.

 

The Prolific chip set, not really important since your software seems to work fine with them, they had the same problem with counterfeit chips as FTDI and took the same solution of disabling their drivers if they detect a counterfeit. Makes it just a bit more difficult if you use SIO2PC USB with the same adapter to a Windows computer. The counterfeit chip seems to run fine and is automatically detected by AsAd on plug in.

 

I haven't done a lot of testing yet, waiting on getting a SIO2PC cable working. None of my Android cellphones are OTG ready. Not really a show stopper since my tablets work and in general you can pick one up for less then $50.

post-35434-0-19741100-1444753960_thumb.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...