Author Topic: Flea-Scope™ USB Oscilloscope, Logic Analyzer, and more ($18, 18 Msps, WebUSB)  (Read 7007 times)

0 Members and 1 Guest are viewing this topic.

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Hi all,

I've been working on this for about a year and finally got it into production -- it's a super-simple and easy-to-use USB oscilloscope, logic analyzer, and waveform generator that is controlled by a web-page -- with no software install required!  Just open a web-page -- on a computer, tablet, or phone -- and connect to the USB device using WebUSB and you are up-and-running.

The board is basically some life-support and a bit of analog front-end around a fast MCU -- the PIC32MK0512GPK064, with 5 interleaved ADCs running together!

It's also completely open-source, so you can build one yourself if you want and dive into the inner workings -- check out:

https://hackaday.io/project/192598-flea-scope-usb-oscilloscope-18-18-msps-webusb

The full User's Guide with specifications (and a "how it works" section) is here:

https://rtestardi.github.io/usbte/flea-scope.pdf

I am dreaming of getting this into high-schools to help kids build technology again -- not just assemble prefab components -- my first oscilloscope cost $400 and had basically the same specs as this!  It's likely good enough for most things kids can do with a solderless breadboard or wire wrap!

I also think it's an amazing example of how you can use WebUSB to connect to microcontroller gadgets -- and avoid the whole problem of writing an "app" for a half-dozen different platforms, in different languages, dealing with app stores or driver signing or whatever!  Literally, you just open a web-page and you are up-and-running!

The even cooler thing is you can use a different web-page and log in interactively and reprogram the thing in BASIC and take control of all its pins, turning the MCU into a fully re-programmable embedded systems core!

If you know anyone in education who would want these for their classroom, I have a few hundred extra in hackerbox form -- have the school contact me!

-- Rich

 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 736
That looks really nice. Congrats on the product. And great vision that this could be useful for schools and kids.
I'm going to order from Elecrow at least a couple (so that hopefully a couple of kids can show their teacher all about it).
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Thanks!!!  The other place I find this useful is for automotive work...  It is nice to finally be able to see things like the crankshaft sensor signal with just a laptop!

 
The following users thanked this post: pardo-bsso

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
That's cute.

Did you look at the (very) new dsPIC33A ? - claims 2 x 40 Msps ADC's, 40V/us OpAmps,  and 1.6GHz VCO's, comes in 28/36/48/64 pin packages.
Could be a base for a nice Scope/Generator/frequency counter ?

https://www.microchip.com/en-us/search?searchQuery=dsPIC33A&category=ALL&fq=start%3D0%26rows%3D10
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Wow, no, I did not see that one!  And am having trouble finding a real datasheet...

(And the MK/GPK was brand new when I started -- we had to wait until March of this year for production ramp...)

How did you find that?  Might there be one with USB as well?  80 Msps would be amazing -- I could spin the board for that! :-)

The challenge at these rates is you can run out of DMA bandwidth -- I actually had the ADCs working at 20 Msps on MK/GPK, but had to drop it to 18.18 Msps because we ran out of bus bandwidth when I added in digital capture and waveform generation as well.

 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
How did you find that?  Might there be one with USB as well?  80 Msps would be amazing -- I could spin the board for that! :-)

https://www.eevblog.com/forum/microcontrollers/dspic33a-new-32bit-dsp!/

Good question, there are part codes suggesting larger parts, but all I can find is brief :

dsPIC33AK512MC206-E/PT  200 MHz, 512KB Flash, FuSa-Compliant, HS-Analog, HS-PWMs, Touch, 64 TQFP 10x10x1mm TRAY

What data rates does the current model manage on USB ?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Oh, the USB on PIC32MK/GPK is slow -- 12 Mbits/sec -- but that really doesn't matter because we set up trigger (there is well under 1us trigger delay) and capture while we're not using USB, and only after we capture data, then we send it over the USB to be displayed by the web-page -- we can get maybe 10 captures/second (with about 2000 points per capture) even with the slow USB, with a decent host, so you get a nicely animated display.

It looks like there is a dsPIC33A curiosity board available for $98, but no hint of parts themselves from microchip direct -- so no real clue about pricing...  I'd love to know if we have to do interleaving to get 40 Msps (interleaving was a pain and a further burden on DMA), or if it "just works"...  These parts are amazing!  (There was an NXP part that went to 80 Msps, but it was BGA-only and very expensive -- so I passed that one by -- PIC32MK/GPK was the best I could find when I started, but the MCU discovery process always seems like black magic to me, especially across vendors!)
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
It looks like there is a dsPIC33A curiosity board available for $98, but no hint of parts themselves from microchip direct -- so no real clue about pricing...

There is web pricing, no idea how valid it is...
eg
DSPIC33AK32MC102-E/M7    114 $2.41
DSPIC33AK512MC506-E/M7   50  $5.64

 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
I currently pay $8.50 in 1000 quantity for PIC32MK/GPK!

Wow!
 

Online zapta

  • Super Contributor
  • ***
  • Posts: 6377
  • Country: 00
Thant a very nice approach to app software.  Does it support Chrome on Windows/Mac/Linux?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Yes, Chrome, as well as Microsoft Edge and Samsung Internet and Opera -- on Windows, macOS, and Linux -- and Android and ChromeOS as well.

Unfortunately, not iPad and iPhone, since the USB port is walled off from the browser.

It's a dream-come-true to have platform-independent JavaScript rather than a half-dozen apps!

Here's a blurb on WebUSB/Web Serial: https://rtestardi.github.io/usbte/gadget.pdf

There are lots of examples in the repo -- even basic terminal emulators.
« Last Edit: July 17, 2024, 02:48:21 am by rich t »
 
The following users thanked this post: voltsandjolts, pardo-bsso

Offline robzy

  • Regular Contributor
  • *
  • Posts: 155
  • Country: au
Amazing work.

Would be amazing if it had sigrok integration too.

Also what would it take to make it dual channel?
 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 736
I don't like trying to write native apps either; far better to just use JavaScript if possible, and eliminate the cross-platform hassle. The only "workaround" (not really since it uses a different technology) that I'm aware of for that Apple problem, is to use BLE for apps rather than USB Serial. Apple still prevents that, but, someone took basic browser source code with BLE, and turned it into an iOS app. Works nicely, it's called WebBLE. With that, any web app that supports BLE, can also be supported on iOS. The near-negligible downside is that WebBLE is pay software, but it's cheap (a couple of $). I wish someone would write a WebSERIAL app for iOS. Would solve the problem better!
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
Oh, the USB on PIC32MK/GPK is slow -- 12 Mbits/sec -- but that really doesn't matter because we set up trigger (there is well under 1us trigger delay) and capture while we're not using USB, and only after we capture data, then we send it over the USB to be displayed by the web-page -- we can get maybe 10 captures/second (with about 2000 points per capture) even with the slow USB, with a decent host, so you get a nicely animated display.
That's not super fast, so you may be able to consider a USB-UART, if there are no dsPIC33A variants coming with USB.

I've checked a few :
WCH CH347 - HS-USB TSSOP20  8MHz xtal to Dual 9 MBd UARTs,  12K bytes RX-FIFO and 4K bytes TX-FIFO for each UART.
WCH CH343 - FS-USB  Clock recovery 6MBd UART  QFN16  SO16N

upcoming : Prolific PL2523 QFN48 Dual HS-USB-UART, claims 24MBd, I've not located any real parts on this so far.
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
> Also what would it take to make it dual channel?

In a pinch, you can use "trigger out" of one Flea-Scope to trigger the other, and get them to within 1us of each other.  Unfortunately, you need to open two separate web-pages and talk to teh two Flea-Scopes independently (you can assign different hostnames to each Flea-Scope in deep-dive mode to keep them straight, in the GUI and USB).

> That's not super fast, so you may be able to consider a USB-UART, if there are no dsPIC33A variants coming with USB.

Yes, that's definitely possible!
 

Online Grandchuck

  • Frequent Contributor
  • **
  • Posts: 839
  • Country: us
Hi Rich
There are 10s of millions of chromebook computers in student's hands.  I assume the fleascope will work with them.  Should be a great vehicle  for STEM classes.
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Yes, it actually works great with chromebooks -- I test with one that was in the hundred dollar range...

(And it works with every Windows or Mac desktop -- all you need is a USB cable and you can use the scope and even interactively write and debug programs taking control of the MCU and all its pins, with just a web-page...)

The real challenge is finding teachers who really want to teach electronics -- wiring stuff together and such -- as opposed to just assembling prefab components together like in robotics classes...

The first step was just making it cheap enough, and I think I succeeded (my initial goal was $10, but I managed $18, including the retailer margin, and it should be able to self-sustain new unit production indefinitely -- especially if the MCU price does not increase).

So now I am trying to crack the second nut of getting it into students hands -- I knew this would be the harder part of the project, by far...

I have close to a thousand units I can give away if I find teachers who want to put them in their classes...
 

Online Grandchuck

  • Frequent Contributor
  • **
  • Posts: 839
  • Country: us
Rich, I found lots of Colorado schools with STEM programs.  Please see the attached document.

I truly laud your efforts!
 
The following users thanked this post: rich t

Online Grandchuck

  • Frequent Contributor
  • **
  • Posts: 839
  • Country: us



The real challenge is finding teachers who really want to teach electronics -- wiring stuff together and such -- as opposed to just assembling prefab components together like in robotics classes...

The first step was just making it cheap enough, and I think I succeeded (my initial goal was $10, but I managed $18, including the retailer margin, and it should be able to self-sustain new unit production indefinitely -- especially if the MCU price does not increase).

So now I am trying to crack the second nut of getting it into students hands -- I knew this would be the harder part of the project, by far...

I have close to a thousand units I can give away if I find teachers who want to put them in their classes...

I know that problem first hand.  My efforts at stimulating interest among youngsters have landed with a dull thud!  Robots are more fun than squiggles on a screen.  Teachers like/use robotics because there is more native interest there.  We are competing with cell phones, high definition video, and all sorts of "sensational" stuff. :'(
 
The following users thanked this post: rich t

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: ch
Nice! Thanks for sharing, I just ordered one.

BTW some time ago I started developing a frontend for few MHz scopes, added some bells+whistles (compensated 1/10/100/1000 attenuators, switchable 50 ohms termination, AC/DC, wide offset, programmable low/highpass) but eventually stopped working on it as there is no open source scope software that could control it. Sigrok seems stale and I did not find any other option.
Maybe this could make a nice add-on to your design!

2314269-0
https://www.eevblog.com/forum/projects/need-stiff-low-noise-bias-voltage-for-scope-frontend/msg5009881/#msg5009881


Regards, Martin
« Last Edit: July 17, 2024, 05:46:40 pm by Martinn »
 
The following users thanked this post: ledtester, rich t

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Nice!  I have been dreaming of adding a real front-end to measure sub-millivolt signals, but that definitely intimidates me some...  Any idea what the component cost is on what you did?
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 8074
  • Country: ca
  • Non-expert
Looks great, if you do another revision please consider changing the connector to type C.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline robzy

  • Regular Contributor
  • *
  • Posts: 155
  • Country: au
BTW some time ago I started developing a frontend for few MHz scopes, added some bells+whistles (compensated 1/10/100/1000 attenuators, switchable 50 ohms termination, AC/DC, wide offset, programmable low/highpass) but eventually stopped working on it as there is no open source scope software that could control it. Sigrok seems stale and I did not find any other option.
Sigrok isn't stale but it would really benefit from the creation of an open-source easily-implementable control protocol.

Currently, if you want sigrok to control your scope, you have to write a sigrok drivers for it. It would be far easier if you could just implement a protocol in your product and ask sigrok to use this protocol.

</soapbox>
« Last Edit: July 18, 2024, 02:27:00 am by robzy »
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
upcoming : Prolific PL2523 QFN48 Dual HS-USB-UART, claims 24MBd, I've not located any real parts on this so far.

I have an update on this

  • Yes, the PL2523 has been fully released and is available in production quantities.
  • Yes, there is an eval board and we have some in stock @ US$120 each.
No prices seen yet, but the part does seem to be real, tho the Eval board is a bit spenny !

Maybe we wait for someone like DSD Tech to do an adaptor, they already have PL2303GC versions ? 

The PL2523 24Mbd may be the fastest COM Port pathway I've seen.

The CH347 9Mbd COM port and has faster SPI, but SPI is only via DLL drivers, not COM port.

Whatever is chosen, it would be a good idea to allow for HW handshake control so it can be pushed to the system max easily.
The CH347 seems to sustain 9MBd duplex with no handshake lines on my system, on a low overhead terminal.

It may do less on a web-page ?
 
The following users thanked this post: rich t

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 748
  • Country: de
Congrats for this little attractive tool! Do you have any plans to sell it in Europe?

Do you see an easy way to mod it to 4-channel with lower samplerate? Or can an external trigger be connected?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
> Do you have any plans to sell it in Europe?

I believe Elecrow will ship anywhere -- they built the boards and fulfill orders from their end:

https://www.elecrow.com/flea-scopetm-usb-o-scope.html

> Do you see an easy way to mod it to 4-channel with lower samplerate? Or can an external trigger be connected?

I am interleaving 5 ADCs to get the 18 Msps...  Conceivably, you could run them separately at 3.6 Msps and have separate channels, but I have not looked into that.

What I have done on the rare occasion I have needed two channels is just use "trigger out" of one Flea-Scope to trigger the other, and I have to have two separate web-pages open (one for each channel).

The trigger delay is under a microsecond, so this works fairly well.

You can use the "hostname" command in "deep dive" mode to change the names of the scopes (like to "channel1" and "channel2") to keep them straight in the GUI and USB.

But I realize that's more clunky than having multiple analog channels on the same web-page.

> Looks great, if you do another revision please consider changing the connector to type C.

Definitely, that is on my list!
 
The following users thanked this post: theoldwizard1

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
I also think it's an amazing example of how you can use WebUSB to connect to microcontroller gadgets -- and avoid the whole problem of writing an "app" for a half-dozen different platforms, in different languages, dealing with app stores or driver signing or whatever!  Literally, you just open a web-page and you are up-and-running!

I gave this a quick try, with 2 dual port attached, with mixed results :

https://rtestardi.github.io/usbte/flea-scope.html    Gives no compatible devices found

https://armmbed.github.io/dapjs-web-demo/        Gives no compatible devices found

but then I tried intel's google suggested page :
https://intel.github.io/zephyr.js/webusb/    shows list of items, and [connect] gives

Connected Devices:
Added: wch.cn USB Dual_Serial - This is CH347, COM6,COM7 but unclear which port it chose
Status:  Connected

Connected Devices:
Added: STC STC-USB-Link1D   ( This is WCH Dual Serial VCP - COM9 COM10, but unclear which port it chose 1.7.2023.2 )
Status: Connected

Connected Devices:
Added: Prolific Technology Inc. USB-Serial Controller  ( this is PL2303GC, never shows connected, but does show paired )
Status: Disconnected

Connected Devices:
Added: null USB Single Serial  ( this is WCH CH9102 , never shows connected, but does show paired  1.7.2023.2 )
Status: Disconnected

Connected Devices:
Added: Silicon Labs CP2102N USB to UART Bridge Controller    ( never shows connected, but does show paired )
Status: Disconnected


Hmm.. seems not all WEB USB test pages are equal, and it not clear if it can handle a dual serial port. It does not show them separately.

Strangely, whenever it claims 'connected' I can still open both ports in a terminal. Their 'connected' may mean something different ?

The WCH CH9102 seems to use the identical driver to the WCH CH347, but CH347 connects and CH9102 does not ?  :-\

« Last Edit: July 18, 2024, 09:25:27 pm by PCB.Wiz »
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
> https://rtestardi.github.io/usbte/flea-scope.html    Gives no compatible devices found

Did you have a Flea-Scope?

That (flea-scope.html) webpage filters via USB VID/PID to only show "compatible" devices, i.e., Flea-Scopes.

Notice the "filters" in the code at the bottom of this post -- those are the Flea-Scope VID/PIDs (only one of which is used now, the last one).

Also, if a higher level driver has already claimed the device (like the serial driver claiming a CDC/ACM port), then you won't be able to claim it with WebUSB -- since only one driver can own a device.

This is why if a serial driver exists on the platform, you have to use Web Serial instead of WebUSB.

Lots of intro is here: https://rtestardi.github.io/usbte/gadget.pdf

Code: [Select]

// the user wants to connect to a USB device's bulk endpoints directly
async function Usb()
{
    var filter = [
        { vendorId: 0x0403, productId: 0xA660 },
        { vendorId: 0x1b4f, productId: 0xA660 },
        { vendorId: 0x1b4f, productId: 0xE66E },
        { vendorId: 0x04D8, productId: 0xE66E },
    ];

    usb = undefined;
    comm = undefined;
    reader = undefined;
    writer = undefined;

    if ('usb' in navigator) {
        try {
            usb = await navigator.usb.requestDevice({ filters: filter });
            await usb.open();
            await usb.selectConfiguration(1);
            await usb.claimInterface(1);

            document.getElementById("config").hidden = true;
            document.getElementById("help").hidden = true;
            document.getElementById("canvas").hidden = false;

            discard = 1;
            setTimeout(Receive, 1);

            Send(String.fromCharCode(3));  // Ctrl-C
            await new Promise(r => setTimeout(r, 200));  // allow autorun program to stop?
            Send("echo off\n");  // XXX -- figure out how to undo?
            Send("prompt off\n");  // XXX -- figure out how to undo?
            Send("dim unused[8] as flash\n");
            Send("dim cal_zero_x1 as flash, cal_3v3_x1 as flash\n");
            Send("dim cal_zero_x10 as flash, cal_3v3_x10 as flash\n");
            Wave();

            discarded = false;
            setTimeout(Discard, 200);
        } catch(err) {
            document.getElementById("help").innerHTML += "<p><font color='red'>" + err.message.replace(/</g,'&lt;').replace(/>/g,'&gt;') + "</font></p>";
        }
    } else {
        document.getElementById("help").innerHTML += "<p><font color='red'>WebUSB API not found.</font></p>";
    }
}

// the user wants to connect to an emulated COM port
async function Comm()
{
    var filter = [
        { usbVendorId: 0x0403, usbProductId: 0xA660 },
        { usbVendorId: 0x1b4f, usbProductId: 0xA660 },
        { usbVendorId: 0x1b4f, usbProductId: 0xE66E },
        { usbVendorId: 0x04D8, usbProductId: 0xE66E },
    ];

    usb = undefined;
    comm = undefined;
    reader = undefined;
    writer = undefined;

    if ('serial' in navigator) {
        try {
            comm = await navigator.serial.requestPort({ filters: filter });
            await comm.open({ baudRate: 115200, bufferSize: bytes });
            reader = comm.readable.getReader();
            writer = comm.writable.getWriter();

            document.getElementById("config").hidden = true;
            document.getElementById("help").hidden = true;
            document.getElementById("canvas").hidden = false;

            discard = 1;
            setTimeout(Receive, 1);

            Send(String.fromCharCode(3));  // Ctrl-C
            await new Promise(r => setTimeout(r, 200));  // allow autorun program to stop?
            Send("echo off\n");  // XXX -- figure out how to undo?
            Send("prompt off\n");  // XXX -- figure out how to undo?
            Send("dim unused[8] as flash\n");
            Send("dim cal_zero_x1 as flash, cal_3v3_x1 as flash\n");
            Send("dim cal_zero_x10 as flash, cal_3v3_x10 as flash\n");
            Wave();

            discarded = false;
            setTimeout(Discard, 200);
        } catch(err) {
            document.getElementById("help").innerHTML += "<p><font color='red'>" + err.message.replace(/</g,'&lt;').replace(/>/g,'&gt;') + "</font></p>";
        }
    } else {
        document.getElementById("help").innerHTML += "<p><font color='red'>Web Serial API not found.</font></p>";
    }
}
« Last Edit: July 18, 2024, 10:01:59 pm by rich t »
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
BTW, if you just want a simple terminal emulator (without actual emulation) to any USB serial port, try:

https://rtestardi.github.io/usbte/usbte.html

Again, if there is a serial driver on the system, you have to connect to the COM port; otherwise, you can connect to USB directly (you must know your endpoint numbers).

PS this one is even more minimal:

https://rtestardi.github.io/usbte/usbte.minimal.html
« Last Edit: July 18, 2024, 10:18:20 pm by rich t »
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
BTW, if you just want a simple terminal emulator (without actual emulation) to any USB serial port, try:

https://rtestardi.github.io/usbte/usbte.html

Again, if there is a serial driver on the system, you have to connect to the COM port; otherwise, you can connect to USB directly (you must know your endpoint numbers).

That's useful - Different results :
I can connect to CP2102N ok and CH9102 ok and shows separate COMn on Link1D, but it failed to see CH347, until I unplugged/plug ?
The serial terminal and device manager showed COM6, COM7 fine at all times, usbte.html  needed the fresh replug

The good news is all serial ports seem to be (eventually) correctly visible here, and connectable.

Minor points :
There is no disconnect button, you need to exit the webpage ?
It also does not show which port is connected, once connected ?
The screen area for echo is not clearly labeled, once you have an echo you know it can display one.
Addit : and there is no baud rate option, but it is a useful 'Can I connect' test tool

Did you have a Flea-Scope?
That (flea-scope.html) webpage filters via USB VID/PID to only show "compatible" devices, i.e., Flea-Scopes.
Ahh, ok.
If you allowed general serial connect and published the data format, the nifty web-page graphical interface could give a useful debug pathway for general MCU development.


« Last Edit: July 18, 2024, 10:38:08 pm by PCB.Wiz »
 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 736
BTW, if you just want a simple terminal emulator (without actual emulation) to any USB serial port, try:

https://rtestardi.github.io/usbte/usbte.html


I've ordered a couple of Flea-Scopes : ) FWIW, I have a CY7C65213 USB-UART here, and tried it with the usbte.html page. With Chrome on desktop (Win 11), clicking on the COM button is successful. I tried on mobile Chrome (on Samsung S22 Ultra) and that responds 'The Web serial API needs to be enabled..' so I enabled the experimental-web-platform-features, and restarted the mobile Chrome browser, but it still emits that message : ( I tried setting epin to 2 and epout to 1 (I believe that's what the CY7C65213 needs, according to lsusb -v on a Linux box) and clicking on USB, and I see 'https://rtestardigithub.io wants to connect' and 'USB-UART LP', and clicking on that and pressing connect results in 'Failed to execute 'claimInterface' on 'USBDevice' : Unable to claim interface.

