J Jeorge Lumaban Member Licensed User Jan 8, 2016 #1 Hi All, I'm new to B4A programming. I'm doing a project to access the camera for android phone using PC application Is there a way or hint to start with this. I search some IP Cam or DroidCam from store needed to install for the phone and a separate application. Is there a way that I can directly control the camera using only PC application via USB. Im using Aforge.net library for image processing. If not what android library should be use for some kind of DroidCam application? Thanks in advance. Jeorge
Hi All, I'm new to B4A programming. I'm doing a project to access the camera for android phone using PC application Is there a way or hint to start with this. I search some IP Cam or DroidCam from store needed to install for the phone and a separate application. Is there a way that I can directly control the camera using only PC application via USB. Im using Aforge.net library for image processing. If not what android library should be use for some kind of DroidCam application? Thanks in advance. Jeorge
DonManfred Expert Licensed User Longtime User Jan 8, 2016 #2 You can start here https://www.b4x.com/android/forum/t...closed-circuit-tv-cctv-example.23601/#content and here https://www.b4x.com/android/forum/threads/server-cctv-server.37382/#content Upvote 0
You can start here https://www.b4x.com/android/forum/t...closed-circuit-tv-cctv-example.23601/#content and here https://www.b4x.com/android/forum/threads/server-cctv-server.37382/#content
J Jeorge Lumaban Member Licensed User Jan 8, 2016 #3 Thanks Manfred.. Ill check that one. Do you have sample via USB connection. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 8, 2016 #4 USB connection by itself is not enough. Only if USB debug mode is configured and enabled you can create a network connection over USB. Upvote 0
USB connection by itself is not enough. Only if USB debug mode is configured and enabled you can create a network connection over USB.
J Jeorge Lumaban Member Licensed User Jan 12, 2016 #5 Hi Erel. Tnx.. Do you have sample via Bluetooth connection? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2016 #6 There are many examples in the forum that use Bluetooth. Start with this tutorial: https://www.b4x.com/android/forum/threads/14768/#content B4J + B4A example: https://www.b4x.com/android/forum/threads/jbluetooth-library.60184/#content Upvote 0
There are many examples in the forum that use Bluetooth. Start with this tutorial: https://www.b4x.com/android/forum/threads/14768/#content B4J + B4A example: https://www.b4x.com/android/forum/threads/jbluetooth-library.60184/#content
J Jeorge Lumaban Member Licensed User Jan 20, 2016 #7 Erel said: USB connection by itself is not enough. Only if USB debug mode is configured and enabled you can create a network connection over USB. Click to expand... Hi Erel, Tnx for the info. Yes I will used USB debug mode. I want to create such cctv example but via USB not wifi network. How should I start with this? Any help. Thanks.. Upvote 0
Erel said: USB connection by itself is not enough. Only if USB debug mode is configured and enabled you can create a network connection over USB. Click to expand... Hi Erel, Tnx for the info. Yes I will used USB debug mode. I want to create such cctv example but via USB not wifi network. How should I start with this? Any help. Thanks..
Erel B4X founder Staff member Licensed User Longtime User Jan 20, 2016 #8 You can run the following command: Code: adb forward tcp:5007 tcp:2222 The Android device should listen to port 2222. The PC should connect to 127.0.0.1 port 5007. Upvote 0
You can run the following command: Code: adb forward tcp:5007 tcp:2222 The Android device should listen to port 2222. The PC should connect to 127.0.0.1 port 5007.
J Jeorge Lumaban Member Licensed User Jan 21, 2016 #9 DonManfred said: You can start here https://www.b4x.com/android/forum/t...closed-circuit-tv-cctv-example.23601/#content and here https://www.b4x.com/android/forum/threads/server-cctv-server.37382/#content Click to expand... Hi Manfred I check the application and great it works.. I'm a VB net developer and try to convert the PC application from C# to VB.net and it didn't works.. Is there a problem if I was using high version of net framework compare to the sample application? Thanks.. Upvote 0
DonManfred said: You can start here https://www.b4x.com/android/forum/t...closed-circuit-tv-cctv-example.23601/#content and here https://www.b4x.com/android/forum/threads/server-cctv-server.37382/#content Click to expand... Hi Manfred I check the application and great it works.. I'm a VB net developer and try to convert the PC application from C# to VB.net and it didn't works.. Is there a problem if I was using high version of net framework compare to the sample application? Thanks..
J Jeorge Lumaban Member Licensed User Jan 22, 2016 #10 Erel said: You can run the following command: Code: adb forward tcp:5007 tcp:2222 The Android device should listen to port 2222. The PC should connect to 127.0.0.1 port 5007. Click to expand... Hi Erel, Is the port 2222 and 5007 is a default port for USB debug mode or I can use any valid port? Thanks.. Upvote 0
Erel said: You can run the following command: Code: adb forward tcp:5007 tcp:2222 The Android device should listen to port 2222. The PC should connect to 127.0.0.1 port 5007. Click to expand... Hi Erel, Is the port 2222 and 5007 is a default port for USB debug mode or I can use any valid port? Thanks..
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2016 #11 You can use any port numbers you like. I recommend you to implement the PC side with B4J. Upvote 0
J Jeorge Lumaban Member Licensed User Feb 17, 2016 #12 Erel said: You can use any port numbers you like. I recommend you to implement the PC side with B4J. Click to expand... Hi Erel, Thanks.. On the adb forward command.. adb forward tcp:5007 tcp:2222 The Android device should listen to port 2222. The PC should connect to 127.0.0.1 port 5007. What should be the port should I change on the PC application and B4A application. The sample below used port 17178. https://www.b4x.com/android/forum/t...closed-circuit-tv-cctv-example.23601/#content and here https://www.b4x.com/android/forum/threads/server-cctv-server.37382/#content Sample Code: B4A Public ServerIp As String = "10.40.53.110" Public ServerPort As Int = 17178 Private IntervalMs As Int = 150 VB Net PrivateSub Form1_Load(sender AsObject, e AsEventArgs) HandlesMyBase.Load server = New CameraServer.MiniServer(17178, Me) EndSub Upvote 0
Erel said: You can use any port numbers you like. I recommend you to implement the PC side with B4J. Click to expand... Hi Erel, Thanks.. On the adb forward command.. adb forward tcp:5007 tcp:2222 The Android device should listen to port 2222. The PC should connect to 127.0.0.1 port 5007. What should be the port should I change on the PC application and B4A application. The sample below used port 17178. https://www.b4x.com/android/forum/t...closed-circuit-tv-cctv-example.23601/#content and here https://www.b4x.com/android/forum/threads/server-cctv-server.37382/#content Sample Code: B4A Public ServerIp As String = "10.40.53.110" Public ServerPort As Int = 17178 Private IntervalMs As Int = 150 VB Net PrivateSub Form1_Load(sender AsObject, e AsEventArgs) HandlesMyBase.Load server = New CameraServer.MiniServer(17178, Me) EndSub
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2016 #13 adb forward allows you to initiate a connection from the pc to the device. The device should be the server (with ServerSocket). Upvote 0
adb forward allows you to initiate a connection from the pc to the device. The device should be the server (with ServerSocket).
J Jeorge Lumaban Member Licensed User Feb 18, 2016 #14 Erel said: adb forward allows you to initiate a connection from the pc to the device. The device should be the server (with ServerSocket). Click to expand... Hi Erel, In the cctv example, PC is the server and the device was the client. Is this possible also with the adb forward? Upvote 0
Erel said: adb forward allows you to initiate a connection from the pc to the device. The device should be the server (with ServerSocket). Click to expand... Hi Erel, In the cctv example, PC is the server and the device was the client. Is this possible also with the adb forward?
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2016 #15 No. The connection must be initiated from the pc to the android. It should be simple to switch the tasks. As I previously wrote you should use B4J to implement the PC side. This example is the simplest one: https://www.b4x.com/android/forum/threads/b4j-cctv-example.34695/ Upvote 0
No. The connection must be initiated from the pc to the android. It should be simple to switch the tasks. As I previously wrote you should use B4J to implement the PC side. This example is the simplest one: https://www.b4x.com/android/forum/threads/b4j-cctv-example.34695/