ambiot / ambd_sdk

Release SDK for AmebaD
108 stars 56 forks source link

Missing USB support #2

Closed jonsmirl closed 3 years ago

jonsmirl commented 4 years ago

USB support appears to be missing from the SDK. The option is in menuconfig, but it you turn it on there is nothing for it to compile.

1) Does CDC-ACM mode work to use tether mode to attach this chip to a host CPU? Does it work the same as tethering a phone?

2) Is this tether mode implemented as a network bridge? In other words, do the Ameba and the attached host have distinct MAC and IP addresses? I need to be able to use this link to communicate between the host and the Ameba as well as providing internet access.

Aurical commented 3 years ago

in my experience, you will need to sign an NDA with Realtek to get the full SDK, which includes the code for USB, BLE and other functions not available in the GitHub SDK.

  1. In the full SDK, there are example code for both USB host and USB device CDC-ACM
  2. from what I can see, the CDC-ACM example code implements a VCOM device that loopbacks serial messages. Are you looking for NCM or ECM? search results on google seems to indicate that ACM is used for USB serial ports.
jonsmirl commented 3 years ago

ACM is what your phone implements when you put it into tethering mode. It is a simple way to hook a wifi chip to a host SOC. You use 'AT' commands to drive it. ACM mode runs at full USB speed. This was good enough for our needs. If you want higher performance you need SDIO mode.

Anyway we ended up using the ESP32-S2 which has an LCD controller and open documentation.