|
Post by admin on Jan 9, 2023 20:58:19 GMT
dino2gnt Steering towards Linux (Ubuntu in VM) I encountered this issue. Installed monodevelop then after starting the application: It's just blank. Buttons are working but no text can be seen. What could be the issue here? Tried changing light/dark system theme to no avail.
|
|
|
Post by dino2gnt on Jan 9, 2023 21:31:38 GMT
Could be missing fonts. Try running it from a terminal and see if it produces any meaningful output on stdout.
|
|
|
Post by admin on Jan 10, 2023 14:43:49 GMT
Thanks! It turned out to be a wrong VirtualBox setting. I had to turn off 3D acceleration: Then made all forms sizable and now they don't look cropped off anymore. Serial communication is shot. I will try some workarounds. These terminal commands were needed to connect device to "ttyUSB0": sudo dmesg | grep tty sudo chmod 666 /dev/ttyUSB0
Dark theme looks dope.
|
|
|
Post by dino2gnt on Jan 10, 2023 15:11:50 GMT
Excellent!
Could also add your user to the "serial" group, in all likelihood. default perms are probably 0660. it'll revert to default after reboot, fyi.
Serial communication could differ depending on how the hypervisor passes through the serial device. I do this backwards from you, I run Linux on the hardware and Windows in the VM (under libvirt/KVM) and pass the scanner's cp2102 through to the Windows. It's surprisingly solid.
|
|
nurbs
New Member
Posts: 25
|
Post by nurbs on Jan 10, 2023 16:18:21 GMT
Making forms sizable much better solution than my playing with width and height till things worked solution. I've not programmed in C#. Thanks for doing this, I'll try with WINE and post results per other thread. For Ubuntu, I believe the group is "dialout". Then made all forms sizable and now they don't look cropped off anymore. This Serial communication is shot. I will try some workarounds. These terminal commands were needed to connect device to "ttyUSB0": sudo dmesg | grep tty sudo chmod 666 /dev/ttyUSB0
Dark theme looks dope.
|
|
|
Post by dino2gnt on Jan 10, 2023 17:59:07 GMT
For Ubuntu, I believe the group is "dialout" Ah, that sounds right. I'm a RHEL/Cent/Fedora guy.
|
|
nurbs
New Member
Posts: 25
|
Post by nurbs on Jan 12, 2023 3:58:27 GMT
Having only MonoDevelop I compiled 13.1 and tried the executable on Ubuntu 20.04 with Wine 8.0-rc3. Window sizing is very good now and the unknown characters in diagnostics( shown as boxes ) are now correctly displayed. I tried connecting to the vehicle with this Linux host and was unsuccessful. This evening while tinkering I notice that launching this same exe from Gnome( i.e. without preceding with "wine" on command line as I'm accustomed to ) actually says I'm connected to scanner. Oddly, the drop-down list of devices when launched this way contains "/dev/" entries and window sizing isn't quite right ( see screenshot below ). No idea how this is happening, but thought to share. If I launch with "wine ./ChryslerScanner.exe" drop-down list contains "COMx" entries as expected. I've now copied compiled 13.1 GUI exe to Windows laptop and will try that as well as the wine method that seems to interface with scanner tomorrow.
|
|
|
Post by admin on Jan 12, 2023 8:26:34 GMT
Culprit is the Serial port manager. Mono does things slightly differently that I don't fully appreciate yet. While modifying it the hanging issue went away, rest of symptoms persist. I'm applying this method: stackoverflow.com/questions/67177068/serial-io-ports-issue-when-using-mono-works-with-dotnet-core-3-1-arm-raspbeIt takes some time because my original Serial handler is all over the place (Packet.cs + SerialPortExtension.cs)... When done right the compilation platform does not matter, apps run in each other's environment should behave the same, except appearance.
|
|
|
Post by admin on Jan 14, 2023 11:31:20 GMT
ab@AB-VB:~$ sudo dmesg | grep tty [ 0.242514] printk: console [tty0] enabled [ 178.614547] usb 2-2: cp210x converter now attached to ttyUSB0 ab@AB-VB:~$ sudo chmod 666 /dev/ttyUSB0 ab@AB-VB:~$ sudo usermod -a -G dialout $USER ab@AB-VB:~$ sudo usermod -a -G vboxusers $USER ab@AB-VB:~$ groups $USER ab : ab adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare vboxsf vboxusers ab@AB-VB:~$ ls -l /dev/ttyUSB0 crw-rw-rw- 1 root dialout 188, 0 jan 14 12:01 /dev/ttyUSB0 ab@AB-VB:~$
Added vboxusers to the group recently: sudo groupadd vboxusers && sudo usermod -aG vboxusers $USER
But still no luck. Edit: Seems like Linux OS does not like 250000 baudrate! I use it because of the 0% error ratio, but it's not a standard baudrate. {Serial test in terminal (Click to open)}ab@AB-VB:~$ stty -F /dev/ttyUSB0 250000 stty: invalid argument ‘250000’ Try 'stty --help' for more information. ab@AB-VB:~$ stty -F /dev/ttyUSB0 115200 ab@AB-VB:~$ cat /dev/ttyUSB0 ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6656
load:0x40078000,len:14848
load:0x40080400,len:3792
entry 0x40080694
I (27) boot: ESP-IDF 4.4.2 2nd stage bootloader
I (27) boot: compile time 12:39:34
I (27) boot: chip revision: 1
I (30) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (37) boot.esp32: SPI Speed : 40MHz
I (42) boot.esp32: SPI Mode : DIO
I (46) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (75) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (82) boot: 2 app0 OTA app 00 10 00010000 00200000
I (90) boot: 3 spiffs Unknown data 01 82 00210000 001f0000
I (97) boot: End of partition table
I (101) boot_comm: chip revision: 1, min. application chip revision: 0
I (108) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0e628h ( 58920) map
I (138) esp_image: segment 1: paddr=0001e650 vaddr=3ffbdb60 size=019c8h ( 6600) load
I (141) esp_image: segment 2: paddr=00020020 vaddr=400d0020 size=26a78h (158328) map
I (201) esp_image: segment 3: paddr=00046aa0 vaddr=3ffbf528 size=01d38h ( 7480) load
I (205) esp_image: segment 4: paddr=000487e0 vaddr=40080000 size=0e0ech ( 57580) load
I (231) esp_image: segment 5: paddr=000568d4 vaddr=50000000 size=00010h ( 16) load
I (238) boot: Loaded app from partition at offset 0x10000
I (238) boot: Disabling RNG early entropy source...
I (251) cpu_start: Pro cpu up.
I (251) cpu_start: Starting app cpu, entry point is 0x40082974
I (0) cpu_start: App cpu up.
I (267) cpu_start: Pro cpu start user code
I (268) cpu_start: cpu freq: 160000000
I (268) cpu_start: Application information:
I (272) cpu_start: Project name: ChryslerScanner
I (278) cpu_start: App version: 0.2.8.0
I (283) cpu_start: Compile time: Jan 5 2023 09:46:44
I (289) cpu_start: ELF file SHA256: 0650328671149a63...
I (295) cpu_start: ESP-IDF: 4.4.2
I (300) heap_init: Initializing. RAM available for dynamic allocation:
I (307) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (313) heap_init: At 3FFCA238 len 00015DC8 (87 KiB): DRAM
I (319) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (325) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (332) heap_init: At 4008E0EC len 00011F14 (71 KiB): IRAM
I (339) spi_flash: detected chip: gd
I (342) spi_flash: flash io: dio
I (347) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (362) gpio: GPIO[25]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (371) gpio: GPIO[26]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
The ESP32 MCU outputs reset log at 115000 baud, before it switches to 250000 baud.
|
|
|
Post by miikas on Jan 14, 2023 23:07:01 GMT
ab@AB-VB:~$ sudo dmesg | grep tty [ 0.242514] printk: console [tty0] enabled [ 178.614547] usb 2-2: cp210x converter now attached to ttyUSB0 ab@AB-VB:~$ sudo chmod 666 /dev/ttyUSB0 ab@AB-VB:~$ sudo usermod -a -G dialout $USER ab@AB-VB:~$ sudo usermod -a -G vboxusers $USER ab@AB-VB:~$ groups $USER ab : ab adm dialout cdrom sudo dip plugdev lpadmin lxd sambashare vboxsf vboxusers ab@AB-VB:~$ ls -l /dev/ttyUSB0 crw-rw-rw- 1 root dialout 188, 0 jan 14 12:01 /dev/ttyUSB0 ab@AB-VB:~$
Added vboxusers to the group recently: sudo groupadd vboxusers && sudo usermod -aG vboxusers $USER
But still no luck. Edit: Seems like Linux OS does not like 250000 baudrate! I use it because of the 0% error ratio, but it's not a standard baudrate. {Serial test in terminal (Click to open)}ab@AB-VB:~$ stty -F /dev/ttyUSB0 250000 stty: invalid argument ‘250000’ Try 'stty --help' for more information. ab@AB-VB:~$ stty -F /dev/ttyUSB0 115200 ab@AB-VB:~$ cat /dev/ttyUSB0 ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6656
load:0x40078000,len:14848
load:0x40080400,len:3792
entry 0x40080694
I (27) boot: ESP-IDF 4.4.2 2nd stage bootloader
I (27) boot: compile time 12:39:34
I (27) boot: chip revision: 1
I (30) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (37) boot.esp32: SPI Speed : 40MHz
I (42) boot.esp32: SPI Mode : DIO
I (46) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (75) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (82) boot: 2 app0 OTA app 00 10 00010000 00200000
I (90) boot: 3 spiffs Unknown data 01 82 00210000 001f0000
I (97) boot: End of partition table
I (101) boot_comm: chip revision: 1, min. application chip revision: 0
I (108) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0e628h ( 58920) map
I (138) esp_image: segment 1: paddr=0001e650 vaddr=3ffbdb60 size=019c8h ( 6600) load
I (141) esp_image: segment 2: paddr=00020020 vaddr=400d0020 size=26a78h (158328) map
I (201) esp_image: segment 3: paddr=00046aa0 vaddr=3ffbf528 size=01d38h ( 7480) load
I (205) esp_image: segment 4: paddr=000487e0 vaddr=40080000 size=0e0ech ( 57580) load
I (231) esp_image: segment 5: paddr=000568d4 vaddr=50000000 size=00010h ( 16) load
I (238) boot: Loaded app from partition at offset 0x10000
I (238) boot: Disabling RNG early entropy source...
I (251) cpu_start: Pro cpu up.
I (251) cpu_start: Starting app cpu, entry point is 0x40082974
I (0) cpu_start: App cpu up.
I (267) cpu_start: Pro cpu start user code
I (268) cpu_start: cpu freq: 160000000
I (268) cpu_start: Application information:
I (272) cpu_start: Project name: ChryslerScanner
I (278) cpu_start: App version: 0.2.8.0
I (283) cpu_start: Compile time: Jan 5 2023 09:46:44
I (289) cpu_start: ELF file SHA256: 0650328671149a63...
I (295) cpu_start: ESP-IDF: 4.4.2
I (300) heap_init: Initializing. RAM available for dynamic allocation:
I (307) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (313) heap_init: At 3FFCA238 len 00015DC8 (87 KiB): DRAM
I (319) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (325) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (332) heap_init: At 4008E0EC len 00011F14 (71 KiB): IRAM
I (339) spi_flash: detected chip: gd
I (342) spi_flash: flash io: dio
I (347) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (362) gpio: GPIO[25]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (371) gpio: GPIO[26]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
The ESP32 MCU outputs reset log at 115000 baud, before it switches to 250000 baud. Linux (nor Windows) doesn't really care about baudrate. If it doesn't work, it's usually serial adapters fault.
|
|
|
Post by admin on Jan 14, 2023 23:13:37 GMT
Linux (nor Windows) doesn't really care about baudrate. If it doesn't work, it's usually serial adapters fault. It works at 115200 baud, so apparently the fault is still in the GUI coding.
|
|
|
Post by miikas on Jan 15, 2023 16:31:13 GMT
Linux (nor Windows) doesn't really care about baudrate. If it doesn't work, it's usually serial adapters fault. It works at 115200 baud, so apparently the fault is still in the GUI coding. Possible, I don't know how GUI is coded. But usually if basic porthandling is used, there is no matter what the baudrate is as long as drivers and adapter supports it. Most adpters does not like non-standard baudrates. That's why I always use genuine FTDI chips, never had a problem with any baudrates.
|
|