I'm not sure, but am thinking there's a chance this isn't currently supported on Chrome on my phone unfortunately : ( but will try with the actual device once it arrives!

Code: [Select]
Bus 002 Device 008: ID 04b4:0003 Cypress Semiconductor Corp. USB-UART LP
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x0003
  bcdDevice            0.00
  iManufacturer           1 Cypress Semiconductor
  iProduct                2 USB-UART LP
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0054
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       2 Abstract (modem)
      bFunctionProtocol       1 AT-commands (v.25ter)
      iFunction               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      5
      bInterfaceProtocol      0
      iInterface              0
Device Status:     0x0000
  (Bus Powered)

 
The following users thanked this post: rich t

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
There is a challenge on Samsung -- the platform binds a serial driver to the device, but Web Serial is not exposed into the browser, so you can't access it via JavaScript.

For Flea-Scope, I released a firmware upgrade to work around this -- v2.27j -- if you tie pin a0 to ground on boot, then rather than exposing CDC/ACM (which the Samsung serial driver claims), I expose a vendor unique class 0xff, which then will only be claimed by WebUSB.  You then have to use the "manual" flavor of the Flea-Scope web-pages, and tell them to use WebUSB instead of Web Serial, and then it works.

Unfortunately, this means you need firmware support to work on Samsung phones -- at least the two of them I have tried -- because Web Serial is not exposed into the browser.  It would be really nice if folks could get Samsung to either stop claiming devices with the serial driver, or add Web Serial support for their browsers.  Or do the real fix and have the serial driver back off when WebUSB wants to claim the device -- this is how Mac works.

 
The following users thanked this post: shabaz

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Sorry, I missed these questions:

> There is no disconnect button, you need to exit the webpage ?
> It also does not show which port is connected, once connected ?
> The screen area for echo is not clearly labeled, once you have an echo you know it can display one.
> Addit : and there is no baud rate option, but it is a useful 'Can I connect' test tool

Yes, refreshing or closing the webpage is the disconnect button. :-)

Yeah, showing which port is connected might be nice -- when you connect to the flea-scope, I do show the hostname you connected to -- so you can set the hostname different for different flea-scopes (like the one that controls my toaster oven is named "toaster") and in that way keep them straight...  If you want to see how to control a toaster oven, see: https://rtestardi.github.io/usbte/toaster.pdf

You can also connect to real uarts that need a baud rate or other signaling options -- here is an example that I use: https://rtestardi.github.io/usbte/usbte.retro.html

That connects to a homebrew 32032 computer that has been running for 36 years -- here it is: https://rtestardi.github.io/retro/retro.pdf




 
The following users thanked this post: ledtester

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
You can also connect to real uarts that need a baud rate or other signaling options -- here is an example that I use: https://rtestardi.github.io/usbte/usbte.retro.html
How does that set Baud etc ?  - it seems to connect, but has no baud choice ?
It seems to use the windows driver defaults, but windows only has a short baud picklist under driver, that limits to a feeble 128k
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2311
  • Country: au
BTW, if you just want a simple terminal emulator (without actual emulation) to any USB serial port, try:
https://rtestardi.github.io/usbte/usbte.html
Because this seems to connect ok, at least at some default bud value, I refreshed my info on fast UARTS, that might be useful to talk to this

Prolific new PL2303Gx series - can set to 12MBd max, has 768 Byte RX Buffer and 256 Tx buffer.
At 12MBd from FT232H, it seems ok with 1024 byte bursts and starts to drop characters at 1280 byte blocks (no handshake used)
At 8Mbd, 1280 blocks look ok.
For large packets, one way, 6MBd looks ok and 8Mbd.N.1  starts to drop characters, and 8M.n.2 gains a bit more time, so looks better  eg 12Mbytes no dropped chars..

Cheapest PL2303GS module I can locate with all hand shake lines & TTL is
https://seengreat.com/product/233/usb-to-uart-pl2303 uses PL2303GS  US$3.99


CH347 is a HS-USB module with 12k buffers and higher sustainable UART speed, and 2 UART channels
Aliexpress has some at reasonable price
https://www.aliexpress.com/item/1005006449193713.html  CH347 module $US4.44
Newest firmware I have supports bauds of 144M/N for N = 16,17,18  (9M, 8.470588M,8MBd)    120M/N, for N >= 16 and  N <= 60  (ie 7.5Mbd ~ 2Mbd )
Below 2Mbd, the baud formula becomes much more granular, and appears to be 6MHz/N  (except in special cases )


 

Offline Hawaka

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ch
Are you using https? If so, how does https works with  the certificate if the device you are connected to does not have access to internet?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
> How does that set Baud etc ?  - it seems to connect, but has no baud choice ?

No choice, since the hardware I'm connecting to only works at 9600 baud -- the rate is set in the JavaScript:

            comm = await navigator.serial.requestPort({ filters: filter });
            await comm.open({ baudRate: 9600, dataBits: 7, parity: "even", stopBits: 2, bufferSize: 1024 });

You can of course change the JavaScript and make it as generic as you want.

> Are you using https? If so, how does https works with  the certificate if the device you are connected to does not have access to internet?

The web-page is on the internet to begin with, so the fact that you could download it from github is a good sign.

However, if you copy the web-page locally, you can use it even without Internet connectivity.

Then you are not using http or https, but a local file path -- see attached image: Untitled.png.

