Skip to content

marron9999/socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socket

Controlling the Command Prompt on a Windows PC.

Client (Windows 11) : Connect (BLE socket) to VS2022 Server (VS2022 : Windows 10)

Execute : Server mode

cd {socket project folder}
set LOG=..\logs
java -Djdk.attach.allowAttachSelf=true -cp bin;jna\* socket.server [port-number]

  • jna folder: Copy jna jar files, swt jar file, and bthlib.dll (build bthlib with VS2022)
  • [port-number]: (defualt) 9999

Execute : Client mode (socket)

cd {socket project folder}
set LOG=..\logs
java -Djdk.attach.allowAttachSelf=true -cp bin;jna\* socket.client {server-name} [port-number]

  • jna folder: Copy jna jar files, swt jar file, and bthlib.dll (build bthlib with VS2022)
  • {server-name}: Host-Name or IP-Address (ex. vs2022)
  • [port-number]: 9999 (defualt)

Execute : Client mode (BLE socket)

cd {socket project folder}
set LOG=..\logs
java -Djdk.attach.allowAttachSelf=true -cp bin;jna\* socket.client BLE {ble-name}

  • jna folder: Copy jna jar files, swt jar file, and bthlib.dll (build bthlib with VS2022)
  • {ble-name}: Bluetoot-Name or IP-Address (ex. vs2022)

    Setting: jna\bthlib.{ble-name}.ini

    [Detect]
    mac=(mac-address)

    mac-address must set example format and value of "Ethernet adapter Bluetooth - Physical Address"

    EX: jna\bthlib.vs2022.ini

    [Detect]
    mac=(00:1B:DC:06:3E:BD)

    IMSPECT: ipconfig -all

    Ethernet adapter Bluetooth xxxxx:
        Physical Address. . . . . . . . . : 00-1B-DC-06-3E-BD

Built-in operations : Client mode

(1) #download [ folder-path ]

Display/Specify download folder

EX: #download c:\temp

(2) @download file-mask

Download server side current folder files wihich matched file-mask to client side download folder

EX: @download *.log

(3) @upload file-mask

Upload client side files which matched file-mask to server side current folder

EX: @upload c:\temp\*.dat

(4) @sysmon [ on | off | true | false ]

Enable/Disable system monitor

EX: @sysmon on

(5) #appmon [ {add|del} app-mask ]

Add/Delete app-mask for application monitor

EX: #appmon add java*

(6) @appmon [ on | off | true | false ]

Enable/Disable application monitor

EX: @appmon on

(7) @screen [ on | off | true | false ]

Show/Hide server side command prompt window

EX: @screen on

NOTE: When execute as Server mode with /screen switch, show server side command prompt window at connect from Client mode

(8) @print [ screen-number ]

Download screen shot of screen number 0 or more

EX: @print 0

(9) @{file-path}

Execute command list in text file

NOTE: Command list must described by code page MS932

EX: @c:\temp\cmd.txt

chcp 437
cd /d c:\\temp
dir /w
exit

Require Software

  • OpenJDK11U-jdk_x64_windows_hotspot_11.0.27_6.zip
  • jna-5.14.0.zip
  • swt-4.24-win32-win32-x86_64.zip
  • Visual Studio 2022

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published