You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once connection was made to an Aroma Shooter, the Bluetooth becomes inoperative with error "Operation already in progress". Only a reboot restores the Bluetooth (until next Aroma Shooter connection).
Using Raspberry pi running Linux 10 (buster).
output of java -version:
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Raspbian-2deb10u1)
OpenJDK Server VM (build 11.0.12+7-post-Raspbian-2deb10u1, mixed mode)
Using Bleak and Python 3.7.3 to connect to Bluetooth device.
To reproduce:
Python code to discover devices vi ble:
import asyncio
from bleak import BleakScanner,BleakClient,BleakError
async def discoverDevices():
devices = await BleakScanner.discover()
for d in devices:
print(d)
async def main():
await discoverDevices()
asyncio.run(main())
Java code to connect to Aroma Shooter: (error occurs after running this script regardless of whether saw aroma shooter or not, see issue #3 )
import com.aromajoin.sdk.core.device.AromaShooter;
import com.aromajoin.sdk.core.device.Port;
import com.aromajoin.sdk.jvm.usb.USBASController;
/**
* Minimal example for connection to Aroma Shooter
*
*/
public class App {
public static void main(String[] args) {
System.out.println("Initializing Aroma Shooter...");
USBASController usbController = initAromajoin();
//waiting makes no difference to the error.
/*try {
Thread.sleep(5000);
}catch (Exception e){
System.out.println(e.getStackTrace());
}*/
System.out.println("exiting...");
usbController.disconnectAll();
}
private static USBASController initAromajoin() {
USBASController usbController = new USBASController();
usbController.scanAndConnect();
if (!usbController.getConnectedDevices().isEmpty()) {
for (AromaShooter aromaShooter : usbController.getConnectedDevices()) {
System.out.println("Connected to AromaShooter: " + aromaShooter.getSerial());
}
}
return usbController;
}
}
Steps to reproduce:
Run Python code. Output will be available Bluetooth devices in your area. No Errors.
My output:
Initializing Aroma Shooter...
com.fazecast.jSerialComm.SerialPortTimeoutException: The write operation timed out before all data was written.
at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1470)
at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1449)
at com.aromajoin.sdk.jvm.SerialReader.query(SerialReader.java:33)
at com.aromajoin.sdk.jvm.usb.USBASController.scanAndConnect(USBASController.java:74)
at worg.weizmann.App.initAromajoin(App.java:107)
at worg.weizmann.App.main(App.java:27)
exiting...
Re-run Python code.
My output:
Traceback (most recent call last):
File "/home/pi/Documents/Danielle/rpi-box-python/bleak_poc.py", line 53, in <module>
asyncio.run(main())
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/pi/Documents/Danielle/rpi-box-python/bleak_poc.py", line 51, in main
await discoverDevices()
File "/home/pi/Documents/Danielle/rpi-box-python/bleak_poc.py", line 14, in discoverDevices
devices = await BleakScanner.discover()
File "/home/pi/Documents/Danielle/rpi-box-python/.venv/lib/python3.7/site-packages/bleak/backends/scanner.py", line 115, in discover
async with cls(**kwargs) as scanner:
File "/home/pi/Documents/Danielle/rpi-box-python/.venv/lib/python3.7/site-packages/bleak/backends/scanner.py", line 95, in __aenter__
await self.start()
File "/home/pi/Documents/Danielle/rpi-box-python/.venv/lib/python3.7/site-packages/bleak/backends/bluezdbus/scanner.py", line 166, in start
assert_reply(reply)
File "/home/pi/Documents/Danielle/rpi-box-python/.venv/lib/python3.7/site-packages/bleak/backends/bluezdbus/utils.py", line 23, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.InProgress] Operation already in progress
Any help would be most appreciated, as I require analysis of Bluetooth data in order to trigger the Aroma Shooter in my system.
The text was updated successfully, but these errors were encountered:
From previous experience in Raspberry Pi, attempting to talk to the Bluetooth port /dev/ttyAMA0 as if is was a USB port /dev/ttyACM* can result in this type of crash. Perhaps it's connected?
@danielle-h : Thanks for reporting the issue.
This library (Java version) is supposed to connect Aroma Shooter via USB only.
You are trying to connect via Bluetooth?
No. I am trying to connecting to another device via Bluetooth while Aroma Shooter is connected via USB. This is impossible as connecting the Aroma Shooter (using USB) crashes Bluetooth on a Raspberry Pi.
Once connection was made to an Aroma Shooter, the Bluetooth becomes inoperative with error "Operation already in progress". Only a reboot restores the Bluetooth (until next Aroma Shooter connection).
Using Raspberry pi running Linux 10 (buster).
output of java -version:
Using Bleak and Python 3.7.3 to connect to Bluetooth device.
To reproduce:
Python code to discover devices vi ble:
Java code to connect to Aroma Shooter: (error occurs after running this script regardless of whether saw aroma shooter or not, see issue #3 )
Steps to reproduce:
My output:
My output:
Any help would be most appreciated, as I require analysis of Bluetooth data in order to trigger the Aroma Shooter in my system.
The text was updated successfully, but these errors were encountered: