logo elektroda
logo elektroda
X
logo elektroda

Mini 1080p wifi camera from Aliexpress, how to use without app (FtyCamPro)?

Wuppiduppi 27972 102
ADVERTISEMENT
  • #61 21646607
    insmod
    Level 27  
    Current progress:
    Managed to create a makefile and generate a booting binary.
    Next step - OBK.

    One problem i don't know how to solve. .exe execution. I use WSL - so exe more or less work.

    No log currently, probably due to semaphore return value.
    [2502]dns sock :2
    NO FREE TCP_PCB! total:12
    port:7070	fd:3
    [2504]set_video_track:362
    [2504]set_video_track source->track[t]:0	rtp:200346EC
    [2505]set_video_track:362
    [2506]set_video_track source->track[t]:0	rtp:20034EB8
    OpenTXW81X, version 1.0.0
    Entering initLog()...Commands registered!initLog() done!Main_Init_Before_Delay done
    Main_Init_Delay
    Main_Init_Delay done
    Thread create TCP_server - err 0
    NO FREE TCP_PCB! total:12
    
  • ADVERTISEMENT
  • #62 21646627
    divadiow
    Level 35  
    omg. you're giving it a go!

    Added after 31 [minutes]:

    insmod wrote:
    One problem i don't know how to solve. .exe execution


    to what bit does this relate specifically?
  • ADVERTISEMENT
  • #63 21646648
    insmod
    Level 27  
    >>21646627
    How would an image be generated in workflow?
  • #64 21646725
    p.kaczmarek2
    Moderator Smart Home
    Nice, what is the exe used for? Some packaging tool?

    Well, most of our workflows run on ubuntu, but Windows simulator build works on windows-latest, maybe that's what we need to target here..
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #65 21646940
    insmod
    Level 27  
    Got it to connect to wifi.
    Camera is disabled for now
    Man holding a white mug and looking out the window on a sunny afternoon.
    Spams NO FREE TCP_PCB, even if only 3 sockets are used...
    Info:MAIN:Time 95, idle 0/s, free 136928, MQTT 0(0), bWifi 1, secondsWithNoPing 24, socks 3/20 
    NO FREE TCP_PCB! total:20
    Info:MAIN:Time 96, idle 0/s, free 134940, MQTT 0(0), bWifi 1, secondsWithNoPing 25, socks 4/20 
    Info:MAIN:Time 97, idle 0/s, free 136756, MQTT 0(0), bWifi 1, secondsWithNoPing 26, socks 3/20 
    NO FREE TCP_PCB! total:20
    Info:MAIN:Time 98, idle 0/s, free 136584, MQTT 0(0), bWifi 1, secondsWithNoPing 27, socks 3/20 
    NO FREE TCP_PCB! total:20
    Info:MAIN:Time 99, idle 0/s, free 136584, MQTT 0(0), bWifi 1, secondsWithNoPing 28, socks 3/20 
    
  • #66 21646955
    divadiow
    Level 35  
    Dude that's awesome 👍🏻

    insmod wrote:
    NO FREE TCP_PCB!


    Hmm. Couldn't seem to shake this before either.
  • #67 21646973
    p.kaczmarek2
    Moderator Smart Home
    Helpful post? Buy me a coffee.
  • Helpful post
    #68 21647019
    insmod
    Level 27  
    Test build.
    Camera doesn't work for me (not in AP mode, not in STA).
    No GPIO, or any other periph.
    No LFS.
    Config/flashvars is stored via EF.
    Reboot doesn't work (mcu_reset does nothing).
    Watchdog doesn't work (or perhaps it does, but look at the problem higher).
    Mutex significantly slows log down.
    MQTT is there, but not tested.
  • Helpful post
    #69 21647165
    divadiow
    Level 35  
    Code: Text
    Log in, to see the code


    Mini 1080p wifi camera from Aliexpress, how to use without app (FtyCamPro)?

    Added after 4 [minutes]:


    Mini 1080p wifi camera from Aliexpress, how to use without app (FtyCamPro)?

    Added after 1 [hours] 15 [minutes]:

    wondering what you've set

    Code: C / C++
    Log in, to see the code

    to in lwipopts.h @insmod
  • #70 21647230
    p.kaczmarek2
    Moderator Smart Home
    Helpful post? Buy me a coffee.
  • #71 21647231
    divadiow
    Level 35  
    sorry, yes. default in SDK is 8kb
    https://github.com/divadiow/txw81xcam/blob/main/sdk/include/lib/net/lwip/lwipopts.h#L73

    Added after 2 [minutes]:

    maybe still default unless there are changes in built file but not committed here https://github.com/NonPIayerCharacter/OpenBK7...mmit/7119241687237c929eb096962b18e842be023a4e

    Added after 27 [minutes]:

    back to rtsp build, with

    Code: C / C++
    Log in, to see the code


    audio on rtsp works with my cam, so default pins still for mic
  • #72 21647266
    sebek2435
    Level 6  
    Have you tried the rtsp webfile yet? Would be nice to be able to open the cam in a browser instead.

    Not really sure if that's how it works but would this setup work maybe?
    Screenshot showing RTSP stream setup in a web browser with a video player.
  • #73 21647318
    divadiow
    Level 35  
    hmm. with a spook_config.h of this:

    Spoiler:
    #ifndef __SPOOK_CONFGIG_H__
    #define __SPOOK_CONFGIG_H__

    //#include <board_config.h>

    #define FRAME_HEAP 20
    #define SPOOK_MAX_FRAME_SIZE 0/*352*288*3*/
    #define SPOOK_PORT 7070

    #define JPEG_ENCODER_NAME "jpeg_dvp"
    #define JPEG_ENCODER2_NAME "jpeg_usb"

    #define FILE_JPEG_ENCODER_NAME "jpeg_file"

    #define JPEG_FRAMEINC 1

    #define AUDIO_ENCODER_NAME "audio"
    #define FILE_AUDIO_ENCODER_NAME "audio"


    #define EXCHANGER_SLOT_SIZE 16

    #define RTSP_LIVE_PATH "/webcam" /* /webcam */
    #define RTSP_LIVE_USB_PATH "/webcam2" /* /webcam */
    #define RTSP_WEB_PATH "/file" /* /webcam */


    #define RTSP_LIVE_TRACK "jpeg_dvp"
    #define RTSP_LIVE2_TRACK "jpeg_usb"
    #define RTSP_WEBFILE_TRACK "jpeg_file"


    #define RTSP_LIVE_AUDIO_TRACK "audio"
    #define RTSP_WEBFILE_AUDIO_TRACK "audio_file"



    #define HTTP_PATTH "/webcam" /* /webcam */
    #define HTTP_INPUT_NAME "jpeg"
    #define HTTP_MODE "stream"


    #define JPEG_FIFO_SIZE 3

    #define SCAN_DATA_OFFSET 0x253//0X265

    #define MAX_DATA_PACKET_SIZE 1440

    #define SPOOK_CACHE_BUF_LEN 1600
    extern unsigned int live_buf_cache[SPOOK_CACHE_BUF_LEN/4];



    typedef struct
    {
    const char* sema_name; //sema name
    const char* rtp_video_name; //rtp流名字
    const char* audio_name;
    const char* thread_name;
    const char* stream_name;
    const char *jpg_name;
    const char* path;
    }rtp_name;




    #endif



    I do not get anything for

    192.168.4.1:7070/webcam
    ../webcam2
    ../file
  • #74 21647327
    sebek2435
    Level 6  
    divadiow wrote:
    #define HTTP_PATTH "/webcam"

    I would assume you also need to change this to match the web path. But if that doesn't work hopefully someone figures it out soon.
    You have already made so much progress though it's amazing. I can't wait to start tinkering with mine soon.
  • #75 21647371
    divadiow
    Level 35  
    divadiow wrote:
    maybe still default unless there are changes in built file but not committed here https://github.com/NonPIayerCharacter/OpenBK7...mmit/7119241687237c929eb096962b18e842be023a4e



    https://github.com/divadiow/txw81xcam/compare...473836aebfcea70e21fff576c3a9dc38fa28a06f0edda

    Added after 36 [minutes]:

    >>21647327

    matching those doesn't seem to help. probably missing something obvious :(

    the ultimate of course would be rtsp and OBK support with http window stream option in GUI :D

    Added after 1 [minutes]:

    a basic non-OBK stable RTSP/http opensource replacement for the dodgy p2p cloud stuff would be OK too
  • ADVERTISEMENT
  • #76 21647462
    sebek2435
    Level 6  
    I've been looking through the files for a while now and noticed that most of the defines in spook_config.h have no references for them anywhere apart from these 3:
    #define SPOOK_PORT				7070
    #define MAX_DATA_PACKET_SIZE	1440
    #define SPOOK_CACHE_BUF_LEN			1600

    It also seems like webfile uses the AVI file format and requires an SD card to function. However even if you got it to work it still uses RTSP so won't help with opening the stream on a browser.

    Added after 21 [minutes]:

    Actually it looks like handling HTTP requests (at least for video) hasn't even been implemented.
  • #77 21647479
    p.kaczmarek2
    Moderator Smart Home
    Which source file?


    The most basic HTTP preview should be easy to do. Just create endpoint that return JPG image and implement it, then call it repeatedly in JS.

    Added after 2 [minutes]:

    rtp-jpeg.c ?
    Helpful post? Buy me a coffee.
  • #79 21647536
    divadiow
    Level 35  
    insmod wrote:
    Any idea where datetime and "thai" chinese symbol is drawn?


    sdk/lib/video/dvp/cmos_sensor/csi_v2.c

    Code: C / C++
    Log in, to see the code


    Added after 13 [minutes]:

    Man sitting at a desk in a modern office, working on a laptop.

    lots
    Man sitting at a desk with a laptop, holding a cup of coffee and smiling.

    Added after 32 [minutes]:

    LEDs for me

    Screenshot of a C source code snippet related to CMOS sensor control and watermark enabling functions.

    Added after 3 [hours] 42 [minutes]:

    btw. an odd choice of .gitignore starting file meant an mbedtls makefile was missed off pure SDK main, so: https://github.com/NonPIayerCharacter/OpenTXW81X/compare/main...divadiow%3Atxw81xcam%3Amain
  • #81 21647775
    divadiow
    Level 35  
    >>21647770

    great news! will flash.
  • #82 21647789
    insmod
    Level 27  
    Accidentally deleted it, but new build is here.
    https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/17322792613
    LFS added (44kb).
    Camera init is now in separate driver.
    startdriver TXWCAM [buf_size]
    buf_size defaults to 60000.
    Additional command - CAM_Show_Timestamp - shows ntp timestamp. 1 to enable, 0 to disable.
    Driver can't be stopped, since there are no deinit functions in SDK.
  • #83 21647799
    sebek2435
    Level 6  
    insmod wrote:
    Driver can't be stopped, since there are no deinit functions in SDK.


    maybe you could use the deinit in SDK/lib/video/dvp/jpeg/jpg_v2.c?
  • #84 21647804
    insmod
    Level 27  
    >>21647799
    It's not just jpg that must be stopped.
    There is csi_open but not csi_close
    There is spook_init but no deinit.

    It doesn't really matter though. Why would camera needs to be deinited? Just reboot if really needed.

    Added after 6 [minutes]:

    There is some strange thing with autoexec/startup command.
    Startdriver does nothing.
    Debug:CMD:cmd [startdriver NTP]
    Debug:CMD:cmd [ntp_timeZoneOfs 0:00]
    Error:CMD:cmd ntp_timeZoneOfs NOT found (args 0:00)
    Debug:CMD:cmd [waitfor wifistate 4]
    

    and later
    Debug:CMD:cmd [startdriver TXWCAM 55000]
    Debug:CMD:cmd [CAM_Show_Timestamp 1]
    Error:CMD:cmd CAM_Show_Timestamp NOT found (args 1)
    

    Manually entering them works fine.
  • #85 21647838
    divadiow
    Level 35  
    Screenshot of a Linux terminal showing an NTP command and its output.

    Added after 1 [minutes]:

    are you getting ntp to retrieve time at all?
  • #86 21647850
    insmod
    Level 27  
    >>21647838
    Not with local server. But, when i first tested it without setting server, it worked fine.
  • #87 21647854
    divadiow
    Level 35  
    yep OK. started manually instead before cam

    Man sitting in front of a webcam, looking at a monitor with a focused expression.
  • #88 21647861
    insmod
    Level 27  
    NTP and commands started working for me.
    The problem was mutex. After i "stubbed" them, it started working.
    But, i don't know how safe it is.

    Added after 24 [minutes]:

    Fixed mutex, the error was mine.
    If mutex is taken successfully, it returns 0. I checked != 0.
    It's a surprise it worked at all.
  • #89 21647886
    p.kaczmarek2
    Moderator Smart Home
    Nice progress. Maybe I should look into FTP client or SMTP client, so we can upload a JPG photo taken via script. I have planned these features for a long time...

    Added after 13 [minutes]:

    By the way, are the other PRs ready to merge? Or at least... potentially non-breaking if not tested well?
    Helpful post? Buy me a coffee.

Topic summary

A mini 1080p WiFi camera from Aliexpress priced under 3€ uses a Beken BK7252UQN48 AU3437XB chip and requires the proprietary "FtyCamPro" app for operation. The device creates its own WiFi network and assigns an IPv4 address but shows no open ports on scanning. Opening the case reveals the Beken chip, and firmware resources for this chip are available on GitHub (beken7252-opencam), enabling potential firmware backup and custom flashing after identifying the flashing pins. Some similar cameras use the Taixin TXW817 chipset, which has a different ecosystem including SDKs and programming tools like TXProgrammer and CK-Link debuggers. Attempts to access internal flash memory via QSPI/SPI have been made, but require delicate soldering and specialized hardware. The Taixin TXW81x IoT SDK and C-SKY Development Kit (CDK) support firmware development and compilation. TXProgrammer can be configured to English for easier use. A 2MB flash dump from a TXW817-810 based camera has been obtained, and a demo application runs on this hardware using hgSDK. Overall, the discussion covers hardware identification, firmware extraction, SDK availability, and programming tool usage to bypass the official app and enable local control of these low-cost WiFi cameras.
Summary generated by the language model.
ADVERTISEMENT