Skip to content

Sending HEX command #6

Description

@nmiglio

Hi!

What is the proper way to send an hex sequence after connecting to the device?

I get the connection and something is sent, but I get no reply from the device.
Also when sending 5 bytes I get 8 bytes out in the logs:
D/BluetoothSocket(11952): write out: android.net.LocalSocketImpl$SocketOutputStream@fdb975e length: 8

I guess I am doing something wrong..
This is the write:

var conf_cmd = String.fromCharCodes([ 0xfe, 0xfe, 0x42, 0x4c, 0xff]);
await _bluetoothClassicPlugin.write((conf_cmd));

Same sequence via serial terminal is working fine.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions