G Gianluca Esposito Member Licensed User Longtime User Oct 19, 2017 #1 hi, How do I send the following command? Command sent: 0x8001 (Fixed) 0x0000 (Message ID) 0x00005358 (Vendor ID = CAEN SpA) 0x0021 (Message Length) 0x0000 (Reserved) 0x0008 (AVP Length) 0x0001 (AVP Type = CommandName) 0x0013 (AVP Value = InventoryTag) 0x0000 (Reserved) 0x000F (AVP Length) 0x00FB (AVP Type = SourceName) 0x536F757263655F3000 (AVP Value = “Source_0”) Thanks
hi, How do I send the following command? Command sent: 0x8001 (Fixed) 0x0000 (Message ID) 0x00005358 (Vendor ID = CAEN SpA) 0x0021 (Message Length) 0x0000 (Reserved) 0x0008 (AVP Length) 0x0001 (AVP Type = CommandName) 0x0013 (AVP Value = InventoryTag) 0x0000 (Reserved) 0x000F (AVP Length) 0x00FB (AVP Type = SourceName) 0x536F757263655F3000 (AVP Value = “Source_0”) Thanks
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2017 #2 Code: Copy AStream.Write(Array As Byte(0x80, 0x01, 0x00, 0x00, 0x00, ...) 'or Dim bc As ByteConverter AStream.Write(bc.HexToBytes("800100000053580021...")) Upvote 0
Code: Copy AStream.Write(Array As Byte(0x80, 0x01, 0x00, 0x00, 0x00, ...) 'or Dim bc As ByteConverter AStream.Write(bc.HexToBytes("800100000053580021..."))
G Gianluca Esposito Member Licensed User Longtime User Oct 19, 2017 #3 Unfortunately it does not work. The reader does not respond Upvote 0
DonManfred Expert Licensed User Longtime User Oct 19, 2017 #4 did you connect to the device before and opened a Asyncstream? Check serial tutorial https://www.b4x.com/android/forum/threads/android-serial-tutorial.6908/#content or https://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/ Last edited: Oct 19, 2017 Upvote 0
did you connect to the device before and opened a Asyncstream? Check serial tutorial https://www.b4x.com/android/forum/threads/android-serial-tutorial.6908/#content or https://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/
G Gianluca Esposito Member Licensed User Longtime User Oct 19, 2017 #5 i used: https://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/ in the chat ativity: Code: Copy Sub btnSend_Click Dim bc As ByteConverter AStream.Write(bc.HexToBytes("80010003000053580035000000080001008A0000000F00FB536F757263655F30000000000A006A000000000000000A006B00000000")) txtInput.SelectAll txtInput.RequestFocus LogMessage("Me", txtInput.Text) End Sub Upvote 0
i used: https://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/ in the chat ativity: Code: Copy Sub btnSend_Click Dim bc As ByteConverter AStream.Write(bc.HexToBytes("80010003000053580035000000080001008A0000000F00FB536F757263655F30000000000A006A000000000000000A006B00000000")) txtInput.SelectAll txtInput.RequestFocus LogMessage("Me", txtInput.Text) End Sub
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2017 #6 Is there any example in the documentation of this device? Might be an endianess issue. Upvote 0
G Gianluca Esposito Member Licensed User Longtime User Oct 19, 2017 #7 yes, page 38 http://www.giadatechnology.it/mobile/easy2read_protocol_rev16.pdf Thanks Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2017 #8 Make sure that AsyncStream is not initialized in prefix mode. Upvote 0
G Gianluca Esposito Member Licensed User Longtime User Oct 19, 2017 #9 Code: Copy If AStream.IsInitialized = False Then AStream.InitializePrefix(Main.serial1.InputStream, True, Main.serial1.OutputStream, "AStream") End If Upvote 0
Code: Copy If AStream.IsInitialized = False Then AStream.InitializePrefix(Main.serial1.InputStream, True, Main.serial1.OutputStream, "AStream") End If
DonManfred Expert Licensed User Longtime User Oct 19, 2017 #10 Gianluca Esposito said: AStream.InitializePrefix(Main.serial1.InputStream, True, Main.serial1.OutputStream, "AStream") Click to expand... this is wrong. Erel said: Make sure that AsyncStream is not initialized in prefix mode. Click to expand... Upvote 0
Gianluca Esposito said: AStream.InitializePrefix(Main.serial1.InputStream, True, Main.serial1.OutputStream, "AStream") Click to expand... this is wrong. Erel said: Make sure that AsyncStream is not initialized in prefix mode. Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2017 #11 AsyncStreams tutorial: https://www.b4x.com/android/forum/threads/asyncstreams-tutorial.7669/#content Upvote 0