B4i Library iSD BLE Printer

Ali Alsaedi

Member
Licensed User
Longtime User
Yes, I copied the files on the Mac server ... I have no problem compiling ... the program gives an error when running ... the program is installed on the simulator but gives an error and the program closes ... If the files are not copied at all, the program Cannot be installed ...
Did the library files change in the new changes?
 

Star-Dust

Expert
Licensed User
Longtime User
No I'm sorry there is no change.
But the thing I want to point out to you is that line 12 is not an instruction. It is considered by the compiler only if you are compiling as a library, but in release or debug it is ignored. An error in that row is strange.

Try the updated example and open it if it signals you an error and in what line
 

Ali Alsaedi

Member
Licensed User
Longtime User
B4X:
Error occurred on line: 12 (Main)
Unknown command: 0
Stack Trace: (
  CoreFoundation       __exceptionPreprocess + 331
  libobjc.A.dylib      objc_exception_throw + 48
  CoreFoundation       +[NSException raise:format:] + 197
  BLE Printer          -[B4IShell raiseEventImpl:method:args::] + 2258
  BLE Printer          -[B4IShellBI raiseEvent:event:params:] + 1673
  BLE Printer          -[B4IStaticModule initializeModule] + 434
  BLE Printer          -[b4i_main initializeStaticModules] + 67
  BLE Printer          -[B4IShellBI raiseEvent:event:params:] + 236
  BLE Printer          __33-[B4I raiseUIEvent:event:params:]_block_invoke + 50
  libdispatch.dylib    _dispatch_call_block_and_release + 12
 libdispatch.dylib    _dispatch_client_callout + 8
 libdispatch.dylib    _dispatch_main_queue_callback_4CF + 1276
 CoreFoundation       __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
 CoreFoundation       __CFRunLoopRun + 2310
 CoreFoundation       CFRunLoopRunSpecific + 626
 GraphicsServices     GSEventRunModal + 65
 UIKitCore            UIApplicationMain + 140
 BLE Printer          main + 112
 libdyld.dylib        start + 1
 ???                  0x0 + 1
)
 

Star-Dust

Expert
Licensed User
Longtime User
See this thread:

And this:

Could you have version 5.5 on the server? It doesn't seem like a library problem
 
Last edited:

Ali Alsaedi

Member
Licensed User
Longtime User
Thank you .. it was correct ...
But now I can not print photos and barcodes ...
And there is a problem with how to connect to the printer, and any device with Bluetooth on is connected, and every time we have to click on the scanner button of the printer ... Is it possible that it displays the list of devices and we click on the printer in question?
 

Star-Dust

Expert
Licensed User
Longtime User
As explained in POST 6, this function is not yet active.
For the connection, I will test and answer you as soon as possible
 

Ali Alsaedi

Member
Licensed User
Longtime User
I need to print photos and text in my new project ... Now it prints the text with your library, but the photo has a problem ... I use b4i 6.5 ...
 

Star-Dust

Expert
Licensed User
Longtime User
I need to print photos and text in my new project ... Now it prints the text with your library, but the photo has a problem ... I use b4i 6.5 ...
As indicated in post#1, post#6, post#26 and in this other thread. Forgive me if I haven't been clear enough in my previous answers. ? ? ? ?
This function is not yet active.​
Cette fonctionnalité n’est pas encore active​
Эта функция еще не активна​
Esta función aún no está activa​
Αυτή η δυνατότητα δεν είναι ακόμα ενεργή​
이 기능은 아직 활성화되지 않았습니다.​
Diese Funktion ist noch nicht aktiv​
此功能尚未激活​
תכונה זו עדיין אינה פעילה​
Tato funkce ještě není aktivní.​
هذه الوظيفة ليست نشطة بعد​
Lo msebenzi awukasebenzi​
এই ফাংশনটি এখনও সক্রিয় নয়​
Ova funkcija još nije aktivna​
 
Last edited:

Innov34

Member
Licensed User
Hi,
I have use the src of BlePeripheral2.java to try to make a new library BlePeripheral4.java to connect peripheral at a central Nordic UART
i have change :

BluetoothGattService service = new BluetoothGattService(longUUID("0001"), BluetoothGattService.SERVICE_TYPE_PRIMARY);
charRead = new BluetoothGattCharacteristic(longUUID("0003"), BluetoothGattCharacteristic.PROPERTY_READ | BluetoothGattCharacteristic.PROPERTY_NOTIFY, BluetoothGattCharacteristic.PERMISSION_READ);
charWrite = new BluetoothGattCharacteristic(longUUID("0002"), BluetoothGattCharacteristic.PROPERTY_WRITE, BluetoothGattCharacteristic.PERMISSION_WRITE);
charRead.addDescriptor(new BluetoothGattDescriptor(longUUID("2803"), BluetoothGattDescriptor.PERMISSION_READ | BluetoothGattDescriptor.PERMISSION_WRITE));


and in

java.util.UUID longUUID(String shortName)
return UUID.fromString("6e40" + shortName + "-b5a3-f393-e0a9-e50e24dcca9e");



I call the new library the start find ok but the central don t see the this peripheral
can you help me

best regards
Thanks
 

Star-Dust

Expert
Licensed User
Longtime User
Hi, to ask questions about how to make libraries you have to go to the appropriate part of the forum to ask questions.
This is dedicated to presenting and distributing library.

Also I believe you are wrong platform. Here it is for Apple devices running iOS. I don't see what Java is about.

If you are trying to write something for Android write your question in the appropriate part of the forum
 

Star-Dust

Expert
Licensed User
Longtime User
Hi @narek adonts ,
Unfortunately I have not made progress, it seems that the data sent is too much or too fast and is not being processed.
In debug mode it works, but extremely slowly, a printout is obtained after 10 minutes or more.

I have seen Software for iOs that work well and fast, so I am doing something wrong in the transmission of the images
 

Star-Dust

Expert
Licensed User
Longtime User
Update 0.04
  • Add ESC POS command
  • fix bug
 

Star-Dust

Expert
Licensed User
Longtime User
After 3 years of trying I realized that I was unable to print due to the old iPhone device. Today I tried with a recent iPad and the printing works fine.

Soon I will release the version that prints. Obviously the free version will not contain image printing.
 

Star-Dust

Expert
Licensed User
Longtime User
Update 0.25
  • Fix bugs
REMEMBER said:
Remember that the accepted characteristics for a printer are: 2AF0 and 2AF1
Sample:
Ble.CharatteristicName="2AF1"
Ble.connect(ID)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…