Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tapo C110 SSC333 variant with AltoBeam 6012B WIFI chip #33

Open
BRFud opened this issue Nov 19, 2024 · 5 comments
Open

Tapo C110 SSC333 variant with AltoBeam 6012B WIFI chip #33

BRFud opened this issue Nov 19, 2024 · 5 comments

Comments

@BRFud
Copy link

BRFud commented Nov 19, 2024

I bought two Tapo C110 cameras this week to try out OpenIPC. Both use the SSC333 with boards labelled "Tapo C110(EU)/2.20" but they differ in Wifi chip. The first uses the SSW101B, which I believe is baked into the current builder config for the C110 but the second camera has the AltoBeam 6012B WIFI chip (used in other boards supported by OpenIPC). Could someone familiar with the project please add support for this Tapo C110 variant so that the appropriate firmware will be built and added to releases? Thanks!
IMG_6690

@geedubess
Copy link
Contributor

I've patched files locally to build a ssc333 + atbm601x board, but I haven't yet had any luck getting the wifi interface up. My board says "TAPO C110P4(US) / 2.6". I was really hoping for cameras with SSW101B. (;

I noted that the wlan USB device is idVendor=007a, idProduct=888b, where the default atbm60xx USB PID is 0x8888. I'm overriding the default PID.

I started with ssc333_lite_tp-link-tapo-c110-v2 as a template, and made ssc333_lite_tp-link-tapo-c110-v26. These board names really ought to contain the wifi chipset name!

BR2_PACKAGE_ATBM60XX=y
BR2_PACKAGE_ATBM60XX_MODEL_601X=y
BR2_PACKAGE_ATBM60XX_INTERFACE_USB=y
BR2_PACKAGE_ATBM60XX_USB_PID="0x888b" # hacked into the ATBM60XX files locally
BR2_PACKAGE_SSW101B=n

Unfortunately, if I load it from startup (openipc/general/overlay/etc/wireless/usb) it'll silently hang (not sure how to enable relevant debug), and if I load it with modprobe post-boot, I get the below. I'm not exactly sure where to go from here, but I'll keep poking at it.

Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_usb_module_init 0
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:SVN_VER=20811,DPLL_CLOCK=1,BUILD_TIME=[===USB-ATHENA_B==
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:Probe called -1 v1
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:not CONFIG_USE_DMA_ADDR_BUFFER
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:CONFIG_TX_NO_CONFIRM
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:Allocated hw_priv @ c0563100
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbmwifi USB_USE_TASTLET_TXRX enable (c0563100)
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbmwifi USB_USE_TASTLET_TXRX enable (c0563100)
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_before_load_firmware++
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_HwGetChipType, <ERROR> cannot read chip id
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_HwGetChipType, chipver=0x4a, g_wifi_chip_type[0]
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:+++++++++++++++++1.1v++++++++++++++++++
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:===================~_~====================
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_start_load_firmware++
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:used firmware.h=
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:START DOWNLOAD ICCM=========
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_load_firmware_generic: addr 0: len 22000
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:START DOWNLOAD DCCM=========
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_load_firmware_generic: addr 800000: len 8000
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_after_load_firmware++
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:set_block_size=256
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:mdelay wait wsm_startup_done  !!
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:<ERROR>:EOVERFLOW,len=0
Nov 22 09:46:25 openipc-ssc333 kern.err kernel: [atbm_log]:[WARNING] atbm_usb_receive_data drop
<repeats>
Nov 22 09:46:29 openipc-ssc333 kern.err kernel: [atbm_log]: wsm_startup_done timeout ERROR !!
Nov 22 09:46:29 openipc-ssc333 kern.err kernel: [atbm_log]:vendorreq:err(-71)addr[16100050] len[4],b_write 1 request 1
Nov 22 09:46:29 openipc-ssc333 kern.err kernel: [atbm_log]:vendorreq:err(-71)addr[16100050] len[4],b_write 1 request 1
Nov 22 09:46:29 openipc-ssc333 kern.err kernel: [atbm_log]:vendorreq:err(-71)addr[16100050] len[4],b_write 1 request 1
Nov 22 09:46:29 openipc-ssc333 kern.err kernel: [atbm_log]:ERR write addr 16100050,len 4
Nov 22 09:46:29 openipc-ssc333 kern.err kernel: [atbm_log]:atbm_direct_write_reg_32:  can't write config register.
<repeats>

@geedubess
Copy link
Contributor

I discovered that my wifi chipset is actually a 6012B-X (https://www.altobeam.com/en/contents/72/135.html). That's not yet supported by the atbm60xx driver in openipc!

So, I added it as a package, patched the compilation errors, and my ssc333 + 6012b-x is now working great. I'll work on cleaning it up and issuing a PR, but my biggest question is where I should be pulling the 6012BX driver from.

I found it at https://github.com/gtxaspec/atbm-wifi, but I have no idea if that is a reliable source for the tree. If anyone has any thoughts please do share.

@BRFud, do you have any idea whether you have a 6012B or 6012B-X? What is your USB VID:PID for the device?

@BRFud
Copy link
Author

BRFud commented Nov 25, 2024

@geedubess, thank you for progressing this. I've not been successful in building any patched firmware as yet (getting compile errors running ./builder.sh even before patching the config - probably due to my inexperience) so I'm grateful you've made some headway.

Looking at my ttl logs I see idVendor=007a, idProduct=888b (same as yours), so does that mean I have a 6012B-X? How did you determine that your chip is actually 6012B-X and not 6012B?

As you can see from my photo the chip says 6012B on the case, not 6012B-X, but I may have incorrectly assumed the wrong model as I have only gone by the chip markings. Is yours the same in appearance?

@geedubess
Copy link
Contributor

I tried to use the atbm60xx driver integrated with openipc, but noted during compilation that the driver default VID:PID was 7a:8888 and the driver wasn't doing anything when I loaded it or toggled the chip enable line (which causes 7a:888b to disappear and reappear on the usb bus). I modified the build system to allow me to pass a custom PID of 888b, but then when the driver probed the hardware (log above) it clearly did not work.

After that, I was lucky enough to find a reference to atbm 888b on git in the form of the atbm-wifi repo (above). That then led me to the atbm website which describes the 6012b-x - it sounds like more of a re-design than a re-issue (including BT+80211 vs 80211 only). The atbm-wifi repo (above) is literally the only place I have been able to find source code for the driver and the firmware to load to the chip. Comparing it against the atbm60xx firmware shows many differences. Grab a copy while you can. :)

It's annoying to me that the chip says 6012B as well. I doubt it's malicious, but probably an oversight, possibly a marketing cover-up if they had no choice but to discontinue the original 6012B. If I had to guess, it's probably pin-compatible but I didn't look that deeply. Hey, on the plus side, our hardware might support bluetooth! (if we loaded the right firmware and had the right driver...)

My SSC333+6012B-X has been working great on wifi for the few hours I've been playing with it, and I've now reworked 4 PCBs, flashed my build, and seen the wifi work, so I'm happy.

image

@geedubess
Copy link
Contributor

Please see #34 if you want to try to replicate my success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants