januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
351 stars 411 forks source link

ios connect fail, Connection reset by peer #158

Open AlanWen2016 opened 3 years ago

AlanWen2016 commented 3 years ago

after connect the device, an error report as following:

2021-06-29 20:41:54.646486+0800 testApp[11697:2765823] Trying to connect....F399906D-67C6-E2B3-A930-62BA3D991955 2021-06-29 20:41:54.873757+0800 testApp[11697:2765823] did connected: <CBPeripheral: 0x283e573e0, identifier = F399906D-67C6-E2B3-A930-62BA3D991955, name = BlueTooth Printer, state = connected> 2021-06-29 20:41:54.873804+0800 testApp[11697:2765823] Predefined the support services, stop to looking up services. 2021-06-29 20:41:54.873849+0800 testApp[11697:2765823] going to emit EVENT_CONNECTED. 2021-06-29 20:42:17.394792+0800 testApp[11697:2770150] [tcp] tcp_input [C43.1:3] flags=[R] seq=3471797237, ack=0, win=0 state=ESTABLISHED rcv_nxt=3471797237, snd_una=1555733320 2021-06-29 20:42:17.396024+0800 testApp[11697:2770150] [connection] nw_read_request_report [C43] Receive failed with error "Connection reset by peer" 2021-06-29 20:42:56.148391+0800 testApp[11697:2769810] Connection 47: received failure notification 2021-06-29 20:42:56.148541+0800 testApp[11697:2769810] Connection 47: failed to connect 1:60, reason -1 2021-06-29 20:42:56.148627+0800 testApp[11697:2769810] Connection 47: encountered error(1:60) 2021-06-29 20:42:56.150812+0800 testApp[11697:2769810] Task .<32> HTTP load failed, 0/0 bytes (error code: -1001 [1:60]) 2021-06-29 20:42:56.151688+0800 testApp[11697:2769832] Task .<32> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "请求超时。" UserInfo={_kCFStreamErrorCodeKey=60, NSUnderlyingError=0x2818b8330 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)"