Sunday 20 November 2022

Eclipse Source Git Repository setting

Use git as user and use token as password




 Since August 13, 2021, GitHub does not support authentication via HTTPS with your GitHub account password for security reasons anymore. Instead, in Eclipse, when pushing to a GitHub repository or when fetching from a private repository, you will get a git-upload-pack not permitted on 'https://github.com...' error.

As solution, use either

  • a GitHub specific Personal access tokens as password instead of your previously used GitHub account password or
  • SSH with an SSH key of which the private and public key is on your local machine and configured in Eclipse and the public key is uploaded to your GitHub account instead.

Personal access token (GitHub specific)

enter image description here

  1. Go to your GitHub account to Settings > Developer settings > Personal access tokens website:
    1. Click the Generate new token button in the upper right
      • Enter a Note, e.g. GitHub repo token
      • Choose Expiration, e.g. No expiration
      • Tick the checkbox repo
    2. Click the Generate token button at the bottom
    3. Copy the generated token to the clipboard
  2. In Eclipse, in the Git Repositories view:
    1. Right-click the Remotes sub-node for GitHub (origin or the name you have chosen when you have cloned the repository) and choose Configure Push...
    2. Click the Change... button to change the URI in the upper right
    3. Replace the password with with the copied generated GitHub token
    4. Click Finish and Save to apply the changes

SSH

  1. Create an SSH key (skip this step when you already have one):
    1. In Eclipse, in the preferences General > Network Connections > SSH2 tab Key Management hit the Generate RSA Key... button
    2. Hit Save Private Key... and choose a location, preferably the subfolder .ssh of your user home directory
  2. Upload public key to your GitHub account:
    1. For a new created key, copy the string shown in the Key Management tab to the clipboard; for an existing key add it in the preferences General > Network Connections > SSH2 tab General and copy the content of the public key file <name>.pub
    2. Go to your GitHub account settings to the SSH and GPG keys section and hit the New SSH key button
    3. Paste the copied public key into the Key field
  3. Change HTTPS to SSH URLs of already cloned repositories:
    1. In Eclipse, in the Git Repositories view right-click the repository and choose Properties and click the Open button
    2. In the text editor of the config file change the remote URL as follows:

      HTTPS (old; does not work for push anymore):
      url = https://github.com/<username>/<repo>.git

      SSH (new):
      url = git@github.com:<username>/<repo>.git

See also:





I was using eclipse and git with ssh and had an issue with it using the wrong key.

When searching for the error: "Cannot log in at github.com:22" It sent me to this answer: Cannot log in GitHub into Eclipse which ended up leading me to this one.

For anyone else that stumbles across this you need to navigate to

Window -> Preferences 

Then from there expand

General -> Network Connections -> SSH2

Then in the right pane select the "General" tab and click the Add Private Key.. button and select the private key used for git. If you used a password for your key (which you should) then you should be prompted to enter it.

After this I could push and pull again no issues.

enter image description here

Tuesday 3 May 2022

App Inventor with BLE

 In your App Inventor code you need to add:

otherwise your StringsReceived block will never receive anything.


  • RegisterForStrings – Registers to receive updates when one or more null-terminated strings from a connected BluetoothLE device are changed. Service Unique ID and Characteristic Unique ID are required. The utf16 parameter indicates whether the content should be decoded as UTF-16 (true) or UTF-8 (false) code points when converting to App Inventor strings. Whenever a change is received, the StringsReceived event will be run.

    Parameters:

    • serviceUuid (text) — The unique identifier of the service passed in the read or register call.
    • characteristicUuid (text) — The unique identifier of the characteristic in the read or register call.
    • utf16 (boolean) Interpret the string content as UTF-16 (true) or UTF-8 (false) code points.

call BluetoothLE1 RegisterForStringsserviceUuidcharacteristicUuidutf16

  • RequestMTU – Requests a new minimum transmission unit (MUT) for the BluetoothLE connection. This feature is only supported when both devices support Bluetooth 4.2 or higher. If the MTU is changed successfully, the MTUChanged event will be run. The default MTU is 20.

    This block is intended for advanced apps that need to change the size of the messages sent between the BLE devices. Most developers will not need to adjust this value.

    Parameters:

    • bytes (number) — The desired MTU size.

call BluetoothLE1 RequestMTUbytes


.kodular.io

Platformio ESP32 BLE config.



;debug_tool = esp-prog

;debug_init_break = tbreak setup 

[env:esp32dev]

platform = espressif32

board = esp32dev

framework = arduino

monitor_speed = 115200

upload_speed = 921600


lib_deps = 

nkolban/ESP32 BLE Arduino@^1.0.1

t-vk/ESP32 BLE Keyboard@^0.3.2

Tuesday 26 April 2022

PlatformIo with ESP32 JTAG DEBUG

 [env:esp32dev]

platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 921600

debug_tool = esp-prog
debug_init_break = tbreak setup

JavaFX with webview

 --module-path d:/Project/Win/javafx-sdk-15.0.1/lib/ 

--add-modules=javafx.swing,javafx.graphics,javafx.fxml,javafx.media,javafx.web 

--add-reads javafx.graphics=ALL-UNNAMED 

--add-opens javafx.controls/com.sun.javafx.charts=ALL-UNNAMED 

--add-opens javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED 

--add-opens javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED 

--add-opens javafx.graphics/com.sun.javafx.css=ALL-UNNAMED 

--add-opens javafx.base/com.sun.javafx.runtime=ALL-UNNAMED





Friday 11 February 2022

ESP32Cam Face Detection crash fix

Reference:

【(不成功来打我)解决esp32cam一人脸检测识别就卡顿终止死机终极必杀!-哔哩哔哩】 https://b23.tv/r16OgXm

https://techtutorialsx.com/2020/06/13/esp32-camera-face-detection/


https://github.com/espressif/arduino-esp32/issues/5128

 app_httpd.cpp


line 286-290, line 389-392 , replace free() to dl_lib_free()


        // free(net_boxes->score);
        // free(net_boxes->box);
        // free(net_boxes->landmark);
        // free(net_boxes);
        dl_lib_free(net_boxes->score);
        dl_lib_free(net_boxes->box);
        dl_lib_free(net_boxes->landmark);
        dl_lib_free(net_boxes);