pulsartronic / usbrfmapp Goto Github PK
View Code? Open in Web Editor NEWsmartphone LoRa device connection - Android - USB - Arduino - LoRa
License: GNU General Public License v3.0
smartphone LoRa device connection - Android - USB - Arduino - LoRa
License: GNU General Public License v3.0
Hi. I have an LG G2 with Android 4.4.2. The app starts but as soon as I insert the USB cable connecting the board the app crashes. It does not display anything if I start it again wih the device conected via MicroUSB...
Tried with multiple RFM9x series and Arduino boards (bought in diff. stores, also from recommended ali link), multiple Androids, at least 7, 10, 12, 13, also with downgraded Chrome and WebView
system app-lib
Every connection try ends with app crash and below log (these with ----
prefix are mine additional)
2023-01-17 23:46:31.641 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Interface succesfully claimed
2023-01-17 23:46:31.642 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.644 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 0
2023-01-17 23:46:31.644 23618-23618/com.pulsartronic.usbrfmapp D/UsbRequestJNI: init
2023-01-17 23:46:31.647 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.654 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.655 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.658 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.664 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.666 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.670 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.673 23618-23618/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 7
2023-01-17 23:46:31.673 23618-23618/com.pulsartronic.usbrfmapp W/ronic.usbrfmapp: Accessing hidden field Landroid/hardware/usb/UsbRequest;->mBuffer:Ljava/nio/ByteBuffer; (unsupported, reflection, allowed)
2023-01-17 23:46:31.673 23618-23618/com.pulsartronic.usbrfmapp W/ronic.usbrfmapp: Accessing hidden field Landroid/hardware/usb/UsbRequest;->mLength:I (unsupported, reflection, allowed)
2023-01-17 23:46:31.685 23618-23816/com.pulsartronic.usbrfmapp I/USBRFMApp: ---- send b64:QQHBA2FwcEEBwQVzdGF0ZUEA
2023-01-17 23:46:31.689 23618-23618/com.pulsartronic.usbrfmapp I/chromium: [INFO:CONSOLE(150)] "--------------------------------------------------------------------", source: file:///android_asset/USBRFMApp/USBRFMApp.js (150)
2023-01-17 23:46:31.689 23618-23618/com.pulsartronic.usbrfmapp I/chromium: [INFO:CONSOLE(151)] "Sending to USB/Serial port", source: file:///android_asset/USBRFMApp/USBRFMApp.js (151)
2023-01-17 23:46:31.689 23618-23618/com.pulsartronic.usbrfmapp I/chromium: [INFO:CONSOLE(152)] "{"app":{"state":{}}}", source: file:///android_asset/USBRFMApp/USBRFMApp.js (152)
2023-01-17 23:46:32.043 23618-23626/com.pulsartronic.usbrfmapp I/ronic.usbrfmapp: Compiler allocated 4579KB to compile void android.view.ViewRootImpl.performTraversals()
2023-01-17 23:46:33.235 23618-23817/com.pulsartronic.usbrfmapp I/: ---- onReceivedData b64:
2023-01-17 23:46:33.691 23618-23816/com.pulsartronic.usbrfmapp I/CDCSerialDevice: Control Transfer Response: 0
2023-01-17 23:46:33.692 23618-23816/com.pulsartronic.usbrfmapp D/UsbDeviceConnectionJNI: close
2023-01-17 23:46:33.692 23618-23817/com.pulsartronic.usbrfmapp I/: ---- onReceivedData b64:
2023-01-17 23:46:33.692 23618-23819/com.pulsartronic.usbrfmapp W/System.err: java.lang.InterruptedException
2023-01-17 23:46:33.692 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at java.lang.Object.wait(Native Method)
2023-01-17 23:46:33.692 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at java.lang.Object.wait(Object.java:442)
2023-01-17 23:46:33.692 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at java.lang.Object.wait(Object.java:568)
2023-01-17 23:46:33.693 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at com.felhr.usbserial.SerialBuffer$SynchronizedBuffer.get(SerialBuffer.java:117)
2023-01-17 23:46:33.693 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at com.felhr.usbserial.SerialBuffer.getWriteBuffer(SerialBuffer.java:72)
2023-01-17 23:46:33.693 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at com.felhr.usbserial.UsbSerialDevice$WriteThread.doRun(UsbSerialDevice.java:402)
2023-01-17 23:46:33.693 23618-23819/com.pulsartronic.usbrfmapp W/System.err: at com.felhr.usbserial.AbstractWorkerThread.run(AbstractWorkerThread.java:21)
Crash won't happen when we increase timeout from 2000 to 10000 on JS side, but still no answer, never. Line causing crash is JS AndroidSerial_onopen
call posted to WebView
just after native connection/binding to port. I've commented out this JS call and tried to write same message (or anything...) to bare serialPort
, also no response. Not even shure where is the problem, debugged a bit Arduino/RFM side, "probably" works... (like app?)
Hi, I tried making your project and when I run your code I got this error: (no clue what to do)
I also had little trouble loading libraries but I fixed that. Other than that I havent messed with original source code.
Any ideas?
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "LilyPad Arduino USB"
libraries\SerialPort\AVRSerialPort.cpp.o (symbol from plugin): In function `SerialPort_CONFIG(int)':
(.text+0x0): multiple definition of `SerialPort_CONFIG(int)'
sketch\AVRSerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\AVRSerialPort.cpp.o (symbol from plugin): In function `SerialPort_CONFIG(int)':
(.text+0x0): multiple definition of `SerialPort::applySettings()'
sketch\AVRSerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::~Channel()'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::~Channel()'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::~Channel()'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::send(CDS::DataBuffer*)'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::Channel(SerialPort*)'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::Channel(SerialPort*)'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\Channel.cpp.o (symbol from plugin): In function `SerialPort::Channel::~Channel()':
(.text+0x0): multiple definition of `SerialPort::Channel::loop()'
sketch\Channel.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::write(unsigned char)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `non-virtual thunk to SerialPort::write(unsigned char)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::write(unsigned char const*, unsigned int)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `non-virtual thunk to SerialPort::write(unsigned char const*, unsigned int)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::SerialPort(Node*, char const*)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::SerialPort(Node*, char const*)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::setup()'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::from(CDS::DataBuffer*)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::state(CDS::DataBuffer*, CDS::DataBuffer*)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::~SerialPort()'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::~SerialPort()'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::~SerialPort()'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::loop()'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\SerialPort\SerialPort.cpp.o (symbol from plugin): In function `SerialPort::write(unsigned char)':
(.text+0x0): multiple definition of `SerialPort::save(CDS::DataBuffer*, CDS::DataBuffer*)'
sketch\SerialPort.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board LilyPad Arduino USB.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Hello i have a question about your project DIY Smartphone LoRa Connection.
This is a super cool project i love it but i have some troubles with it.
I bought all the components I try to build it but the rfm status still remain stop.
However i received sometimes RX bytes in the console sush as :
RX 130 bytes RSSI -164db PFE -2144 SNR 0
when i try tu send a message i have TX 0 bytes
Do you have some idea about that ?
Hi, i would like to build this but the link to the specific rfm used in the instructions isn't listed, there's a link to an AliExpress whishlist but it's dead.
I would like to make sure I'm buying the right components.
Thanks
edit: I think it is a RFM95W, am I right?
I just saw this project on github that apparently enables sending images slowly over LoRa. I think it could be a nice thing to implement to this project but I lack the skills to do so. Just posting here in case anyone wants to give it a try
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.