USB CDC support in TinyCLR 2.0

Will we have USB CDC support in 2.0?

I want to consider adding a modem to the design that has a USB port that creates 4 serial channels. 1 is used for AT commands, 1 is used for the PPP connection, 1 is used for debug and the last one is for GPS. This modem works very well and is very stable with the Android system and having separate channels means I can still receive SMS whilst the PPP connection is active unlike if I was to use the single hardware UART interface.

We do support CDC but on USB client only. Host only supports mass storage class MSC.

Oh dear, that is not good to hear. The lack of CDC support on the host interface means that I cannot use the modules with a GPRS modem, at least not fully. That puts a major dampener on future use as remote data communications is paramount to what I do. :frowning:

Is there anyway way to get this support without paying huge amounts to develop it?

We give you PPP sir. You can use any modem on the market over serial port. This should be better than USB.

The USB exposes more than 1 serial port thus allowing you to do SMS and AT commands at the same time as having a PPP connection.

I’ll have to look at this and see how I can get around the issue.

I know from long time ago that there was a way to do that with a serial port as well. We would have to investigate

Hi Gus, it may sound like I am throwing rocks at you just now but I am just looking for ways to be able to use these going forward. :slight_smile:

The only way you can do this is with the MUX protocol that these modems have for the serial port. This allows you to have more than 1 stream on the same port but it does require more work. The USB port is the quickest way to do this. How much work is needed to add multiple serial CDC to the USB HOST?

But we may have mux support already built in, which is why I said we shall investigate.

Adding CDC to USB host is not difficult but it this point we have to stop adding features and release the software.

Either way, what modern are you using in case we want to get one and test?

Thanks Gus. I am using the SIM7600E-PCIE from SIMCOM. This is LTE and has GPS and comes in a nice PCI Express format. I think the SIM7600E part is for Europe and Asia but I know there is US version in PCI format too. I think it is the SIM7600A but I also know there is a SIM7600G-H that is for all regions but not sure of certification.

Was there a decision made on USB CDC support for TinyCLR 2.0 preview?
Like Dave_McLaughlin I would like to use USB cellular modem. I know there are UART/PPP options out there but USB is easier and sometime cheaper for small IoT deployments. It would be a big help if it was available.

It is fully supported on client, not host. We need a good case of why we should supported, for commercial reasons, to consider adding. Please provide exact modem model and why you want to user it instead of the many serial modems and what commercial application are you building. You can contact yu directly if you do not want to talk about your product here

Hi Gus, I am quite happy to share the reasons for CDC support for modems. I’ve already explained some of this before.

I am using the SIMCOM SIM7600E-PCIE which is a PCI Express Module which makes adding this to your board as easy as adding 3.3V and connecting USB. That modem also has GPS.

If we use the UART, we are stuck with only a single channel for AT commands which means we cannot support GPS, SMS and PPP at the same time. We also can’t query the signal strength etc. I have plans to use the SC20260D as a mobile and data logging platform so simultaneous GPS, PPP and SMS are critical.

There is a multi-plex option available over the UART port but this is going to need a driver developed and CDC support on the host would probably take as long to develop, possibly sooner as you already have this for the client port.

With CDC support, the modem appears as a number of USB Serial Ports and you can use them to control the modem via AT commands to setup PPP on one port, GPS on another and SMS and signal query on a 3rd. There are some additional ports for debug etc.

Now, I realise that your concerns may be security issues with the AT commands but I don’t see any difference with the fact that the PPP connection will be setup via AT commands if we use UART or USB-UART.

Hope this helps to make it clearer, the need for the CDC support on the host port?

PS. I assume if we add a USB HUB to the existing host port, we can expand the number of USB host ports and still get the same capability on each port?

Am I correct here to say the main reason and maybe the only reason is you need GPS with cell, which we do not support today?

This is regarding if using serial or USB.

You can easily plug in a click module as easily.

We do not support USB hubs today.

Yes, I need GPS with CELL all at the same time.

No disrespect to the Click manufacturers, but a click module is expensive. I get the SIM7600E-PCIE modules for $39 and this has GPS and LTE.

So no way to have any USB download if the USB port was to be used for the modem. Mmmm. I may have to consider how to get around all of these limitations. The old G400D has 2 host ports. :frowning:

I can see other uses for the modules but not the one I was hoping for.

This is current software limitation that will likely vchange in the future.

As far as long term compatibility USB is the most forward looking. The form factor of PCI Express or even standard USB A are also industry standard. Click or xbee style modules are usable but not necessarily industry standards (at least not as broadly available as PCI Express). The cellular market is a fairly volatile market due to industry standards and cellular providers. For low volume its a challange to find a modem that doesn’t lock you in or require a complete board redesign when technology changes.

(Which is actually why I am even considering the SITCore. I went with a fairly popular IoT platform that included hardware and they didn’t provide an upgrade to 4G for the module I was using. Their new 4G hardware is not as capable and either way I have to create a whole new board design.)

The added benefit of multiple com ports makes USB an even more desirable approach.

Even though GPS isn’t supported natively in TinyCLR the data stream, at least in my case, would be processed by the cloud. If local processing is needed I am sure could be done with stand C# libraries.

Gus, I came across this on github. It is written in C/C++ and supports the gsmmux protocol.

Wondering if we could port this? It has been written for Linux by the looks of it.