Service started but picture transferred to hyperion only by several seconds

When i launching piccap app picture transferred by one-two second to hyperion and than i see black screen.
If i restart TV - have same result.

Hello. try to disable GUI capture in piccap. In my case it helped. But you need to remember that whenever the TV menu is displayed, the capture will be turned off ... I tested it with HDMI output and everything worked right after switching to HDMI

@deasonsv: Do you have some more information for us?
Which capture backend are you using?
Which settings do you use?
Is it really black, or is it disconnected?

@TBSniller i have same problems with this setup:
Libvtcapture, video capture on, gui capture on.
Transfer disconnects after 1-2 sec (i look hypNG log files).
If i turned gui capture off, stream transfer stable, but while any of native app opened - capture black screen. If i turned into hdmi or lg live channels, capture work normally.

@Fearmen Could you please run this and provide the given logs? (Make sure to stop capture in PicCap before running)
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address HYPERIONIP --verbose
HYPERIONIP = Your IP from Pi,..,?

@TBSniller just copy to terminal webos with correct ip?

yes

@TBSniller with working settings, or with gui on, when transfer broken?

@Fearmen Please with the not working one. We want to investigate why its not working

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> --verbose
0.000s [INFO main                ] Starting up...
0.001s [ DBG parse_options       ] Finished parsing arguments
0.001s [ DBG capture_main        ] Using these values: Address: <IP_ADDRESS> | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | NoVideo: 0 | NoGUI: 0 | Autostart: 0
0.001s [ DBG capture_main        ] Detecting backend...
0.001s [ DBG import_backend_library] Full library path: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so
0.077s [ DBG capture_main        ] Backend preinit...
0.078s [INFO capture_preinit     ] Preinit called. Copying config..
0.078s [INFO capture_preinit     ] Copying config done. Initialize vars..
0.078s [INFO capture_preinit     ] Init finished.
0.078s [ DBG capture_main        ] Initiating capture...
0.078s [INFO capture_init        ] Initialization of capture devices..
0.078s [INFO capture_init        ] Graphical capture enabled. Begin init..
initializing lock 'MADP_SYS'
[Utopia][MSOS]: [ERROR][MsOS_CreateMutex][2244]    [MsOS_CreateMutex][2244] Update max number of msos mutex: 256
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1097]     Mappd share memory: 0xt71139000
[Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053]     Flag=MSOS_SHM_QUERY Addr=0x71141130
[utopia info] utopia init
[utopia info] default using kernel mode utopia
[Utopia][PWS]: Function = PWSRegisterToUtopia, Line = 1134, PWS Register finished
[Utopia][MFE_EX]: MFERegisterToUtopia
[Utopia][AUDIO]: AUDIORegisterToUtopia is invoked
[Utopia][AUDIO]: AUDIORegisterToUtopia : Success to register resource 'audio0' of 1 resource
HDMITxRegisterToUtopia..................
[Utopia][SYS]: Function = SYSOpen, Line = 1722, [SYS INFO] OPEN INSTANCE...
[Utopia][MSOS]: [WARN][MsOS_Init][5846]     Already inited.
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070]     Already inited.
[Utopia][SYS]: [MDrv_SYS_Init][199] Already inited.
 Exit: 0
0.117s [INFO capture_init        ] HAL_GAL_CreateSurface done! SurfaceID: 0
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 131
0.297s [INFO capture_init        ] HAL_GAL_CaptureFrameBuffer done! 0
0.298s [INFO capture_init        ] HAL_GAL: gfx open ok result: 24
0.298s [INFO capture_init        ] Halgal done!
0.298s [INFO capture_init        ] Init video capture..
0.312s [INFO capture_init        ] Driver created!
0.312s [INFO vtcapture_initialize] Starting vtcapture initialization.
0.359s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 2318696
0.359s [INFO vtcapture_initialize] Skipping successfull vtCapture_init to prevent start after first try.
0.361s [INFO vtcapture_initialize] vtCapture_postprocess done!
0.363s [INFO vtcapture_initialize] vtCapture_finalize done!
0.363s [INFO capture_init        ] vtcapture not ready yet!
0.363s [INFO capture_init        ] Malloc hal+vt vars..
0.365s [INFO capture_init        ] Malloc hal+vt vars finished.
0.365s [ DBG capture_main        ] Starting capture..
0.365s [INFO capture_start       ] Starting capture thread..
0.365s [ DBG capture_main        ] Capture main init completed. Creating connection thread...
0.365s [ DBG connection_loop     ] Starting connection loop
0.365s [INFO connection_loop     ] Connecting hyperion-client..
0.381s [INFO connection_loop     ] hyperion-client connected!
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 131
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 131
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 131
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 131
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 131
Segmentation fault

It looks a bit like its failing to init graphical capture but returns a successfully init. Just to clean a bit up and this isn't caused by not cleaned up stuff: can you please run reboot in terminal and after that execute above command again and send the logs here?
Would like to see if they differ

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> --verbose
0.000s [INFO main                ] Starting up...
0.001s [ DBG parse_options       ] Finished parsing arguments
0.001s [ DBG capture_main        ] Using these values: Address: <IP_ADDRESS> | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | NoVideo: 0 | NoGUI: 0 | Autostart: 0
0.001s [ DBG capture_main        ] Detecting backend...
0.001s [ DBG import_backend_library] Full library path: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so
0.102s [ DBG capture_main        ] Backend preinit...
0.102s [INFO capture_preinit     ] Preinit called. Copying config..
0.102s [INFO capture_preinit     ] Copying config done. Initialize vars..
0.103s [INFO capture_preinit     ] Init finished.
0.103s [ DBG capture_main        ] Initiating capture...
0.103s [INFO capture_init        ] Initialization of capture devices..
0.103s [INFO capture_init        ] Graphical capture enabled. Begin init..
initializing lock 'MADP_SYS'
[Utopia][MSOS]: [ERROR][MsOS_CreateMutex][2244]    [MsOS_CreateMutex][2244] Update max number of msos mutex: 256
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1097]     Mappd share memory: 0xt711D1000
[Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053]     Flag=MSOS_SHM_QUERY Addr=0x711D9130
[utopia info] utopia init
[utopia info] default using kernel mode utopia
[Utopia][PWS]: Function = PWSRegisterToUtopia, Line = 1134, PWS Register finished
[Utopia][MFE_EX]: MFERegisterToUtopia
[Utopia][AUDIO]: AUDIORegisterToUtopia is invoked
[Utopia][AUDIO]: AUDIORegisterToUtopia : Success to register resource 'audio0' of 1 resource
HDMITxRegisterToUtopia..................
[Utopia][SYS]: Function = SYSOpen, Line = 1722, [SYS INFO] OPEN INSTANCE...
[Utopia][MSOS]: [WARN][MsOS_Init][5846]     Already inited.
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070]     Already inited.
[Utopia][SYS]: [MDrv_SYS_Init][199] Already inited.
 Exit: 0
0.153s [INFO capture_init        ] HAL_GAL_CreateSurface done! SurfaceID: 0
0.205s [INFO capture_init        ] HAL_GAL_CaptureFrameBuffer done! 0
0.205s [INFO capture_init        ] HAL_GAL: gfx open ok result: 22
0.205s [INFO capture_init        ] Halgal done!
0.205s [INFO capture_init        ] Init video capture..
0.233s [INFO capture_init        ] Driver created!
0.233s [INFO vtcapture_initialize] Starting vtcapture initialization.
0.293s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 20507920
0.293s [INFO vtcapture_initialize] Skipping successfull vtCapture_init to prevent start after first try.
0.294s [INFO vtcapture_initialize] vtCapture_postprocess done!
0.296s [INFO vtcapture_initialize] vtCapture_finalize done!
0.296s [INFO capture_init        ] vtcapture not ready yet!
0.296s [INFO capture_init        ] Malloc hal+vt vars..
0.299s [INFO capture_init        ] Malloc hal+vt vars finished.
0.299s [ DBG capture_main        ] Starting capture..
0.299s [INFO capture_start       ] Starting capture thread..
0.299s [ DBG capture_main        ] Capture main init completed. Creating connection thread...
0.300s [ DBG connection_loop     ] Starting connection loop
0.300s [INFO connection_loop     ] Connecting hyperion-client..
0.305s [INFO connection_loop     ] hyperion-client connected!
3.868s [ DBG capture_thread_target] framerate: 16.811658 FPS
7.291s [ DBG capture_thread_target] framerate: 17.532069 FPS
10.749s [ DBG capture_thread_target] framerate: 17.350257 FPS
12.004s [INFO send_picture        ] Try to init vtcapture again..
12.005s [INFO vtcapture_initialize] Starting vtcapture initialization.
12.062s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 20507920
12.070s [INFO vtcapture_initialize] vtCapture_preprocess done!
12.070s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180
12.070s [INFO vtcapture_initialize] vtCapture_process done!
12.170s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x6ff5b000 addr1: 0x70904000 size0: 69120 size1: 34560
12.170s [INFO vtcapture_initialize] vtcapture initialization finished.
12.170s [INFO send_picture        ] Init possible. Terminating current capture..
12.170s [INFO capture_terminate   ] Called termination of vtcapture
12.170s [INFO capture_terminate   ] Video capture enabled - Also stopping..
12.171s [INFO capture_stop_vt     ] Stopping VT capture...
12.697s [INFO capture_stop_vt     ] vtCapture_stop done!
12.697s [INFO capture_terminate   ] GUI capture enabled - Also stopping..
12.697s [INFO capture_stop_hal    ] Stopping HAL capture...
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
12.697s [INFO capture_stop_hal    ] HAL_GAL_DestroySurface done. Result: 0
12.699s [INFO capture_terminate   ] vtCapture_postprocess done!
12.700s [INFO capture_terminate   ] vtCapture_finalize done!
12.718s [INFO capture_terminate   ] Driver released!
12.718s [INFO capture_terminate   ] Finished capture termination!
12.718s [INFO send_picture        ] Init possible. Cleanup current capture..
12.718s [INFO capture_cleanup     ] Capture cleanup...
12.718s [INFO capture_cleanup     ] Capture was running, freeing vars...
12.718s [INFO capture_cleanup     ] Freeing video vars...
12.718s [INFO capture_cleanup     ] Freeing gui vars...
12.719s [INFO capture_cleanup     ] gfx close ok result: 0
12.719s [INFO capture_cleanup     ] Finished capture cleanup..
12.719s [INFO send_picture        ] Init possible. Init capture..
12.719s [INFO capture_init        ] Initialization of capture devices..
12.719s [INFO capture_init        ] Graphical capture enabled. Begin init..
12.719s [INFO capture_init        ] HAL_GAL_Init done! Exit: 0
12.724s [INFO capture_init        ] HAL_GAL_CreateSurface done! SurfaceID: 0
12.781s [INFO capture_init        ] HAL_GAL_CaptureFrameBuffer done! 0
12.781s [INFO capture_init        ] HAL_GAL: gfx open ok result: 22
12.782s [INFO capture_init        ] Halgal done!
12.782s [INFO capture_init        ] Init video capture..
12.802s [INFO capture_init        ] Driver created!
12.802s [INFO vtcapture_initialize] Starting vtcapture initialization.
12.856s [INFO vtcapture_initialize] vtCapture_init done!  Starting capture again..
12.966s [INFO capture_start       ] Starting capture thread..
18.727s [ DBG capture_thread_target] framerate: 10.415587 FPS
18.798s [ DBG capture_thread_target] framerate: 7.454358 FPS
18.798s [ DBG capture_thread_target] We are not the main thread, exiting
22.245s [ DBG capture_thread_target] framerate: 17.054762 FPS
25.696s [ DBG capture_thread_target] framerate: 17.388018 FPS
29.186s [ DBG capture_thread_target] framerate: 17.193381 FPS
32.698s [ DBG capture_thread_target] framerate: 17.084842 FPS
36.289s [ DBG capture_thread_target] framerate: 16.708224 FPS
40.106s [ DBG capture_thread_target] framerate: 15.717183 FPS
44.096s [ DBG capture_thread_target] framerate: 15.039038 FPS
48.375s [ DBG capture_thread_target] framerate: 14.024659 FPS
52.448s [ DBG capture_thread_target] framerate: 14.729511 FPS
55.959s [ DBG capture_thread_target] framerate: 17.088423 FPS
60.037s [ DBG capture_thread_target] framerate: 14.716176 FPS
63.765s [ DBG capture_thread_target] framerate: 16.094330 FPS
67.505s [ DBG capture_thread_target] framerate: 16.042832 FPS
^Z[1]+  Stopped
And picture in visualisaton  like this