2316057-0
« Last Edit: July 19, 2024, 03:53:24 pm by rich t »
 

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: ch
Nice!  I have been dreaming of adding a real front-end to measure sub-millivolt signals, but that definitely intimidates me some...  Any idea what the component cost is on what you did?
Assembly of two of those boards at JLCPCB cost $53, which includes a lot of setup costs for extended components. I guess for a decent front-end around $10 in parts cost might be realistic.
The question is what would be necessary. For a typical beginner/arduino/maker/embedded programmer your scope as is will be sufficient for 90% of all use cases.
I also started to look at a small, cheap USB scope (pretty much as you did) and thought how one could make this other than just cheap. One benefit of having a low sample rate (and maybe 10 MHz bandwidth only) is that you can afford higher gains (I aimed for 0.5 mV/div), for which a selectable filter makes sense as well (otherwise you risk amplifying noise only). On top I also wanted an ultra wide DC offset range - see mV signals on top of 10 V.
I decided not to support 1:10 passive probes. These work as capacitive dividers above a few kHz, so need to be properly tuned to the scope input capacitance. If you want a switchable attenuator, it needs tuning both for input capacitance and for gain flatness, tyically requiring two trimmer capacitors ($1/pc) per stage. Instead I put a 1/10/100/1000 divider at front to get a wide input range.
Anyway I would not use it as is as you have both control over hardware and software, so probably a single (e.g. 1/30) divider with switchable gain afterwards might suffice (saving $1 for the relay plus $2 for trimmers).
2317155-0
Here's what I have. It is not finished - I found no GUI software I could work with (I could not even find out how to compile Sigrok) and did not want to do my own.
If you are interested, I can help you with a front-end. This is not my main line of work so this was a learning experience for me also. Front-end design is a league of its own, getting real challenging at frequencies of 100 MHz and above. For lower frequencies, it stays more manageable. I think I went for 10 MHz analog bandwidth. For your board, one could think of either a reasonably stripped down version - or an optional add-on board people could attach for more options.
 
The following users thanked this post: rich t

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
> so probably a single (e.g. 1/30) divider with switchable gain afterwards might suffice (saving $1 for the relay plus $2 for trimmers).

That is exactly the kind of thing I was thinking -- also because "calibration" gets harder if you have more choices (today I depend on calibration values as trimmers are way too expensive -- I was shocked beyond belief).  One thing I have been wondering is if digipots might work for me, but I never looked into it -- they also seem to be frequency limited to the megahertz range, which might or might not be OK.

>  On top I also wanted an ultra wide DC offset range - see mV signals on top of 10 V.

One thing I was pleasantly surprised with is how well "digital AC coupling" works -- I just run the same average that I run for the RMS calculation, and offset the whole display by that, allowing the user to zoom in on the noise above/below the average.  The catch is you can't use this beyond the DC range of the scope, so that is part of why having a larger DC range is nice.

> or an optional add-on board people could attach for more options.

Yes, exactly -- and I have the digital I/O already exposed that could control it...  But again, never got beyond the dreaming phase -- we'll see if the basic scope takes off, and definitely enhance it if it does! :-)
 

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: ch
> or an optional add-on board people could attach for more options.

Yes, exactly -- and I have the digital I/O already exposed that could control it...  But again, never got beyond the dreaming phase -- we'll see if the basic scope takes off, and definitely enhance it if it does! :-)
If you modify the firmware/GUI, I'll adapt my front-end to fit your scope design. I think I'd go back to one attenuator stage, but support 1:10 passive probes instead. Apart from that I'd keep all in, so you could experiment with it and try out what/if to keep for an add-on or integrate into your design. What do you think?
For the offset, the current design would best need two DAC channels (or PWM), which would also enable an autocalibration of the gains.
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
The 10x probes were easy to support as they have a variable compensation capacitor (maybe 10-30pF) so are designed to work with a range of scopes...  My input capacitance (14pF) was on the low end for some of the cheaper probes to compensate for -- but the worst case scenario (which I never actually encountered, even with the cheapest probe I found) would be that you just have to *add* some capacitance to the Flea-Scope (like 5pF) at a couple of through-holes that already exist on the board, so I thought this was livable.  If I spin the boards ever, I planned on increasing the dummy load capacitor c8 (in parallel with the capacitive/resistive voltage divider on the input) from 3pF to 6.8pF for exactly this reason.

I'm not sure the firmware and web-page could be shared with the original scope, unfortunately -- as I implemented "calibration" in the web-page itself (even though the calibration values are persisted in the firmware using "flash variables" that already existed in the underlying BASIC OS), hoping to avoid firmware spins for calibration bugs.  So I think any change there would have to be a new product with a new web-page -- trying to weave new calibration functionality into the old design would be pretty risky, IMO.  I've been waiting to see if there is actual interest before diving into that...  Possibly if we end up with an 80 Msps MCU, that would *all* be part of the new product -- informally, I've been referring to that as Mosquito-Scope... :-)

I definitely like the idea of auto-calibration -- right now we do manual calibration as the last step of the manufacturing process, which puts us right at our "1 minute" of allowable touch per board, including programming the firmware...

The part I am using has 3 DAC's, but I use two of them already (so only one is available, and I'm not even sure if its pins are connected) -- one DAC is used for the scope trigger voltage (which runs into an internal analog comparator which does the edge and level detection on the input signal for the trigger modes) and the other is used for the waveform generator.  I wish I had thought of using the DACs for the input range selection, but that thought never crossed my mind... :-)  I do have 5 PWMs available, but currently they are all controlled by the BASIC OS if the user goes into "deep-dive" mode and takes control of the pins...  So this would definitely involve "weaving"...

