simshineaicamera / SIMCAM_SDK

SimCam SDK
60 stars 15 forks source link

How to connect WiFi to existing AP? #1

Closed NexVII closed 5 years ago

NexVII commented 5 years ago

It's possible to have an example or tutorial of config.txt and other needed files to connect SIMCAM to an existing network with ipaddress configured by DHCP server. Thanks in advance.

RamatovInomjon commented 5 years ago

Hi there, you just need to change wifi_mode to the STA_MODE, in this mode camera connects existing network, and also you need to use simcam app to connect camera to the wifi,

NexVII commented 5 years ago

Hi, I downloaded the sdk and running the "Run_detection_demo" example created the AP for me. So I tried both telnet and rtsp (with VLC and iSpy) and I have access with both Then I changed the config.txt file with: "wifi_mode ":" STA_MODE ". When SIMCAM starts it says "connection succeeded" without me having it configured and without create AP. I also tried to delete the "rtl_hostapd_2G.conf" file but nothing changes. SIMCAM when start always says "connection succeeded" but it is not connected to any WIFI configured by me. So I tried to change the "rootfs" file with the latest firmware version downloaded from "https://www.simcam.ai/images/rootfs". With this firmware I can configure the SIMCAM but I will not access it with rtsp or telnet. I work on windows and I'm not very familiar with Linux. Thanks againt.

RamatovInomjon commented 5 years ago

firmware in the official website does not support rtsp stream, you can use only sdk's firmware to access rtsp stream, or telnet. after changing wifie_mode to STA_MODE you need to reset the camera, for this you need to long press RESET button on the camera, 1) Make sure you are using sdk version of firmware 2) RESET the camera when you change wifi mode

NexVII commented 5 years ago

Hi, I cleaned the SD card and copied only these files (all taken from sdk):

after which I modified config.txt like this (AP_MODE -> STA_MODE):

{ "wifi_mode":"STA_MODE", "if_send":0, "server_IP":"118.190.201.26", "port":8001, "model":[{ "model_have":1, "input_width":300, "input_height":300, "shave_num":6, "input_color":1, "mean0":127.5, "mean1":127.5, "mean2":127.5, "std":127.5, "label":3, "conf_thresh":0.5 }, { "model_have":1, "input_width":64, "input_height":64, "shave_num":1, "input_color":0, "mean0":127.5, "mean1":0, "mean2":0, "std":127.5, "label":3, "conf_thresh":0.5 }, { "model_have":1, "input_width":64, "input_height":64, "shave_num":2, "input_color":0, "mean0":127.5, "mean1":127.5, "mean2":127.5, "std":127.5, "label":3, "conf_thresh":0.5 }] }

then I started the SimCam and when it started I pressed reset button until I heard it say "starting up" (about 5 seconds). When it started the led turned red then green and at the end blue without flashing green. The SimCam say "connection succeded" without configure an external AP. After that I tried to press reset button longest time, until I heard it say "connection succeded" (about 20 seconds) but without success. So I try to change again file config.txt to configure it in AP_MODE (I copied the original config.txt) and reset again with long press, but now AP not appear. At the end I tried to write latest firmware and press reset button (it work correctly and reset SimCam parameters) and write again the sdk firmware but without obtainig different results. I downloaded sdk with "git clone https://github.com/simshineaicamera/SIMCAM_SDK.git" (git for windows). I also tried downloading rootfs sdk file by browser. What am I wrong? Thanks.

RamatovInomjon commented 5 years ago

Sorry for inconvenience , you did everything correct, we have found some bugs in the firmware, please try again, I have uploaded new version of firmware on github, (rootfs file)

NexVII commented 5 years ago

ok, now it works. Thank you