B4A Library PL2303 USB to RS232 adaptor driver

pixelpop

Active Member
Licensed User
Longtime User
I will +1 this one...right now it's just irritating from a development standpoint, but my project ideally will be able to use wifi connections concurrently with USB usage.

I think the problem is that those devices that assign the Realtek WLAN driver to the USB port allow wireless connections until you reassign that USB port to some other device. That's why Bridge works until an app that reassigns the USB port is run and then the wireless connection is lost. Some very smart people here know more about the technical details, but based on what I've seen, I'm not sure this issue can be resolved without possibly doing a custom ROM. And unfortunately, most (if not all) of these inexpensive tablet do not include Bluetooth. So the question then becomes: how do you ever develop an app that uses the USB interface for input? Bridge wireless disconnects, there's no Bluetooth and (of course) the USB port is in use by what you are developing for.
 

gtoner

Member
Licensed User
Longtime User
Its interesting that after the wifi is disabled I an go to the settings menu, disable the wifi which is indicated as being on and after the tablet responds by disabling the wifi I can turn it back on, it reconnects to my network and everything works correctly until I restart my program from the beginning where it asks for permission to use the usb.
 

agus mulyana

Member
Licensed User
Longtime User
Dear

Execuse me, i have been using PL23203 with OTG and connect it to LG Mobile Phone, i , but it still not working properly, please help me to solve this problem,, thank you
 

osasigbinedion

Member
Licensed User
Longtime User
I am having the same issue as pin71...
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.nio.ByteBuffer.isDirect()' on a null object reference
at android.hardware.usb.UsbRequest.dequeue(UsbRequest.java:156)
at android.hardware.usb.UsbDeviceConnection.requestWait(UsbDeviceConnection.java:230)
at anywheresoftware.b4a.objects.usb.UsbDeviceConnectionWrapper$Reader.run(UsbDeviceConnectionWrapper.java:146)
at java.lang.Thread.run(Thread.java:818)
My Timer code is
Sub PauseTimer_Tick
'Handle tick events
If Main.connected = True Then
If setup = False AND Main.usbActive = False Then
PauseTimer.Enabled = True
Else
PauseTimer.Enabled = False
End If
SendNextCommand
Else
Service_Destroy
End If
End Sub

Send Next Command sends the out request (queues the command)

In the new data sub I continue Listening...any clue on what could be happening.
 
Last edited:

kuosda

Active Member
Licensed User
Longtime User
Hello, everyone
My terminal equipment connected using RS485 ,interface chip is PL2303, use PL2303 USB to RS232 adaptor driver has found a problem that must be SetDtrRts (True, True) sends command and then SetDtrRts (True, False) to receive RS485 Data, equipment manufacturers tell me Not required control RTS, however, I found not so I do not know whether someone tell me why?
FIG. 123
 

Attachments

  • 1.jpg
    27.2 KB · Views: 245
  • 2.jpg
    143.8 KB · Views: 256
  • 3.jpg
    144.9 KB · Views: 254
Cookies are required to use this site. You must accept them to continue using the site. Learn more…