I am thinking the best way to have an add-on board would be to be able to choose between the built-in front-end and no front-end at all (so the add-on board *is* the front-end, rather than has to augment the existing one) -- otherwise the add-on has to fight the noise floor of the built-in front end...  Right now I route everything thru an internal (to the MCU) op-amp before going into the 5 interleaved ADCs (because the ADCs have quight high capacitive load requirements) -- that seems to be the point we'd want to make the choice...

Unfortunately, I'm also imminently taking some time off -- we are moving next month to a 3-season house in Michigan, which I have to get ready for winter before the first winter -- so my life will be in boxes (hopefully not frozen!) for a while...
 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 736
They arrived very quickly..
I purchased one standalone, and one with USB-C cable and a 'scope probe. Looking forward to trying it out!
 
The following users thanked this post: rich t

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: ch
They arrived very quickly..
I purchased one standalone, and one with USB-C cable and a 'scope probe. Looking forward to trying it out!
Mine also arrived today. In the probe bag there was a small disc capacitor - 10p? Was this accidental or is it thought as "dummy load capacitor c8" to bring the x10 attenuator capacitance ratio into the adjustment range of the probe?
 
The following users thanked this post: rich t

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 736
Hi,

Interesting.. mine has a ceramic disc cap too. I still have it, I thought maybe it was an accidental addition inside the bag! I don't know it's purpose. Maybe it's documented on the GitHub site, I've yet to read it more thoroughly.
 
The following users thanked this post: rich t

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
The capacitor is if you use a cheap 10x probe that can't compensate down to 14pF of the Flea-Scope.

You can add it as described in the user's guide to increase the Flea-Scope input capacitance if needed.


But the probes from Elecrow seem to be good enough without it -- a lot better than some from ali express.


Quote from the UG
Remember to also set your x10 probe compensation -- you can use the waveform output of Flea-Scope set to 1kHz square
wave for that purpose!  If you find your signal is always “over-compensated” (with sharp peaks and overshoot), you may
add a 5-15 pF capacitor between SCOPE IN and ground (GND) pins (see above) to increase the overall capacitance of the
Flea-Scope input circuit to match the higher capacitance of your x10 probe compensation range.
 
The following users thanked this post: shabaz

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
PS in case anyone has not found it yet, the User's Guide is here: https://rtestardi.github.io/usbte/flea-scope.pdf

The main GUI web-page is here: https://rtestardi.github.io/usbte/flea-scope.html

And the deep-dive command-line UI web-page is here (close the GUI first before using the command-line): https://rtestardi.github.io/usbte/stickos-basic.html
 

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: ch
Just plugged it in - first thing that is noticeable is that the LEDs are painfully bright, near impossible to look at the PCB without getting retina burns... I use 10k as default current limiting for modern chip type (0603) LEDs. I'll have to put black tape over them or exchange the LED resistors.
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Oh, sorry to hear -- I actually drive the LEDs at less than 1/10 their max current...  One assembly house swapped LEDs w/o telling me (making them much dimmer), but I am pretty sure Elecrow used the specified LEDs.

If all 3 LEDs are at the same visual intensity, you likely have the right ones.

You can actually turn all LEDs off in deep-dive mode if you want...

To turn off the blue one, use "pins heartbeat none"...

To turn off the red and green, write a tiny BASIC program, save it, and turn autorun on, like:

10 dim red as pin e3 for digital output
20 dim green as pin e2 for digital output
30 red = 0, green = 0
save
autorun on


That should cover you.

To undo, you can use "pins heartbeat e1" and then "new" to wipe out the BASIC program.
« Last Edit: July 28, 2024, 06:14:58 pm by rich t »
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Of if you want to wire your own LED to pin "a8", you can use "pins heartbeat a8" and use it as the heartbeat indicator.
 

Online RAPo

  • Frequent Contributor
  • **
  • Posts: 968
  • Country: nl
My fle-scope from Elecrow arrived today.
The leds are much to bright. They have the same intensity.
Will try the program tomorrow.

Oh, sorry to hear -- I actually drive the LEDs at less than 1/10 their max current...  One assembly house swapped LEDs w/o telling me (making them much dimmer), but I am pretty sure Elecrow used the specified LEDs.

If all 3 LEDs are at the same visual intensity, you likely have the right ones.

You can actually turn all LEDs off in deep-dive mode if you want...

To turn off the blue one, use "pins heartbeat none"...

To turn off the red and green, write a tiny BASIC program, save it, and turn autorun on, like:

10 dim red as pin e3 for digital output
20 dim green as pin e2 for digital output
30 red = 0, green = 0
save
autorun on


That should cover you.

To undo, you can use "pins heartbeat e1" and then "new" to wipe out the BASIC program.
 
The following users thanked this post: rich t

Offline theoldwizard1

  • Regular Contributor
  • *
  • Posts: 176
It appear that I have the same "Failed to execute 'claimInterface' on 'USBDevice' : Unable to claim interface" that shabaz has but on a Amazon Fire Max 11 running Chrome.  I suspect it is the same problem as you mentioned ("the platform binds a serial driver to the device").

Would his work around solve this problem on the Max 11 ?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
The first thing to try is the "manual" flavor of the web-page...

The automatic web-page (which decides on using WebUSB or Web Serial based on the navigator.userAgent) only works for the platforms I have tested on.

So start by opening this: https://rtestardi.github.io/usbte/flea-scope.manual.html

And then try "Start Connect Comm" and "Start Connect USB" one at a time.

If neither of them work, then it is possible you are hitting this issue: https://github.com/rtestardi/usbte/issues/5

The solution to that is to force your Flea-Scope to expose a non-CDC/ACM endpoint, so the serial driver will not attach to it.