@Fearmen Okay, so firstly you shouldn't stop capture using CTRL+Z please use CTRL+C instead, Z just puts the application paused in backgound, so nothing is cleaned up. That also might be the problem for failed successed init of graphical capture in your first log output.
This example now looks like misscalculated width/high/stride. It also looks like this isn't the actual PicCap-Version, much more a development branch from here: https://github.com/webosbrew/hyperion-webos/pull/40 ?
Since its also working after a TV restart, it seems to not be an issue like @deasonsv has, its more related to failed usage (Two capture instances and using development branch)
Can you confirm you will get a correct image in latest original PicCap? (Yeah I know other bugs, but just to clarrify)

I use 0.2.3 piccap, but with fix, without fix capture not start at any config

Which fix? And what wasn't working?

If i delete piccap in hbc, and install again, it will be clean install? If yes, i might reinstall

Most likley, yeah

Fix from thread, which you post in message below

login as: root
<EMAIL_ADDRESS>password:
/!\ Your system is using a default password.
/!\ Insert SSH public key into /home/root/.ssh/authorized_keys and perform a re                                                                             boot to remove this warning.
root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.s
ervice/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> --verbose
0.001s [INFO main                ] Starting up...
0.001s [ DBG parse_options       ] Finished parsing arguments
0.001s [ DBG capture_main        ] Using these values: Address: <IP_ADDRESS>                                                                             9 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | No                                                                             Video: 0 | NoGUI: 0 | Autostart: 0
0.001s [ DBG capture_main        ] Detecting backend...
0.002s [ DBG import_backend_library] Full library path: /media/developer/ap                                                                             ps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so
0.085s [ DBG capture_main        ] Backend preinit...
0.085s [INFO capture_preinit     ] Preinit called. Copying config..
0.085s [INFO capture_preinit     ] Copying config done. Initialize vars..
0.085s [INFO capture_preinit     ] Init finished.
0.085s [ DBG capture_main        ] Initiating capture...
0.086s [INFO capture_init        ] Initialization of capture devices..
0.086s [INFO capture_init        ] Graphical capture enabled. Begin init..
initializing lock 'MADP_SYS'
[Utopia][MSOS]: [ERROR][MsOS_CreateMutex][2244]    [MsOS_CreateMutex][2244] Upda                                                                             te max number of msos mutex: 256
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1097]     Mappd share memory: 0xt71104000
[Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053]     Flag=MSOS_SHM_QUERY Addr=                                                                             0x7110C130
[utopia info] utopia init
[utopia info] default using kernel mode utopia
[Utopia][PWS]: Function = PWSRegisterToUtopia, Line = 1134, PWS Register finishe                                                                             d
[Utopia][MFE_EX]: MFERegisterToUtopia
[Utopia][AUDIO]: AUDIORegisterToUtopia is invoked
[Utopia][AUDIO]: AUDIORegisterToUtopia : Success to register resource 'audio0' o                                                                             f 1 resource
HDMITxRegisterToUtopia..................
[Utopia][SYS]: Function = SYSOpen, Line = 1722, [SYS INFO] OPEN INSTANCE...
[Utopia][MSOS]: [WARN][MsOS_Init][5846]     Already inited.
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070]     Already inited.
[Utopia][SYS]: [MDrv_SYS_Init][199] Already inited.
KeyCustomerList[1].chipid:e8
[Utopia][IPAUTH]: Wrong hash key
[Utopia][IPAUTH]:<PHONE_NUMBER>660000
[Utopia][IPAUTH]: MDrv_SYS_GetChipID:fc
[Utopia][IPAUTH]: Wrong Chip ID
[Utopia][IPAUTH]: [Auth NG]
[Utopia][IPAUTH]: AUTH STATUS:0
initializing lock 'HAL_GAL'
initializing lock 'GRAPHIC'
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070]     Already inited.
root=/dev/mmcblk0p27  ro  rootfstype=squashfs PM ethaddr=B0:37:95:8C:78:BD mmcoo                                                                             ps=dump wdtlog=dump@1M quiet loglevel=0 console=ttyS0,115200 rootwait ssc_enable                                                                             = modelopt=001021100 hwopt=213210001104002001 ToolOpt=83958033:12307:12518                                                                             01:65:15066675:825547787 modelName=65NANO926PB serialNum=109RADC3F330 countryGrp                                                                             =22 debugMode=5 devtmpfs.mount=1 chip=LM21UA0 snapshot resume=/dev/mmcblk0p48 tv                                                                             region=DVB NR_BANK=0x0 vmalloc=408M LX_MEM=0x1c500000 EMAC_MEM=0x100000 DRAM_LEN                                                                             =0x80000000 LX_MEM2=0x43800000,0x58c00000 LX_MEM3=0xe0000000,0x0 DRAM_SIZE1=0x80                                                                             000000 DRAM_SIZE2=0x0 KERNEL_PROTECT MIU_DEBUG_LEVEL=5 MIU_HIT_INTERRUPT=ON MIU_                                                                             HIT_PANIC=OFF criu_enabled portProtection emmc_size=0x1d1fff000 BOOTLOGO_IN_MBOO                                                                             T ENV_VAR_OFFSET=0x0 ENV_VAR_SIZE=0x10000 ENV=EMMC SECURITY=ON sver=0.01.179 bve                                                                             r=0.01.179 innolux=0 tcontype=4 SkipFlag_PMIC= get_tconEnumFrom= bFo                                                                             rceVfreq60HZ= enable_tcon_panel=4 CMA0=PVRDOWNLOAD,miu=0,hid=23,sz=0xc0000                                                                             0,st=0x19400000 CMA1=PVRUPLOAD,miu=0,hid=24,sz=0x400000,st=0x1a000000 CMA2=CIPLU                                                                             S,miu=0,hid=27,sz=0x1000000,st=0x18400000 CMA3=GOP,miu=0,hid=29,sz=0x8400000,st=                                                                             0x23800000 CMA6=PIP,miu=0,hid=25,sz=0x1800000,st=0x1a400000 CMA7=ACPU1,miu=0,hid                                                                             =26,sz=0x400000,st=0x1bc00000 CMA8=ACPU2,miu=0,hid=30,sz=0x400000,st=0x1c000000                                                                              tee_mode=optee pwm=0 cmdEnd
[TCON] MApi_XC_Get_Tcon_Type 6521: u8tcontype = 4
0.135s [INFO capture_init        ] HAL_GAL_Init done! Exit: 0
0.142s [INFO capture_init        ] HAL_GAL_CreateSurface done! SurfaceID: 0
0.199s [INFO capture_init        ] HAL_GAL_CaptureFrameBuffer done! 0
0.199s [INFO capture_init        ] HAL_GAL: gfx open ok result: 22
0.199s [INFO capture_init        ] Halgal done!
0.199s [INFO capture_init        ] Init video capture..
0.225s [INFO capture_init        ] Driver created!
0.226s [INFO vtcapture_initialize] Starting vtcapture initialization.
0.285s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion                                                                             -webos_service Client ID: 18214160
0.285s [INFO vtcapture_initialize] Skipping successfull vtCapture_init to p                                                                             revent start after first try.
0.287s [INFO vtcapture_initialize] vtCapture_postprocess done!
0.290s [INFO vtcapture_initialize] vtCapture_finalize done!
0.290s [INFO capture_init        ] vtcapture not ready yet!
0.290s [INFO capture_init        ] Malloc hal+vt vars..
0.293s [INFO capture_init        ] Malloc hal+vt vars finished.
0.293s [ DBG capture_main        ] Starting capture..
0.293s [INFO capture_start       ] Starting capture thread..
0.293s [ DBG capture_main        ] Capture main init completed. Creating co                                                                             nnection thread...
0.293s [ DBG connection_loop     ] Starting connection loop
0.295s [INFO connection_loop     ] Connecting hyperion-client..
0.296s [INFO connection_loop     ] hyperion-client connected!
12.361s [INFO send_picture        ] Try to init vtcapture again..
12.362s [INFO vtcapture_initialize] Starting vtcapture initialization.
12.425s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 18214160
12.433s [INFO vtcapture_initialize] vtCapture_preprocess done!
12.433s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180
12.433s [INFO vtcapture_initialize] vtCapture_process done!
12.534s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x6ff1a000 addr1: 0x6ff11000 size0: 69120 size1: 34560
12.534s [INFO vtcapture_initialize] vtcapture initialization finished.
12.534s [INFO send_picture        ] Init possible. Terminating current capture..
12.534s [INFO capture_terminate   ] Called termination of vtcapture
12.534s [INFO capture_terminate   ] Video capture enabled - Also stopping..
12.534s [INFO capture_stop_vt     ] Stopping VT capture...
13.060s [INFO capture_stop_vt     ] vtCapture_stop done!
13.060s [INFO capture_terminate   ] GUI capture enabled - Also stopping..
13.060s [INFO capture_stop_hal    ] Stopping HAL capture...
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
13.062s [INFO capture_stop_hal    ] HAL_GAL_DestroySurface done. Result: 0
13.063s [INFO capture_terminate   ] vtCapture_postprocess done!
13.065s [INFO capture_terminate   ] vtCapture_finalize done!
13.088s [INFO capture_terminate   ] Driver released!
13.088s [INFO capture_terminate   ] Finished capture termination!
13.088s [INFO send_picture        ] Init possible. Cleanup current capture..
13.089s [INFO capture_cleanup     ] Capture cleanup...
13.089s [INFO capture_cleanup     ] Capture was running, freeing vars...
13.089s [INFO capture_cleanup     ] Freeing video vars...
13.089s [INFO capture_cleanup     ] Freeing gui vars...
13.089s [INFO capture_cleanup     ] gfx close ok result: 0
13.089s [INFO capture_cleanup     ] Finished capture cleanup..
13.089s [INFO send_picture        ] Init possible. Init capture..
13.089s [INFO capture_init        ] Initialization of capture devices..
13.089s [INFO capture_init        ] Graphical capture enabled. Begin init..
13.090s [INFO capture_init        ] HAL_GAL_Init done! Exit: 0
13.093s [INFO capture_init        ] HAL_GAL_CreateSurface done! SurfaceID: 0
13.149s [INFO capture_init        ] HAL_GAL_CaptureFrameBuffer done! 0
13.150s [INFO capture_init        ] HAL_GAL: gfx open ok result: 22
13.150s [INFO capture_init        ] Halgal done!
13.150s [INFO capture_init        ] Init video capture..
13.171s [INFO capture_init        ] Driver created!
13.171s [INFO vtcapture_initialize] Starting vtcapture initialization.
13.225s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID:<PHONE_NUMBER>
13.228s [INFO vtcapture_initialize] vtCapture_preprocess done!
13.229s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180
13.229s [INFO vtcapture_initialize] vtCapture_process done!
13.330s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x6ffdd000 addr1: 0x6ffd4000 size0: 69120 size1: 34560
13.330s [INFO vtcapture_initialize] vtcapture initialization finished.
13.330s [INFO capture_init        ] vtcapture initialized!
13.330s [INFO capture_init        ] Malloc hal+vt vars..
13.333s [INFO capture_init        ] Malloc hal+vt vars finished.
13.333s [INFO send_picture        ] Init possible. Starting capture again..
13.333s [INFO capture_start       ] Starting capture thread..
^C    77.029s [INFO handle_signal       ] SIGINT called! Stopping capture if running..
(process:5356): GLib-CRITICAL **: 20:17:03.501: g_main_loop_quit: assertion 'loop != NULL' failed
77.037s [INFO connection_loop     ] Ending connection loop
77.037s [ DBG cleanup             ] Starting cleanup... isRunning: 1
77.037s [ DBG cleanup             ] Capture is running! Breaking loop and joining thread...
77.037s [ DBG cleanup             ] Destroying hyperion-client...
77.037s [ DBG cleanup             ] Terminating capture within library...
77.037s [INFO capture_terminate   ] Called termination of vtcapture
77.140s [INFO capture_terminate   ] Video capture enabled - Also stopping..
77.140s [INFO capture_stop_vt     ] Stopping VT capture...
77.664s [INFO capture_stop_vt     ] vtCapture_stop done!
77.664s [INFO capture_terminate   ] GUI capture enabled - Also stopping..
77.664s [INFO capture_stop_hal    ] Stopping HAL capture...
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
77.664s [INFO capture_stop_hal    ] HAL_GAL_DestroySurface done. Result: 0
77.666s [INFO capture_terminate   ] vtCapture_postprocess done!
77.669s [INFO capture_terminate   ] vtCapture_finalize done!
77.688s [INFO capture_terminate   ] Driver released!
77.688s [INFO capture_terminate   ] Finished capture termination!
77.688s [ DBG cleanup             ] Cleanup capture within library...
77.688s [INFO capture_cleanup     ] Capture cleanup...
77.688s [INFO capture_cleanup     ] Capture was running, freeing vars...
77.688s [INFO capture_cleanup     ] Freeing video vars...
77.688s [INFO capture_cleanup     ] Freeing gui vars...
77.688s [INFO capture_cleanup     ] gfx close ok result: 0
77.689s [INFO capture_cleanup     ] Finished capture cleanup..
77.689s [ DBG cleanup             ] Cleanup finished.
77.689s [ DBG connection_loop     ] Connection loop exiting
77.689s [INFO main                ] Finished
[Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[5356], TID[1956945936] tries to exit
[Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[5356], TID[1956945936] tries to exit
root@LGwebOSTV:~#
Capture running ~1 min. Image in live visualisation same as below.

if i started capture from piccap, capture disconnects.
Settings in piccap: port 19400, width 360, Height 180, Max FPS 0, New 2020+ TV(libvtcapture+libhalgal), Video capture on, GUI on.
I delete piccap, reboot tv, install piccap from HBC, reboot tv, insert IP in piccap, press save, reboot, and insert command in SSH session

Could you run --no-video
Would be nice to see if it makes any difference
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.s ervice/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> --verbose --no-video

You should also check with editing width/hight: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S -a <IP_ADDRESS> -b libvtcapture -x 384 -y 180

Could you run --no-video Would be nice to see if it makes any difference /media/developer/apps/usr/palm/services/org.webosbrew.piccap.s ervice/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> --verbose --no-video

/!\ Your system is using a default password.
/!\ Insert SSH public key into /home/root/.ssh/authorized_keys and perform a reboot to remove this warning.
root@LGwebOSTV:~#
root@LGwebOSTV:~#
root@LGwebOSTV:~#
root@LGwebOSTV:~#
root@LGwebOSTV:~#
root@LGwebOSTV:~#
root@LGwebOSTV:~#
root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> --verbose --no-video
0.001s [INFO main                ] Starting up...
0.004s [ DBG parse_options       ] Finished parsing arguments
0.004s [ DBG capture_main        ] Using these values: Address: <IP_ADDRESS> | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | NoVideo: 1 | NoGUI: 0 | Autostart: 0
0.004s [ DBG capture_main        ] Detecting backend...
0.004s [ DBG import_backend_library] Full library path: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so
0.238s [ DBG capture_main        ] Backend preinit...
0.238s [INFO capture_preinit     ] Preinit called. Copying config..
0.238s [INFO capture_preinit     ] Copying config done. Initialize vars..
0.238s [INFO capture_preinit     ] Init finished.
0.238s [ DBG capture_main        ] Initiating capture...
0.238s [INFO capture_init        ] Initialization of capture devices..
0.238s [INFO capture_init        ] Graphical capture enabled. Begin init..
initializing lock 'MADP_SYS'
[Utopia][MSOS]: [ERROR][MsOS_CreateMutex][2244]    [MsOS_CreateMutex][2244] Update max number of msos mutex: 256
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1097]     Mappd share memory: 0xt71153000
[Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053]     Flag=MSOS_SHM_QUERY Addr=0x7115B130
[utopia info] utopia init
[utopia info] default using kernel mode utopia
[Utopia][PWS]: Function = PWSRegisterToUtopia, Line = 1134, PWS Register finished
[Utopia][MFE_EX]: MFERegisterToUtopia
[Utopia][AUDIO]: AUDIORegisterToUtopia is invoked
[Utopia][AUDIO]: AUDIORegisterToUtopia : Success to register resource 'audio0' of 1 resource
HDMITxRegisterToUtopia..................
[Utopia][SYS]: Function = SYSOpen, Line = 1722, [SYS INFO] OPEN INSTANCE...
[Utopia][MSOS]: [WARN][MsOS_Init][5846]     Already inited.
[Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070]     Already inited.
[Utopia][SYS]: [MDrv_SYS_Init][199] Already inited.
 Exit: 0
0.330s [INFO capture_init        ] HAL_GAL_CreateSurface done! SurfaceID: 0
0.423s [INFO capture_init        ] HAL_GAL_CaptureFrameBuffer done! 0
0.424s [INFO capture_init        ] HAL_GAL: gfx open ok result: 22
0.424s [ DBG capture_init        ] Malloc halgal vars...
0.431s [ DBG capture_init        ] Malloc halgal vars finished.
0.431s [INFO capture_init        ] Halgal done!
0.431s [ DBG capture_main        ] Starting capture..
0.431s [INFO capture_start       ] Starting capture thread..
0.434s [ DBG capture_main        ] Capture main init completed. Creating connection thread...
0.448s [ DBG connection_loop     ] Starting connection loop
0.452s [INFO connection_loop     ] Connecting hyperion-client..
0.456s [INFO connection_loop     ] hyperion-client connected!
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 129
Capture transfered, but black screen.

You have gui elements visible, or only video playing? if you dont have gui elements visible it will be black

if i stopped with Ctrl+C
^C   143.515s [INFO handle_signal       ] SIGINT called! Stopping capture if running..
(process:4034): GLib-CRITICAL **: 20:50:07.726: g_main_loop_quit: assertion 'loop != NULL' failed
143.571s [INFO connection_loop     ] Ending connection loop
143.571s [ DBG cleanup             ] Starting cleanup... isRunning: 1
143.571s [ DBG cleanup             ] Capture is running! Breaking loop and joining thread...
143.571s [ DBG cleanup             ] Destroying hyperion-client...
143.571s [ DBG cleanup             ] Terminating capture within library...
143.571s [INFO capture_terminate   ] Called termination of vtcapture
143.610s [INFO capture_terminate   ] GUI capture enabled - Also stopping..
143.610s [INFO capture_stop_hal    ] Stopping HAL capture...
[Utopia][GOP API]:    MApi_GOP_GWIN_Delete32FB:3904   FBId = 128
143.610s [INFO capture_stop_hal    ] HAL_GAL_DestroySurface done. Result: 0
143.610s [ ERR capture_terminate   ] Finishing with errors: 170cc!
143.610s [ DBG cleanup             ] Cleanup capture within library...
143.610s [INFO capture_cleanup     ] Capture cleanup...
143.610s [INFO capture_cleanup     ] Capture was running, freeing vars...
143.610s [INFO capture_cleanup     ] Freeing gui vars...
143.611s [INFO capture_cleanup     ] gfx close ok result: 0
143.611s [INFO capture_cleanup     ] Finished capture cleanup..
143.611s [ DBG cleanup             ] Cleanup finished.
143.611s [ DBG connection_loop     ] Connection loop exiting
143.612s [INFO main                ] Finished
[Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[4034], TID[1957269520] tries to exit
[Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[4034], TID[1957269520] tries to exit
root@LGwebOSTV:~#

You have gui elements visible, or only video playing? if you dont have gui elements visible it will be black

oh, yes. in menu i have image

You should also check with editing width/hight: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S -a <IP_ADDRESS> -b libvtcapture -x 384 -y 180

Yes, i have image.
also i trying several combinations in this command, it looks through ssh works much stable, i have image
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> -x 640 -y 360 -f 30 - works (HDMI, not menu)
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address <IP_ADDRESS> -x 640 -y 360 -f 60 - works (HDMI, not menu)

You should set settings to width 384 and height 180 in PicCap, if you don't have problems with stride on terminal with this settings.
Are you sure you meant --no-video in your latest statement?
Regardless of this, capture of DRM content isnt supported at the moment

When you ask me to test with --no-video
https://github.com/TBSniller/piccap/issues/27#issuecomment-1030870279
I also try drm and describe what happend.
Native app launched, captured, but when i choose movie, it crash capture. I know, that drm not working, but i thought, it will be black screen or no capturing, when drm playing. But capture crash and dont recovery until i reboot tv.
I thought it was helpfull information.
If you and other devs dont win DRM, maybe make autorestart after drm content stops playing.

Ah okay I see.
At the moment (current latest released version) it shouldn't crash. But there is another bug: While switching to DRM content video will be black, also when switching back to non DRM protected content, so a restart will be needed. Main problem is that the bufferadresses got changed and we don't know them.
Its reworked here, so at least this bug should be fixed in future https://github.com/webosbrew/hyperion-webos/pull/43
But also in your case I assume crashing is caused by some internally miscalculated stride/height/width. Have you tried with width 384 and height 180? Could you also provide some logs?

@deasonsv: Do you have some more information for us?
Which capture backend are you using?
Which settings do you use?
Is it really black, or is it disconnected?

My problem was the poor quality of the Wifi network. Rebooting the router solves the problem in most cases.

Solved


Call pandoc-citeproc filter from YAML metadata block instead of commandline?

Below is a snippet from my YAML metadata block.
---
title: Test case
date: \today
lang: en-US
papersize: a4
documentclass: IEEEtran
classoption: twocolumn
cite-method: citeproc
bibliography: bibliography.bib
filters: pandoc-citeproc
reference-section-title: References
link-citations: True
numbersections: True
toc: False
---

As you can see I've set filters: pandoc-citeproc, which is also shown in this YAML metadata block example. However, it doesn't seem to work. It only works when I provide --filter pandoc-citeproc on the commandline. This is a bit confusing, can pandoc-citeproc be called from the metadata, or not? If it can be, what am I doing wrong?
Using Fedora 31 with:
pandoc-citeproc-common-<IP_ADDRESS>-1.fc31.noarch
pandoc-pdf-2.5-1.fc31.x86_64
pandoc-common-2.5-1.fc31.noarch
pandoc-2.5-1.fc31.x86_64
pandoc-citeproc-<IP_ADDRESS>-1.fc31.x86_64

The link you provide does not show a YAML metadata block example, but an example of a --defaults file. The two are very different, in that the main use-case of the latter is used to provide defaults for command line options, not for metadata.

can pandoc-citeproc be called from the metadata, or not?

No. Setting command line options via metadata fields is not supported by design.

That clears up the confusion, thanks.


added 0/1 knapsack in Java -> Dynamic-Programming. Issue #72

🛠 Issue #72 0/1 Knapsack - Dynamic Programming approach
👨💻 Changes proposed

Added code for 0/1 Knapsack (Dynamic Programming)
Updated README.md

✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

Added 0-1 Knapsack (Dynamic-Programming) in Java
recursion -> memoization -> tabulation -> space optimzation
Starting with the naive recursive solution and gradually improving time complexity with memoization, then addressing the space complexity with tabulation and finally with space optimization.
Reorganized README.md and renamed 0/1 knapsack java file
(mentioned time complexity and space complexity of each approach)

@harshraj9988 Please resolve the Merge Conflict


post for July 19 2019

yay !

Woohoo! 🎉

Looks good: https://astrodata.nyc/posts/2019-07-19-cmd/

Thank you for doing all the hard work :)


Crash when starting on native wayland, but only when restoring last session

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.78.0
OS Version: Fedora 38 with Gnome 44.1

Steps to Reproduce:

Open a project and quit with window.restoreWindows set to all
Retart code with --ozone-platform-hint=auto on wayland
Code crashes

Disabling extension does nothing. Restarting with -n or setting restoreWindows to none fixes the problem. Starting without --ozone-platform-hint (and thus running on xwayland) fixes the issue.
Verbose output  with WAYLAND_DEBUG=1 code --ozone-platform-hint=auto --enable-features=UseOzonePlatform --verbose --log=debug --crash-reporter-directory /home/alvise/vscode-crash:
output.txt
Journalctl log:
log.txt
Crash report:
vscode-crash.zip
Correction: sometimes adding -n doesn't solve the issue. But disabling restoreWindows always does.

I do have the same issue

Same issue here:

VS Code Version: 1.78.0
OS Version: Manjaro Linux with Gnome 44.1
flags: --enable-features=UseOzonePlatform, --ozone-platform=wayland
Starting w/o extensions: same behavior

Same issue here, Archlinux, ditto also on flags/extensions. Started w/ 1.78.0

Same issue on EndeavourOS Sway. Running with flag --ozone-platform-hint=auto works on 1.77.3 (version before upgrade) but causes a crash when starting on 1.78.1.
For now, I'm running VS Code on xwayland which doesn't cause the window to crash.

Same here issue here - with or without extensions this issue occurs.

Same exact issue, removing the flags and running under xwayland works normally.

I'm having this issue as well. I'm running an AMD/Nvidia setup. Same flags, same issues.

Thanks for the crash logs, merging to https://github.com/microsoft/vscode/issues/181805 since they share the same trace.

@deepak1556 Sorry, did you mean #181533?

Sorry yeah it should be https://github.com/microsoft/vscode/issues/181533


CAN examples for stm32h7 not working

I've been trying to run the can example provided in the stm32h7 folder but the program seems to constantly get stuck on the CAN initialization line.
What could be the issue?

I am having similar issues. Will documentation be released at some point for the FDCAN HAL module to aid debugging?

@maiaherringfish If you get it to work it would be amazing if you could share the solution :D.
We are in desperate need of this module in our application.

I think I am closer to getting it working today. Have you seen the new example they released last week? Unlike the one they had before, I'm able to configure this one (rather than it hanging on initialization). However, it seems to only configure without issues if I have it set up with an HSE--otherwise the code hardfaults. Working on diagnosing this issue further

Hey
We kinda got it to work on internal loop back mode but on the normal can
configuration we were still having issues.

We’re also in contact with the guy that made can on embassy but he is
Australian so the time zones are quite different.
On Tue, 27 Feb 2024 at 17:29, Maia Herrington @.***>
wrote:

I think I am closer to getting it working today. Have you seen the new
example they released last week? Unlike the one they had before, I'm able
to configure this one (rather than it hanging on initialization). However,
it seems to only configure without issues if I have it set up with an
HSE--otherwise the code hardfaults. Working on diagnosing this issue further
—
Reply to this email directly, view it on GitHub
https://github.com/embassy-rs/embassy/issues/2620#issuecomment-1966984358,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RCXZVVP7GPATL6HIZF7TYVYCXVAVCNFSM6AAAAABDWXUELWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWHE4DIMZVHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

That is great to hear! Can I ask if you are using the HSE or a different clock? This seems to be the cause of some issues for me

We tried but ended up falling back on the example set up of HSE
On Tue, 27 Feb 2024 at 17:42, Maia Herrington @.***>
wrote:

That is great to hear! Can I ask if you are using the HSE or a different
clock? This seems to be the cause of some issues for me
—
Reply to this email directly, view it on GitHub
https://github.com/embassy-rs/embassy/issues/2620#issuecomment-1967051669,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RCX4HREBZF6DIUFR36OLYVYEF7AVCNFSM6AAAAABDWXUELWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRXGA2TCNRWHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

I think my teammate and I found the issue. We noticed there is no logic in rcc/h.rs to set the fdcansel field of the d2ccip1r register, which prevents a clock from being selected correctly and causes a default to HSE.
I still have to verify whether or not the FDCAN frequency is then being identified correctly based on the clock but this should be the start of a solid fix to this issue. When I tested it I no longer received hardfaults from accessing FDCAN::frequency() on config.

Please met me know how you both get on with this. Also, b.t.w. exactly which chips are you using? And what boards, in particular, what is connected to HSE. Keep in mind that it is recommended that CAN should always operate with a crystal or similar source for timing. So you want to use a clock that is either HSE or derived from it probably.

For us we are using a nucleo the stm32h743zi6 but we want to make it work
also on our custom PCB that uses the same chip.
Do you think would be a problem?
On Wed, 28 Feb 2024 at 09:51, cschuhen @.***> wrote:

Please met me know how you both get on with this. Also, b.t.w. exactly
which chips are you using? And what boards, in particular, what is
connected to HSE. Keep in mind that it is recommended that CAN should
always operate with a crystal or similar source for timing. So you want to
use a clock that is either HSE or derived from it probably.
—
Reply to this email directly, view it on GitHub
https://github.com/embassy-rs/embassy/issues/2620#issuecomment-1968505340,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RCX7AGJWLPMTJRQU2VJDYV3VYFAVCNFSM6AAAAABDWXUELWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRYGUYDKMZUGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I wouldn't have thought it to be a problem. Can you describe the rest of your setup? Are you using it alone with some kind of (USB) CAN adaptor connected to a Linux PC? You have terminators in place etc? I usually run with 2 CAN adaptors and make one send packets and the other monitor to ensure the bus is good. If all that is good... what are the options left? I think the core of the FDCAN module is no different, I think that leaves:

Clocks - Does the clock frequency being sent to the FDCAN match the frequency that it thinks it has when computing the timing values.
Pin setup - Is there something wrong with the alternate function selection for that chip perhaps for example?

I was able to get CAN working using a non-HSE clock (PLL2_Q using HSI w div/mul) after the above PR was merged in. I'm using an STM32H725ZG.
For some reason my debugger doesn't show the frequency correctly (all Hertz values appear as _0), but when I change the bitrate, reflash, and probe with an oscilloscope, I see the desired bitrate reflected in the signal.

But did you manage to get it to work in normal mode?
Because loopback mode runs smoothly but on normal mode we get stuck on transmitting the frame.
For some reason the debugger info says that there was a successful transition and then gets stuck on the second time it tries.
I would really like to know how did you do it using PLL2_Q.
I had gotten can to work with another hal from Richard Meadows so im trying to find where could the error be and whats the major difference between the loopback and the normal in terms of register setting. Im still quite recent to the field of embedded so it could be something clear or simple to anyone else.

Do you have another device on the CAN bus to receive the message when in normal mode? If not, you will probably get stuck auto retransmitting the message. I am not sure if you're using the example, but if you are, I also commented out the receiving portion so this MCU wouldn't wait to receive a message.
I simply set up PLL2_Q in the peripheral config, and set the fdcan_clock_source to PLL2_Q there as well. I can show how I did this if you need help configuring these things.
The difference between internal loopback and normal mode is indeed just a difference of setting registers. For internal loopback, you set FDCAN_TEST.LBCK to 1 to enable loopback, and FDCAN_CCCR.MON to 1. Otherwise, I believe that in both modes the registers operate pretty much the same way to transmit and receive messages. You may have already seen this, but the reference manual (different from the datasheet) for your chip should have an FDCAN section that outlines how to configure the registers correctly if you want to learn more.

        config.rcc.pll1 = Some(Pll {
            source: PllSource::HSI,
            prediv: PllPreDiv::DIV4,
            mul: PllMul::MUL50,
            divp: Some(PllDiv::DIV8),
            divq: None,
            divr: None,
        });

    config.rcc.fdcan_clock_source = rcc::FdCanClockSource::PLL1_Q;

    let peripherals = embassy_stm32::init(config);

    let mut can = can::FdcanConfigurator::new(peripherals.FDCAN1, peripherals.PD0, peripherals.PD1, Irqs);```
This might be a big beginner mistake but why could the hardfault be allays sent at he can configuration line. Ive been trying a lot of stuff but i cannot get it to disappear

I tried your code and got a panic too. Replacing the "None"'s with not-None stopped the panic but no CAN.
Can you try this, it works for me.
let mut config = Config::default();
config.rcc.pll1 = Some(Pll {
source: PllSource::HSI,
prediv: PllPreDiv::DIV4,
mul: PllMul::MUL50,
divp: Some(PllDiv::DIV8),
divq: Some(PllDiv::DIV8),
divr: Some(PllDiv::DIV8),
});
config.rcc.fdcan_clock_source = rcc::FdCanClockSource::PLL1_Q;

@FranciscoAmaro24 it looks like you are not setting PLL1_Q to anything? You have to set config.rcc.pll1.divq to a value or it will not populate a frequency for this clock, resulting in the hard fault

So, hopefully the above will 'work' for you however I don't expect it to be fully reliable comms as you should expect from CAN because it is not derived from a crystal source. This works on my 25MHz xtal:
let mut config = Config::default();
config.rcc.hse = Some(rcc::Hse {
freq: embassy_stm32::time::Hertz(25_000_000),
mode: rcc::HseMode::Oscillator,
});
config.rcc.pll1 = Some(Pll {
source: PllSource::HSE,
prediv: PllPreDiv::DIV5,
mul: PllMul::MUL160,
divp: Some(PllDiv::DIV8),
divq: Some(PllDiv::DIV8),
divr: Some(PllDiv::DIV8),
});
config.rcc.fdcan_clock_source = rcc::FdCanClockSource::PLL1_Q;

With 8MHz external clock source source, something like this might work for you:
let mut config = Config::default();
config.rcc.hse = Some(rcc::Hse {
    freq: embassy_stm32::time::Hertz(8_000_000),
    mode: rcc::HseMode::Bypass,
});
config.rcc.pll1 = Some(Pll {
    source: PllSource::HSE,
    prediv: PllPreDiv::DIV2,
    mul: PllMul::MUL50,
    divp: Some(PllDiv::DIV8),
    divq: Some(PllDiv::DIV8),
    divr: Some(PllDiv::DIV8),
});

config.rcc.fdcan_clock_source = rcc::FdCanClockSource::PLL1_Q;

If, when playing with values you get a panic in the FDCAN code on an unwrap, it is probably because you didn't give FDCAN a clock that could create the exact bitrate that you asked for. Adding debug like this in util.rs can you you see what is going on:
// Check if final bitrate matches the requested
if can_bitrate != (periph_clock / (prescaler * (1 + bs1 + bs2) as u32)) {
    info!("Can bitrate missmatch {} {}",
            can_bitrate,
            (periph_clock / (prescaler * (1 + bs1 + bs2) as u32)));
    return None;
}

I should improve the API to propagate these errors up.

Please let me know how you go with the above, once we know it works I can improve the documentation/examples to help people understand what might be required for them.

@cschuhen good to know about HSE for CAN. I am wondering, are your concerns about clock tolerance or something else? If it is timing related, I imagine that both loopback and normal mode tests would fail with a less reliable clock, unless you think parasitics on the TX/RX PCB traces are enough to mess up the timing once you switch to normal mode.

@maiaherringfish, yes, clock tolerance. For example, here is a quote from ISO11783-2:  Bit time selection generally
demands the use of crystal oscillators at all nodes so that the clock tolerance given in Table 1 can be achieved.
Like I'm sure it will work - mostly but you throw away some of the reliability of CAN and one day you might just plug it in and Node A and Node B have drifted enough in frequency to start getting packet errors. I'm sure these oscillators have improved somewhat over the years and sure you can improve things if you implement some procedure to set the trimming but why would you bother unless you are making 10000+ of something a year?
I work in a company that heavily uses CAN and have been doing this for over 20 years. We wouldn't consider dropping the crystal from a CAN node.
I imagine that if you consider using CAN-FD this only gets more important.

Thanks for the explanation! That makes sense to me.

Great explanation! Thank you so much for all the help and attention given to this issue :D

It works!!!
Thank you so much for all the help it was really incredible for our project!

yes sorry for the late reply


permit parsing of ~ in general type syntaxes

With NoncopyableGenerics enabled, we want to permit the syntax
any ~Copyable, and ~Copyable generally anywhere a type can be
written. We also want to give proper error messages and deal with
typealiases of Copyable correctly when ~ precedes some token other
than Copyable.
This patch defines the ~ operator to attach rather tightly to simple
types like identifier-like types. The precedence order is roughly like
this within the syntax of types, from higher to lower:

. (member lookup)
postfix optionals: ?, !
inverse ~

It's also invalid to write something like ~ any T, as we'll treat
any as if it were a type identifier. You must parenthesize such types
to say ~(any T). Similarly, we parse ~T.Type as ~(T.Type) and not
(~T).Type. That might be controversial, but I don't think inverses
can ever support metatypes; they're not even "real" types.
rdar://115913356
depends on companion PR https://github.com/apple/swift-syntax/pull/2230

https://github.com/apple/swift-syntax/pull/2230
@swift-ci please test


Split dev-tools/globals* into sim and server

All this PR accomplishes is moving things out of dev-tools/ and into more 'logical' locations (which will have the side effect of letting us eventually remove the dev-tools directory). It is important to note that this is very much 'rearranging the deck chairs on the Titanic': sim/data (and lib) still implicitly depend on some declarations in server/globals*, tsc treats this change exactly as they were all in the same file anyway. Some concrete examples: code in data/ still depends on Monitor declared in server/globals.ts, lib/process-manager.ts needs ChildProcess declared in server/globals.d.ts etc.
This change does almost nothing to help us properly modularize sim (design doc forthcoming) or eliminate global usage in our application (also a very worthwhile goal that will be pursued in the near future). This is purely meant to be an incremental improvement on our current state.

Man, your merges do horrible things to the "Files changed" panel. :(


Compile & run blisp on Raspberry Pi 4B

I tried compile and run blisp to update the firmware on my Pinecil. The result is inconsistent.
Firstly, on a freshly installed Raspberry Pi 4B (4GB), I install the latest cmake with snap
$ sudo snap install core
2022-12-17T04:09:45Z INFO Waiting for automatic snapd restart...
core 16-2.57.6 from Canonical✓ installed
 $ sudo snap install cmake --classic
cmake 3.25.1 from Crascit✓ installed

Then, I download the source of blisp and compile it:
$ cmake -DBLISP_BUILD_CLI=ON ..
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/Downloads/blisp/build

$ cmake --build .
[  1%] Building C object CMakeFiles/libblisp_obj.dir/lib/blisp.c.o
[  2%] Building C object CMakeFiles/libblisp_obj.dir/lib/chip/blisp_chip_bl60x.c.o
[  3%] Building C object CMakeFiles/libblisp_obj.dir/lib/chip/blisp_chip_bl70x.c.o
[  4%] Building C object CMakeFiles/libblisp_obj.dir/vendor/libserialport/serialport.c.o
[  5%] Building C object CMakeFiles/libblisp_obj.dir/vendor/libserialport/timing.c.o
[  6%] Building C object CMakeFiles/libblisp_obj.dir/vendor/libserialport/linux.c.o
[  7%] Building C object CMakeFiles/libblisp_obj.dir/vendor/libserialport/linux_termios.c.o
[  7%] Built target libblisp_obj
[  8%] Linking C shared library shared/libblisp.so
[  8%] Built target libblisp
[  9%] Linking C static library static/libblisp.a
[  9%] Built target libblisp_static
[ 10%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_cmd.c.o
[ 11%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_date.c.o
[ 12%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_dbl.c.o
[ 13%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_dstr.c.o
[ 14%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_end.c.o
[ 15%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_file.c.o
[ 16%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_hashtable.c.o
[ 17%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_int.c.o
[ 18%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_lit.c.o
[ 19%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_rem.c.o
[ 20%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_rex.c.o
[ 21%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_str.c.o
[ 22%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_utils.c.o
[ 23%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/argtable3.c.o
[ 24%] Building C object tools/blisp/argtable3/src/CMakeFiles/argtable3.dir/arg_getopt_long.c.o
[ 25%] Linking C static library libargtable3_static.a
[ 25%] Built target argtable3
[ 26%] Building C object tools/blisp/CMakeFiles/blisp.dir/src/main.c.o
[ 27%] Building C object tools/blisp/CMakeFiles/blisp.dir/src/cmd/write.c.o
[ 28%] Linking C executable blisp
[ 28%] Built target blisp
[ 29%] Building C object tools/blisp/argtable3/examples/CMakeFiles/echo.dir/echo.c.o
[ 30%] Linking C executable echo
[ 30%] Built target echo
[ 31%] Building C object tools/blisp/argtable3/examples/CMakeFiles/ls.dir/ls.c.o
[ 32%] Linking C executable ls
[ 32%] Built target ls
[ 33%] Building C object tools/blisp/argtable3/examples/CMakeFiles/multisyntax.dir/multisyntax.c.o
[ 34%] Linking C executable multisyntax
[ 34%] Built target multisyntax
[ 35%] Building C object tools/blisp/argtable3/examples/CMakeFiles/mv.dir/mv.c.o
[ 36%] Linking C executable mv
[ 36%] Built target mv
[ 37%] Building C object tools/blisp/argtable3/examples/CMakeFiles/myprog.dir/myprog.c.o
[ 38%] Linking C executable myprog
[ 38%] Built target myprog
[ 39%] Building C object tools/blisp/argtable3/examples/CMakeFiles/myprog_C89.dir/myprog_C89.c.o
[ 40%] Linking C executable myprog_C89
[ 40%] Built target myprog_C89
[ 41%] Building C object tools/blisp/argtable3/examples/CMakeFiles/testargtable3.dir/testargtable3.c.o
[ 42%] Linking C executable testargtable3
[ 42%] Built target testargtable3
[ 43%] Building C object tools/blisp/argtable3/examples/CMakeFiles/uname.dir/uname.c.o
[ 44%] Linking C executable uname
[ 44%] Built target uname
[ 45%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testall.c.o
[ 46%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testarglit.c.o
[ 47%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargstr.c.o
[ 48%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargint.c.o
[ 49%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargdate.c.o
[ 50%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargdbl.c.o
[ 51%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargfile.c.o
[ 52%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargrex.c.o
[ 53%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargdstr.c.o
[ 54%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testargcmd.c.o
[ 55%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/CuTest.c.o
[ 56%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_static.dir/testarghashtable.c.o
[ 57%] Linking C executable test_static
[ 57%] Built target test_static
[ 58%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testall.c.o
[ 59%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testarglit.c.o
[ 60%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargstr.c.o
[ 61%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargint.c.o
[ 62%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargdate.c.o
[ 63%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargdbl.c.o
[ 64%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargfile.c.o
[ 65%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargrex.c.o
[ 66%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargdstr.c.o
[ 67%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testargcmd.c.o
[ 68%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/CuTest.c.o
[ 69%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/testarghashtable.c.o
[ 70%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_cmd.c.o
[ 71%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_date.c.o
[ 72%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_dbl.c.o
[ 73%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_dstr.c.o
[ 74%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_end.c.o
[ 75%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_file.c.o
[ 76%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_hashtable.c.o
[ 77%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_int.c.o
[ 78%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_lit.c.o
[ 79%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_rem.c.o
[ 80%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_rex.c.o
[ 81%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_str.c.o
[ 82%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_utils.c.o
[ 83%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/argtable3.c.o
[ 84%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_src.dir/__/src/arg_getopt_long.c.o
[ 85%] Linking C executable test_src
[ 85%] Built target test_src
[ 86%] Generating /home/pi/Downloads/blisp/vendor/argtable3/dist/argtable3.c
dos2unix: Skipping ../dist, not a regular file.
dos2unix: converting file ../dist/LICENSE to Unix format...
dos2unix: Skipping ../dist/tests, not a regular file.
dos2unix: converting file ../dist/tests/testargstr.c to Unix format...
dos2unix: converting file ../dist/tests/testarglit.c to Unix format...
dos2unix: converting file ../dist/tests/testargrex.c to Unix format...
dos2unix: converting file ../dist/tests/testarghashtable.c to Unix format...
dos2unix: converting file ../dist/tests/testargdstr.c to Unix format...
dos2unix: converting file ../dist/tests/testargint.c to Unix format...
dos2unix: converting file ../dist/tests/testargdbl.c to Unix format...
dos2unix: converting file ../dist/tests/CuTest.h to Unix format...
dos2unix: converting file ../dist/tests/testargcmd.c to Unix format...
dos2unix: converting file ../dist/tests/CuTest.c to Unix format...
dos2unix: converting file ../dist/tests/CMakeLists.txt to Unix format...
dos2unix: converting file ../dist/tests/testargdate.c to Unix format...
dos2unix: converting file ../dist/tests/argtable3_private.h to Unix format...
dos2unix: converting file ../dist/tests/testall.c to Unix format...
dos2unix: converting file ../dist/tests/testargfile.c to Unix format...
dos2unix: converting file ../dist/README.md to Unix format...
dos2unix: Skipping ../dist/examples, not a regular file.
dos2unix: converting file ../dist/examples/myprog.c to Unix format...
dos2unix: converting file ../dist/examples/myprog_C89.c to Unix format...
dos2unix: converting file ../dist/examples/ls.c to Unix format...
dos2unix: converting file ../dist/examples/multisyntax.c to Unix format...
dos2unix: converting file ../dist/examples/mv.c to Unix format...
dos2unix: converting file ../dist/examples/echo.c to Unix format...
dos2unix: converting file ../dist/examples/testargtable3.c to Unix format...
dos2unix: converting file ../dist/examples/CMakeLists.txt to Unix format...
dos2unix: converting file ../dist/examples/uname.c to Unix format...
dos2unix: converting file ../dist/argtable3.c to Unix format...
dos2unix: converting file ../dist/argtable3.h to Unix format...
[ 87%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testall.c.o
[ 88%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testarglit.c.o
[ 89%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargstr.c.o
[ 90%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargint.c.o
[ 91%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargdate.c.o
[ 92%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargdbl.c.o
[ 93%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargfile.c.o
[ 94%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargrex.c.o
[ 95%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargdstr.c.o
[ 96%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testargcmd.c.o
[ 97%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/CuTest.c.o
[ 98%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/testarghashtable.c.o
[ 99%] Building C object tools/blisp/argtable3/tests/CMakeFiles/test_amalgamation.dir/__/dist/argtable3.c.o
[100%] Linking C executable test_amalgamation
dos2unix: Skipping ../dist, not a regular file.
dos2unix: converting file ../dist/LICENSE to Unix format...
dos2unix: Skipping ../dist/tests, not a regular file.
dos2unix: converting file ../dist/tests/testargstr.c to Unix format...
dos2unix: converting file ../dist/tests/testarglit.c to Unix format...
dos2unix: converting file ../dist/tests/testargrex.c to Unix format...
dos2unix: converting file ../dist/tests/testarghashtable.c to Unix format...
dos2unix: converting file ../dist/tests/testargdstr.c to Unix format...
dos2unix: converting file ../dist/tests/testargint.c to Unix format...
dos2unix: converting file ../dist/tests/testargdbl.c to Unix format...
dos2unix: converting file ../dist/tests/CuTest.h to Unix format...
dos2unix: converting file ../dist/tests/testargcmd.c to Unix format...
dos2unix: converting file ../dist/tests/CuTest.c to Unix format...
dos2unix: converting file ../dist/tests/CMakeLists.txt to Unix format...
dos2unix: converting file ../dist/tests/testargdate.c to Unix format...
dos2unix: converting file ../dist/tests/argtable3_private.h to Unix format...
dos2unix: converting file ../dist/tests/testall.c to Unix format...
dos2unix: converting file ../dist/tests/testargfile.c to Unix format...
dos2unix: converting file ../dist/README.md to Unix format...
dos2unix: Skipping ../dist/examples, not a regular file.
dos2unix: converting file ../dist/examples/myprog.c to Unix format...
dos2unix: converting file ../dist/examples/myprog_C89.c to Unix format...
dos2unix: converting file ../dist/examples/ls.c to Unix format...
dos2unix: converting file ../dist/examples/multisyntax.c to Unix format...
dos2unix: converting file ../dist/examples/mv.c to Unix format...
dos2unix: converting file ../dist/examples/echo.c to Unix format...
dos2unix: converting file ../dist/examples/testargtable3.c to Unix format...
dos2unix: converting file ../dist/examples/CMakeLists.txt to Unix format...
dos2unix: converting file ../dist/examples/uname.c to Unix format...
dos2unix: converting file ../dist/argtable3.c to Unix format...
dos2unix: converting file ../dist/argtable3.h to Unix format...
[100%] Built target test_amalgamation

No error or warning in the process.
I plug in my pinecil while holding the "-" button. It was connected successfully
[  772.204326] usb 1-1.1: new full-speed USB device number 4 using xhci_hcd
[  772.341951] usb 1-1.1: New USB device found, idVendor=ffff, idProduct=ffff, bcdDevice= 2.00
[  772.341980] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  772.342001] usb 1-1.1: Product: CDC Virtual ComPort
[  772.342018] usb 1-1.1: Manufacturer: BLIOT
[  772.342034] usb 1-1.1: SerialNumber:<PHONE_NUMBER>00
[  772.443702] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
[  772.444597] usbcore: registered new interface driver cdc_acm
[  772.444607] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

I run blisp after copying the firmware files (flash_loader_32m.bin & Pinecilv2_EN.bin) accordingly
First run:
$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Failed to load boot header.

syslog showing the device is not a n MTP device (not sure if this is relavant:
Dec 17 04:29:30 raspberrypi kernel: [  772.204326] usb 1-1.1: new full-speed USB device number 4 using xhci_hcd
Dec 17 04:29:30 raspberrypi kernel: [  772.341951] usb 1-1.1: New USB device found, idVendor=ffff, idProduct=ffff, bcdDevice= 2.00
Dec 17 04:29:30 raspberrypi kernel: [  772.341980] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 17 04:29:30 raspberrypi kernel: [  772.342001] usb 1-1.1: Product: CDC Virtual ComPort
Dec 17 04:29:30 raspberrypi kernel: [  772.342018] usb 1-1.1: Manufacturer: BLIOT
Dec 17 04:29:30 raspberrypi kernel: [  772.342034] usb 1-1.1: SerialNumber:<PHONE_NUMBER>00
Dec 17 04:29:30 raspberrypi mtp-probe: checking bus 1, device 4: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1"
Dec 17 04:29:30 raspberrypi mtp-probe: bus: 1, device: 4 was not an MTP device
Dec 17 04:29:30 raspberrypi kernel: [  772.443702] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
Dec 17 04:29:30 raspberrypi kernel: [  772.444597] usbcore: registered new interface driver cdc_acm
Dec 17 04:29:30 raspberrypi kernel: [  772.444607] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Dec 17 04:29:30 raspberrypi mtp-probe: checking bus 1, device 4: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1"
Dec 17 04:29:30 raspberrypi mtp-probe: bus: 1, device: 4 was not an MTP device
Dec 17 04:29:30 raspberrypi snapd[430]: hotplug.go:200: hotplug device add event ignored, enable experimental.hotplug
Dec 17 04:29:33 raspberrypi ModemManager[568]: <info>  [base-manager] couldn't check support for device '/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1': not supported by any plugin
Dec 17 04:31:52 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
Dec 17 04:31:52 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Dec 17 04:31:52 raspberrypi systemd[1]: Finished Cleanup of Temporary Directories.

Then, I tried keep pressing the "-" button while running blisp. The result is very inconsistent:
$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Failed to load boot header.

$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Failed to load segment header.

$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Failed to load boot header.

$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Flashing 1. segment
0b / 59200b (0.00%)
4092b / 59200b (6.91%)
Failed to load segment data. (ret -4)

$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Failed to load boot header.

$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin
Sending a handshake... OK
Getting chip info... BootROM version <IP_ADDRESS>, ChipID: 000005AA41CF0EB4
Loading the eflash loader file from disk
Loading eflash_loader...
Flashing 1. segment
0b / 59200b (0.00%)
4092b / 59200b (6.91%)
Failed to load segment data. (ret -4)
^C

^ I have to press Ctrl-C to stop the program after it did not response at the "Failed to..." message.
$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin

Failed to handshake with device.
^[[A^C

^ At that moment, the program even failed to handshake with the device...
$ sudo ./blisp write -c bl70x --reset Pinecilv2_EN.bin

Failed to handshake with device.
Sending a handshake...

^ At final attempt, no handshake. In order to avoid possible bricking the pinecil, I quit here. Luckily, the pinecil seems to be find after these attempts.

The OS is Raspbian 5.15.
I tried all 4 USB-A ports on the RPi and the result are the same.

Please, can you try it again with latest source? I will close the issue, if it will happen again, feel free to re-open it. Thanks


Find-UnitySetupInstaller should support .net scripting backend as a component

For UWP the .Net scripting backend no longer ships by default with Unity. It is an optional component. Currently there is no way to install it from Unity-Setup.

This functionality is supported now.


isBig() method

var Big = require('big.js');

var n = new Big('534.45');

console.log(n instanceof Big);

This works mostly: in browser and node. But breaks in tests. Apparently instanceof isn't very reliable.
It would be great, if one could console.log(Big.isBig(n));

Please could you further explain the tests that you are performing. If Big is in  scope, then any big number created from it will be an instanceof Big within that scope.

Sure. I'm running the tests in terminal with Jest, which is built on top of Jasmine. I wanted to detect all Big.js values, so we can use the cmp method to compare them instead of string/number comparison. So, I used value instanceof Big, and it worked in the browser but not in the tests, i.e. console.log prints true while running the app in the browser, false while running the tests in terminal.
I figured, it might have something to do with instanceof not working across multiple contexts. I'm not actually aware how the Jest/Jasmine internals work, so I don't know why. By the way, I'm using jest.autoMockOff(), so that Jest doesn't mock Big.js, which could've caused this.
But anyway, I replaced the check with lodash's
_.isObject(value) && _.isFunction(value.cmp)

A convenience method would be nice to have in these cases. At least moment.isMoment() seems to have a fallback for instanceof.

Ah, so that was the problem! We use Browserify. So we need to require('big.js') for each module, and the module that tries to identify Big instances isn't the one that created it.
So, this has nothing to do with Jest/Jasmine, but the fact that we don't run Browserify as part of our test task. The browser gets the same Big even though it's required again, but the test runner gets another Big. My bad, sorry for wasting your time.
Anyway, I understand your reluctance to add the method. But I still think that it would be a nice-to-have feature.

Yes, maybe. I'll consider it further.
Big.prototype.name = '[object Big]';
Big.isBig = function (obj) {return obj && obj.name === '[object Big]';};

Added a Big.isBig method to my fork. Not written any tests for it yet but have tested it on jsFiddle and all appears well.

I would also like to see this.


Advanced DocumentRegistry: what's expected of SourceFile

I want to speed up the startup of language service. The biggest hit by far is parsing of lib.d.ts, which may easily take many seconds on underpowered devices.
Wiki page Using the Language Service API suggests I can implement a custom document service, which would cache SourceFiles.
Sounds good: lib.d.ts virtually never changes and can be cached safely. Hopefully, eliminating parsing and boosting startup speeds.
But what is the nature of the data that should be cached? I can see SourceFile interface is not quite clear on what it is holding. Note the /* @internal */ members, are those expected to be cached/restored too?
    export interface SourceFile {
        /* @internal */ version: string;
        /* @internal */ scriptSnapshot: IScriptSnapshot;
        /* @internal */ nameTable: Map<string>;

        /* @internal */ getNamedDeclarations(): Map<Declaration[]>;

        getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
        getLineStarts(): number[];
        getPositionOfLineAndCharacter(line: number, character: number): number;
        update(newText: string, textChangeRange: TextChangeRange): SourceFile;
    }

Comments on DocumentService.acquireDocument give a slight hint that the main piece of information SourceFile holds is IScriptSnapshot. Is that right? Or is it more to it?
Many thanks!

So just to be clear do you want to serialize a SourceFile instance and re-hydrate it later on? or do you want to persist a single instance of 'lib.d.ts' source file instance in memory across different compilations?

The former: serialize SourceFile for lib.d.ts and re-hydrate it for faster startup in subsequent sessions (assuming re-hydration is signifcantly faster than parsing).

then that is an uncharted territory:) the interface you want to look at is the one types.ts, this is the actual object that the compiler creates. the LS code augments that with some additional helpers by setting the prototype at: https://github.com/Microsoft/TypeScript/blob/master/src/services/services.ts#L7348
I think it should just work if you do not set the parent pointers when you parse the file (i.e. ts.createSoruceFile). you will need to filter out diagnotics, as they can have circular references, but it might be safe to say do not serialize if there are any parse errors. I do not think you need to care about the table either.
let us know how this goes, and the perf characteristics you get at the end. this sounds like an interesting investigation.

Not entirely clear still, but hopefully it gets easier as I go along :-)
Thanks, if I get any results will report back.

there are two interfaces for SoruceFile. 1. in types.ts: https://github.com/Microsoft/TypeScript/blob/master/src/compiler/types.ts#L1214
and 2. in services.ts: https://github.com/Microsoft/TypeScript/blob/master/src/services/services.ts#L61
The one in types.ts is the truth. it is all data properties, no methods. this is what you get back when you call ts.createSoruceFile, the methods defined in the second interface declaration (services.ts) is added by patching the prototype, so that should be doable again once you have re-hydrated the object.
SourceFile is just a Node, and Nodes should be serializable, modulo parent pointers (as they introduce cycles). diagnostics also introduce cycles as a diagnostic object has a reference to a SoruceFile itself. so assuming you ignore properties that are of Diagnostics[], you should be able to serialize and deserialize the sourcefFile object.

Thanks a lot :+1:


Insert row/columns

Hello,
I am trying to create a .npy file with my .csv file but it just give me 100 rows and I need 263. How can I increase the number of rows?
Thank you

Currently, you can not add/remove rows in version 1.2.
However, rows and columns are adjusted properly whenever you load a new .npy file.
The tool is primarily intended to be a viewer and format converter for .npy files and not to act as a spreadsheet editor.
I plan to add support for adding/removing rows and columns in the next version of the tool most probably.
For the time being, to accomplish the task you want, you can:

use any external sheet tool (e.g., MS Excel)
save your data as a .csv
load this .csv in NPYViewer
Use NPYViewer to convert the .csv to .npy


SQLite is not making use of Data folder to store the db file

Describe the bug
SQLite is not making use of Data folder to store the db file.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Create the db in the Data folder

@dcostea can this be closed?

yes! thank you.


Define the general structure.

[x] How each game chapter will be structured
[x] Additional chapters (like intro).
[x] Appendices (like references).

Structure:

Foreword
Wolfenstein
Quake
Source Engine
Unreal
CryEngine
Unity
id Tech 6
Future of engines
Appendix

Further reading

Where each engine has:

History
Design of latest version
Review
Demo (if possible)

Alternative:

Foreword

Many engines, trying to find the core idea of the unified engine.

Interactive graph of all discussed game engines and their relations.

Clicking on engine scrolls to related section.

For each discussed game engine:

History
Availability and licence.
Architectural Design

System diagram.
Rendering.
AI.
Physics.
Scripting.
Editor tools.

Review

Developer perspective.

Toggl Reports

End-user perspective (at point of release).

Demo game (if publicly available).
Future versions

Proposed (core version of) unified engine.

Requirements
Design
Associated repository.
Demo game

Conclusion
Appendix

Further reading
Index
References


[Container App] az containerapp create/up: Make --target-port optional

Related command
az containerapp up --name port0verify2 --resource-group port0verify-rg --ingress external --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest
az containerapp create --name port0verify --resource-group WestCentralUsVerify --ingress external --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest --environment port0verify-env
Description
The --target-port field is now optional so the validation needs to be updated accordingly.
Testing Guide
Before this change, creating an app without the --target-port field causes a warning No ingress provided, defaulting to port 80. Try az containerapp up --ingress external --target-port  to set a custom port.. Now that warning has been removed. Other commands may have reported the error Usage error: must specify --target-port with --ingress which has also been removed.

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

Container App

hi @Tratcher ...i remember HISTORY.rst and test files being an imperative for cli-extensions (and maybe cli-core?) PRs...could you double-check here: https://github.com/Azure/azure-cli/tree/dev/doc/authoring_command_modules

hi @Tratcher ...i remember HISTORY.rst and test files being an imperative for cli-extensions (and maybe cli-core?) PRs...could you double-check here: https://github.com/Azure/azure-cli/tree/dev/doc/authoring_command_modules

you have changes to the decorator and as it's a central code piece, you may have to run all relevant tests and include recording files

Please add all related commands to your change in the PR's description.
Add tests to cover your change.

The --target-port field is now optional so the validation needs to be updated accordingly.

@Tratcher
When --target-port optional to all regions?

The --target-port field is now optional so the validation needs to be updated accordingly.

@Tratcher When --target-port optional to all regions?

The service changes have already been deployed to all regions.

Tests updated and passing. Feedback addressed. Please review.
Check the Format of Pull Request Title and Content should pass on next run.

Recommend title:
[Container app] az containerapp create/update/up: Make --target-port optional

@Tratcher
1.please get approval from your team who could be responsible for your business logic.
2.please rerun all tests relate to the command and logic you change.
Thanks

Recommend title: [Container app] az containerapp create/update/up: Make --target-port optional

@Greedygre update does not have this option. I've updated the title accordingly.

2.please rerun all tests relate to the command and logic you change.

I have, locally and on the CI. Do you mean that I should check in new recording files for every containerapps test?

Please fix CI issues

Please fix CI issues

@yonzhan I already updated the title so (Check the Format of Pull Request Title and Content) should pass on re-run. Can you re-trigger it? I can't.

Should change az containerapp ingress enable --target-port too? You can change with a separate PR if need.

@Greedygre is _sdk_models.py the right place to change that? Updated. I didn't see it change the help output locally.

Should change az containerapp ingress enable --target-port too? You can change with a separate PR if need.

@Greedygre is _sdk_models.py the right place to change that? Updated. I didn't see it change the help output locally.

@Tratcher
The --target-port argument is required or not is base on argument in function enable_ingress, the target_port is required inthe function.
Change --target-port to no required is change it from:
def enable_ingress(cmd, name, resource_group_name, type, target_port, transport="auto", exposed_port=None, allow_insecure=False, disable_warnings=False, no_wait=False):  # pylint: disable=redefined-builtin
to:
def enable_ingress(cmd, name, resource_group_name, type, target_port=None, transport="auto", exposed_port=None, allow_insecure=False, disable_warnings=False, no_wait=False):  # pylint: disable=redefined-builtin

The _sdk_models.py is only used for --yaml for Serialization and Deserialization. Please revert the change in it, not relate to this.


fix 206 range request

Second part of the fix to https://github.com/CollectionFS/Meteor-CollectionFS/issues/502

I have updated the PR. The previous version was not playing well with request errors.

@cherbst, cool looks good! Can you change it to merge into devel instead of master? We move to master once we release it.

Do I miss something here? There is no branch devel

No, my bad. I thought this was the main CFS repo.


Implement searching through subscriptions for findTreeItem

Fixes https://github.com/Microsoft/vscode-cosmosdb/issues/935
Andrii previously only implemented searching through attached accounts (I asked him to do that first because it was simpler). This adds searching through subscriptions as well. I was worried about searching subscriptions taking a while so I added some basic caching and timeouts. (NOTE: In the case of a timeout it doesn't even fail - it just attaches the account instead).

@StephenWeatherford @PrashanthCorp @nturinski FYI this is my main PR that Matt needs by EOD Wednesday for the video he's making. Still work to do before releasing, but this should be good enough for a demo. Please take a look!


Vagrant-like functionality for WSL2

Is your feature request related to a problem? Please describe.
Not necessarily a problem, but I use vagrant for quick environments.  WSL2 seems like it is halfway there, and using WSL2 instead of vagrant would be very useful.
Describe the solution you'd like
WSL commands to provision from an image and set some networking configurations to quickly start a clean instance, make them easy to change and destroy, etc...
Describe alternatives you've considered
Vagrant is an alternative.
Additional context
The use-case for vagrant is nearly identical, but for WSL2.

Have you considered Docker? It's much faster and runs natively (or via Docker for Windows) on WSL2.

That sounds obvious now that you said it.  I will see how that works.


Store specified attribute options of products not used in cronarea

When the indexer is running in cronarea only the option value from admin will be used and insert into the elasticsearch.
E.g. Product-A has a option "delivery_state" value "red" (admin value) and this option has the value "rot" in the storeview DE.
Actual result in Elasticsearch
{
    ...,
    delivery_state: "red"
}

Expected result in Elasticsearch
{
    ...,
    delivery_state: "rot"
}

Hi @boehsermoe
Did you mean value for a product attribute ?
What type of a attribute you have ? It's a text attribute ?
What Magento version do you use ? What module version ?

When the indexer is running in cronarea
Do you mean you have indexer set as "Update by schedule" ?

When you reindex data manually (from command line) you have correct data ?

Hi @afirlejczyk you are right, only the option id will sync to elastic. This was the reason we wrote a own dataprovider to set the option text value instead of the id. In our plugin was the problem that the store id was not set to the attribute.
But this should be solved by the vsbridge indexer, because the option id is not useful in the frontend.
Our solution is following:
`
class AdditionalProductData  implements DataProviderInterface
{
...
public function addData(array $indexData, $storeId)
{
    $attributes = $this->resourceModel->loadAttributesData($storeId, array_keys($indexData), ['delivery_time']);

    $deliveryTimeAttribute = $this->resourceModel->getAttributeByCode('delivery_time');
    $deliveryTimeAttribute->setStoreId($storeId);

    foreach ($attributes as $entityId => $attributesData) {
        $productData = array_merge($indexData[$entityId], $attributesData);

        if (isset($attributesData['delivery_time']) && $attributesData['delivery_time']) {

            $optionId = $attributesData['delivery_time'];
            $productData['delivery_time'] = $deliveryTimeAttribute->getSource()->getOptionText($optionId);
        }

        $indexData[$entityId] = $productData;
    }

    $attributes = null;

    return $indexData;
}

}
`
Instead to load only the delivery_time attribute, all attributes should be check with $attribute->usesSource() and load the option label text.
Or is there any reason to sync the option id?

@boehsermoe thanks for a feedback.
By default VSF require only option id, real values are load from attribute type (from ES), where labels for a store view are exported.
You can do the same on VSF for a custom attribute and load attribute label from "attribute" type.
By default we won't be doing any changes regarding this attributes. @pkarw

I am closing this issue, because is not required by VSF core. @pkarw


Grab Tweet attached link

Grab url from the tweet and add it to the tweet model

@mp3il please resolve the branch conflict.


Enyo 2020 Add Text to Speech Accessibility support to CaptionDecorator

Requirement
WebOS TV should read captionDecorator content before reading child component's content.
Implementation
Generally, CaptionDecorator wraps child control and it is not spottable component, so when child component is focused, Screen reader read child component's content or label including captionDecorator's content. To implement this, I add aria-label, which captionDecorator content is appended to child's content.
Limitation
CaptionDecorator may have user-defined component as child. When aria-label set to child, It can happen exception case. In current version, support CaptionDecorator, which has Button or ToggleButton as child.
Enyo-DCO-1.1-Signed-off-by: Bongsub Kim<EMAIL_ADDRESS>

This requirement could implement in app side. we provide guide documentation for developer.


Make style improvements

Sorry this took so long but I made my style improvements not depend on react-bootstrap, you can review and merge if you want.

hi @frontsideair, I'll review it. thanks u very much  :+1:

I added one more commit to fix some bugs.

Nice improvement :)  I'll merge it on next version. Thanks

Released on v1.4.0, thanks again:)

You're very welcome