andresperezmelo / print_bluetooth_thermal

Plugin para enviar bytes sin procesar a la impresora solo por ahora para Android
Other
27 stars 35 forks source link

The situation where one mobile phone is connected to two Bluetooth printers simultaneously #17

Closed LeiYao123 closed 1 year ago

LeiYao123 commented 1 year ago

In this situation, I want to send commands to both printers simultaneously and output paper simultaneously, But I found that after operation, both sheets of paper will only come out of one printer (the device connected first). If you want both printers to come out of paper, you must first disconnect the previous one and then reconnect the latter one

I found that the printing plugin is also a singleton

Do you have any other suggestions, as connecting again after each disconnection will take a long time

YahalomsGuy commented 1 year ago

By definition, BT is a serial peep to peer connection, not a broadcast or multicast, from everything I know, it is simply impossible to connect a single bluetooth adapter in a mobile device (or wherever) to multiple ends simultaneously.

LeiYao123 commented 1 year ago

@YahalomsGuy One Bluetooth printer cannot be connected to two mobile phones, but one mobile phone can be connected to multiple Bluetooth printers

andresperezmelo commented 1 year ago

Both on Android and iOS, it's possible to connect multiple Bluetooth devices, but compatibility varies depending on the Bluetooth profiles used by the devices. Some profiles might support multiple connections, while others could have limitations on the number of simultaneous connections. Managing two Bluetooth profiles simultaneously can be more complex; in certain cases, disconnecting one and connecting another to alternate between devices might be the more feasible solution. In both systems, the choice of profiles and the handling of connections are crucial factors to consider when working with multiple Bluetooth devices.