You have to start with a firmware upgrade (instructions in user's guide and you need v2.27j):

https://rtestardi.github.io/usbte/flea-scope.pdf
https://github.com/rtestardi/StickOS2/blob/main/board/pic32.X.27j.0x39ca.production.hex

Then you need to ground pin a0 on boot -- this will tell Flea-Scope to expose a non-CDC/ACM endpoint.

Then the serial driver won't attach to it so you have to always use "Start Connect USB" on the manual flavor web-page:

https://rtestardi.github.io/usbte/flea-scope.manual.html
https://rtestardi.github.io/usbte/stickos-basic.manual.html

It is unfortunate that some platforms have serial drivers but do not expose Web Serial into the browser -- the only one I knew of before was Samsung.

Possibly Fire is a second.

Sorry for the trouble.



 
The following users thanked this post: theoldwizard1

Online RAPo

  • Frequent Contributor
  • **
  • Posts: 968
  • Country: nl
I've ordered a second flea-scope, This time with an USB-mini->USB-C cable. Connecting it to my phones (I have two Androids) doesn't deliver any power to the flea-scope.
A desktop PC works well.
Is there any reason it is not working on my phones?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
I have never had an experience where the phone does not deliver power -- is your phone capable of powering and connecting to USB devices, or might the USB port be only for charging the phone?  Flea-Scope is a USB 1.1 device operating at 12 Mbit/sec (aka full speed).  One guy could not get the phone to connect until he switched to a real data cable -- many cables nowadays are power-only.  But as long as you get a cable rated for data (which has more wires, typically 4), it should work -- there is nothing special about the cable from elecrow (well, except I have tested with it :-).
 

Online RAPo

  • Frequent Contributor
  • **
  • Posts: 968
  • Country: nl
I also tried the neighbour's phone. I'm still having no luck. The cable seems all right (see the attached photo).
Tested phone brands:
  • Huawei P smart Z
    Huawei P30 Lite
    Ulefone Note 18 Ultra
    Moto G62 5G
and a Lenovo Duet Chromebook.

All devices can synchronize data with a standard data cable.


I have never had an experience where the phone does not deliver power -- is your phone capable of powering and connecting to USB devices, or might the USB port be only for charging the phone?  Flea-Scope is a USB 1.1 device operating at 12 Mbit/sec (aka full speed).  One guy could not get the phone to connect until he switched to a real data cable -- many cables nowadays are power-only.  But as long as you get a cable rated for data (which has more wires, typically 4), it should work -- there is nothing special about the cable from elecrow (well, except I have tested with it :-).
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 7689
  • Country: va
They probably need an OTG cable, which isn't a normal one. There is an additional pin with resistor, which is missing in your photo (ID).

I had the same issue: phone didn't work with a normal cable plus A adapter. But an OTG splitter (two A socckets, one for external power unused for this experiment) did work fine.
« Last Edit: August 08, 2024, 02:33:23 pm by PlainName »
 
The following users thanked this post: RAPo

Online RAPo

  • Frequent Contributor
  • **
  • Posts: 968
  • Country: nl
Many thanks—that did the trick, even without a USB splitter. I had an old OTG cable lying around, and it connected with power on the first try at each of the above-mentioned devices.
So should the elecrow cable be an OTG or do I have a bad specimen?


They probably need an OTG cable, which isn't a normal one. There is an additional pin with resistor, which is missing in your photo (ID).

I had the same issue: phone didn't work with a normal cable plus A adapter. But an OTG splitter (two A socckets, one for external power unused for this experiment) did work fine.
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 7689
  • Country: va
Quote
So should the elecrow cable be an OTG or do I have a bad specimen?

Depends if it's being sold for use with a PC or phone. Personally I'd expect an A to micro-B to be normal data, and C to micro-B to be OTG (why else would you want a C at the host end). But I'm not involved in any way, so...  :-//
 
The following users thanked this post: RAPo

Online RAPo

  • Frequent Contributor
  • **
  • Posts: 968
  • Country: nl
It was sold as an add-on to the flea-scope ;-)

Quote
So should the elecrow cable be an OTG or do I have a bad specimen?

Depends if it's being sold for use with a PC or phone. Personally I'd expect an A to micro-B to be normal data, and C to micro-B to be OTG (why else would you want a C at the host end). But I'm not involved in any way, so...  :-//
 

Offline theoldwizard1

  • Regular Contributor
  • *
  • Posts: 176
It appear that I have the same "Failed to execute 'claimInterface' on 'USBDevice' : Unable to claim interface" that shabaz has but on a Amazon Fire Max 11 running Chrome.  I suspect it is the same problem as you mentioned ("the platform binds a serial driver to the device").
Well, the Flea-Scope got put on the back burner, but I dragged it out the other day.

The first thing to try is the "manual" flavor of the web-page...  So start by opening this: https://rtestardi.github.io/usbte/flea-scope.manual.html

And then try "Start Connect Comm" and "Start Connect USB" one at a time.
No joy !

If neither of them work, then it is possible you are hitting this issue: https://github.com/rtestardi/usbte/issues/5

The solution to that is to force your Flea-Scope to expose a non-CDC/ACM endpoint, so the serial driver will not attach to it.

You have to start with a firmware upgrade (instructions in user's guide and you need v2.27j):

https://rtestardi.github.io/usbte/flea-scope.pdf
https://github.com/rtestardi/StickOS2/blob/main/board/pic32.X.27j.0x39ca.production.hex
Yep, I was running v2.27g

Then you need to ground pin a0 on boot -- this will tell Flea-Scope to expose a non-CDC/ACM endpoint.

Then the serial driver won't attach to it so you have to always use "Start Connect USB" on the manual flavor web-page:

https://rtestardi.github.io/usbte/flea-scope.manual.html
https://rtestardi.github.io/usbte/stickos-basic.manual.html

Bingo ! Problem solved !!
« Last Edit: January 21, 2025, 01:18:34 am by theoldwizard1 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf