On Tue, Dec 20, 2022 at 07:57:28AM +0100, Greg KH wrote: > On Mon, Dec 19, 2022 at 10:20:48PM +0000, dima.pasechnik@xxxxxxxxxxx wrote: > > On Mon, Dec 19, 2022 at 07:25:03PM +0100, Greg KH wrote: > > [...] > > > > > > That is only if you want to manually bind the generic driver to this > > > device. The kernel takes this and says "are you sure you want to do > > > this, if so, email this address and talk to these developers" :) > > > > One does need a dedicated /dev/ttyUSB. It is similar, but not > > identical, to /dev/ttyACM. Cf. e.g. > > https://rfc1149.net/blog/2013/03/05/what-is-the-difference-between-devttyusbx-and-devttyacmx/ > > Yes, they are a little different and the main point here is your device > says it is a ACM-compliant device, so just use that tty device node to > talk to it. That is the standard for talking serial protocols to USB > devices. > > By forcing the device to the generic usb-serial driver, you are saying > "this random endpoint is really a tty pass-through device" is that the > case? Why would you have both a ACM and a pass-through set of endpoints > in the same USB device? > > > And the board makes an effort to establish > > a dedicated /dev/ttyUSB. Indeed, after I plugged the board in 21:35 > > and did "ls -l /dev/tty*" I saw > > > > crw--w---- 1 root tty 4, 0 Dec 19 21:28 /dev/tty0 > > crw------- 1 dima tty 4, 1 Dec 19 21:35 /dev/tty1 > > crw--w---- 1 root tty 4, 10 Dec 19 21:28 /dev/tty10 > > crw--w---- 1 root tty 4, 11 Dec 19 21:28 /dev/tty11 > > Those are not USB-serial devices :) > > Seeing those device nodes is one thing, did you connect to the ttyUSBX > device nodes and talk to the device properly? > > > Needless to say, there is also /dev/ttyACM0 popping up - so this part > > of the communication is OK. > > And I think that is the usb-serial connect to this device. > > > I think it's prudent that the kernel understands that it's a > > a proper ttyUSB device, apparing as /dev/ttyUSB, and advertises it as > > such. Without it, it's hard to detect it, and indeed, the only way I see > > this, without an active usbserial driver, is by the time shown next to > > /dev/tty* > > There is no "proper" ttyUSB type of device. That set of drivers was > created because there was no USB standard for usb-serial devices way > back in the day so people made custom chips for them with custom > protocols. Then people realized this was a bad thing and came up with > the USB ACM spec so that you would NOT have to write a custom kernel > driver for their devices. > > So if this device does need to be controlled by the usb-serial driver, > what chip is in it and what protocol does it talk? As Alan said, the > output of `lsusb -v` for the device would be helpful. > > > > > As you see, no USB serial driver is loaded. > > > > However, https://tech.microbit.org/software/daplink-interface/ > > > > tells you that there is a 2nd CPU on the board, aka "interface chip", > > > > capable of UART. > > > > > > And that would be the ttyACM0 device node, right? Why not use just use that? > > Actually, the "interface chip" is reponsible not only for ttyACM, but > > for USB mass storage, and USB serial, all crammed in into the same > > physical USB port. > > Are there specs on this chip anywhere? See https://tech.microbit.org/hardware/ (choose V2.2X there) I have nRF52833-QDAA (there is also a different option) here is "details" on the board itself (describing firmware, I suppose) # DAPLink Firmware - see https://daplink.io Build ID: alpha9-189-g5dd23001 (gcc) Unique ID: 9905360200052833525e24a702a68552000000006e052820 HIC ID: 6e052820 Auto Reset: 1 Automation allowed: 0 Overflow detection: 0 Incompatible image detection: 1 Page erasing: 0 Daplink Mode: Interface Interface Version: 0256 Bootloader Version: 0256 Git SHA: 5dd23001a7a3199d74870790049d6686e183316c Local Mods: 0 USB Interfaces: MSD, CDC, HID, WebUSB Bootloader CRC: 0xa60a7780 Interface CRC: 0x0bac75fa Remount count: 0 URL: https://microbit.org/device/?id=9905&v=0256 ------------------------------------------ Here are the specs for V1 version (not the current, V2 one -these are above) - see my reply to Alan with lsusb details on this. https://spivey.oriel.ox.ac.uk/digisys/The_BBC_micro:bit#Microcontroller_chip https://www.nordicsemi.com/Products/nRF51822 And "details" from the board: # DAPLink Firmware - see https://mbed.com/daplink Unique ID: 9901000051114e45005f80130000004e0000000097969901 HIC ID: 97969901 Auto Reset: 1 Automation allowed: 0 Overflow detection: 0 Daplink Mode: Interface Interface Version: 0249 Bootloader Version: 0243 Git SHA: 9c5fd81e6545d00b7f7c21ca9d8577dbd6a5fed2 Local Mods: 0 USB Interfaces: MSD, CDC, HID, WebUSB Bootloader CRC: 0x32eb3cfd Interface CRC: 0xcdb7b2a3 Remount count: 0 URL: https://microbit.org/device/?id=9901&v=0249 HTH Dima
Attachment:
signature.asc
Description: PGP signature