Fishwaldo / sophgo-sg200x-debian

Debian Image for SG200x based boards such as Milk Duo256/DuoS and Sipeed LicheeRVNano
99 stars 24 forks source link

USB agent not working on mac #33

Open lamaalrajih opened 2 months ago

lamaalrajih commented 2 months ago

I have the debian image on the device, and to be able to ssh to the MilkV duo s on an M1 mac, I had to download HoRNDIS.

Unfortunately, to actually use HoRNDIS on Mac and connect to the duo s, you have to go through restarting hell, disabling csrutil (which apple complains about), and loading it manually.

I tried disabling rndis and enabling acm to use serial instead by running:

systemctl disable usb-gadget-rndis systemctl enable usb-gadget-acm

And this worked, but didn't allow me to screen to the device because I didn't have the baud rate, nor did I know how to configure it/find it elsewhere. 9600, 115200, and 57600 all just gave me blank screens in my terminal. Running the command without the baud rate also gave me a blank screen.

Running sudo cu -l /dev/tty.<devicename> also gave me a blank screen.

Not sure what to do here to get it to work over serial :/

flaep commented 2 months ago

Same here, but not on mac. I am running debain on my host pc aswell.

screen /dev/ttyACM0 gives me a blank terminal

I think the baudrate is set in /usr/lib/systemd/system/serial-getty@.service /sbin/agetty -o "-p -- \\u" --keep-baud 115200,57600,38400,9600 - vt220

however opening ttyACM0 with any of the set baudrates gives me a blank terminal.

dmesg on the host shows:

[ 4087.697130] usb 1-4: new high-speed USB device number 15 using xhci_hcd [ 4089.069206] usb 1-4: device descriptor read/64, error -71 [ 4089.345796] usb 1-4: New USB device found, idVendor=3346, idProduct=1003, bcdDevice= 5.10 [ 4089.345817] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 4089.345826] usb 1-4: Product: USB Com Port [ 4089.345833] usb 1-4: Manufacturer: Cvitek [ 4089.345840] usb 1-4: SerialNumber: 0123456789 [ 4089.384521] cdc_acm 1-4:1.0: ttyACM0: USB ACM device [ 4089.384545] usbcore: registered new interface driver cdc_acm [ 4089.384546] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

rndis network works when it is enabled

flaep commented 2 months ago

Hi,

i think I figured it out. By default serial-getty@ttyS0.service is started. However the tty device is called ttyGS0 systemctl start serial-getty@ttyGS0.service worked for me

lamaalrajih commented 1 month ago

Thank you! I'll try this :)