GameTec-live / ChameleonUltraGUI

A GUI for the Chameleon Ultra written in Flutter for crossplatform
GNU General Public License v3.0
427 stars 31 forks source link

No device listed despite allegedly connected #369

Open Still34 opened 1 year ago

Still34 commented 1 year ago

Describe the bug

2023-10-30_15-37-34-(chameleonultragui)- ChameleonUltraGUI shows an empty list of connected device on the Windows client, despite the ChameleonUltra showing the loading bar animation. COM5 appears to be actively in use when the application is open, suggesting the port is opened and in use by the application.

The CLI version works fine (compiled locally according to instructions) and can connect to the hardware just fine. 2023-10-30_15-36-52-(WindowsTerminal)-

To Reproduce Steps to reproduce the behavior:

  1. Open the application
  2. Connect the device
  3. Click refresh
  4. No application listed

Expected behavior The device to show up in the application.

Version info:

Also required:

GameTec-live commented 1 year ago

very strange issue... Is nothing else using the COM Port? (eg the CLI)

Still34 commented 1 year ago

Yes, nothing else should be using the port. Only either the CLI or the GUI is in use at a time.

GameTec-live commented 1 year ago

mind enabling production logging in the debug settings and sending a log?

Still34 commented 1 year ago
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM1
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:102)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connected to COM1
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:103)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Manufacturer: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:104)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Product: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM5
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:102)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connected to COM5
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:103)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Manufacturer: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:104)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Product: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM1
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:102)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connected to COM1
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:103)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Manufacturer: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:104)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Product: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM5
GameTec-live commented 1 year ago

your COM ports somehow dont return any manufacturer or Product information? are you running a custom firmware?

Still34 commented 1 year ago

Nope. The latest available 2.0.0 firmware - Chameleon Ultra, Version: v2.0 (v2.0.0-110-gd77e166)

Still34 commented 1 year ago

For additional context, the Ultra connects just fine and shows up on the GUI on my Linux laptop and iOS device.

GameTec-live commented 1 year ago

thats very wierd, because it literally is the same code... (And it works fine for me)

Maybe a driver issue?

Foxushka commented 1 year ago

Chameleon is COM1 or COM5 in your case? PM3 client also interferes with our serial library. Try closing all software that can access serial ports

Foxushka commented 1 year ago

If you see loading animation on chameleon before selecting chameleon in menu, then there is other software that using it. On main screen we just enumerate them, without connecting

Still34 commented 1 year ago

Chameleon is COM1 or COM5 in your case? PM3 client also interferes with our serial library. Try closing all software that can access serial ports

Chameleon should be on COM5 - not entirely sure what's on COM1.

If you see loading animation on chameleon before selecting chameleon in menu, then there is other software that using it. On main screen we just enumerate them, without connecting

The animation starts as soon as I open the application, and vice versa when I close it.

Still34 commented 1 year ago

I just tried it on yet another Windows-based device - same behavior.

Foxushka commented 1 year ago

Can you try on test-without-exception-handling branch? Will it throw any errors?

Still34 commented 1 year ago

I'll test it later tonight. This laptop doesn't have flutter configured yet.

Foxushka commented 1 year ago

You can grab compiled version from https://github.com/GameTec-live/ChameleonUltraGUI/actions/runs/6741642455

Still34 commented 1 year ago

Same issue unfortunately.

Foxushka commented 1 year ago

Issue still will be there, something in logs?

Still34 commented 1 year ago

Roughly the same logs yeah

#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM4
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM4
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:102)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connected to COM4
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:103)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Manufacturer: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:104)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Product: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connecting to COM4
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:102)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Connected to COM4
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:103)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Manufacturer: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:104)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)
πŸ› Product: null
foXaCe commented 11 months ago

hello i have same problem on arch linux

GameTec-live commented 11 months ago

@foXaCe Mind providing some more info? kernel version, app version, debug log output, etc?

foXaCe commented 11 months ago

@GameTec-live yes sorry

Operating System: XeroLinux KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.112.0 Qt Version: 5.15.11 Kernel Version: 6.6.3-zen1-1-zen (64-bit) Graphics Platform: X11 Processors: 16 Γ— AMD Ryzen 7 3700X 8-Core Processor Memory: 15.5Β Gio of RAM Graphics Processor: AMD Radeon RX 6600 XT

`

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyS0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyACM0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyS0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyACM0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyS0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyACM0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyS0

0 NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:88)

1 NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:54)

πŸ› Connecting to /dev/ttyACM0`

image

GameTec-live commented 11 months ago

@foXaCe Seems all up to date, only "wierd" thing would be the zen kernel, but that shouldnt change any functionality... Do you have ModemManager installed? That likes to cause problems. Also; make sure your user has permission to access /dev/ttyS0 (uucp i think is the group on arch based systems)

foXaCe commented 11 months ago

how to ?

foXaCe commented 11 months ago

sudo gpasswd -a stephane uucp

do not work

foXaCe commented 11 months ago

ok work after reboot

thank you

GameTec-live commented 11 months ago

ok work after reboot

thank you

so its fixed for you? great πŸ‘

foXaCe commented 11 months ago

yes thank you

493505110 commented 1 month ago

I have same problem when I use android device to connect it with BLE,but MTools BLE is working.

tri4ng1e commented 2 days ago

I also has this issue on Windows. On Android, I can connect to the device with both MTools and ChameleonUltraGUI. On the Windows PC, I can connect with the console client, but ChameleonUltraGUI doesn't work.

The logs look the same, indicating that manufacturer and product are null:

πŸ› Connecting to COM12
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:101)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:53)
πŸ› Connected to COM12
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:102)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:53)
πŸ› Manufacturer: null
#0   NativeSerial.connectDevice (package:chameleonultragui/connector/serial_native.dart:103)
#1   NativeSerial.availableChameleons (package:chameleonultragui/connector/serial_native.dart:53)
πŸ› Product: null

Hence, if (checkPort!.manufacturer == "Proxgrind") line from lib/connector/serial_native.dart discards the device as a non-Chameleon device.

However, USB Device Tree Viewer shows that the device, in fact, has both manufacturer and product fields, which should pass the checks in serial_native.dart:

Manufacturer String      : Proxgrind
Product String           : ChameleonUltra: hw_v1, fw_v512

I don't know much about Flutter and Dart, but if my understanding is correct, ChameleonUltraGUI uses flutter_libserialport library, which is a wrapper around Dart's libserialport library, which is a wrapper around C library. On the Github page for Dart library, I found a somewhat recent issue related to productID, vendorId, manufacturer and description fields being null on Windows. https://github.com/jpnurmi/libserialport.dart/issues/85

GameTec-live commented 2 days ago

So it looks like we know the issue?