Author Topic: Hacking the Rigol DHO800/900 Scope  (Read 2170470 times)

skench, zelectronicauy and 37 Guests are viewing this topic.

Offline Jato

  • Contributor
  • Posts: 13
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2925 on: October 30, 2024, 10:10:49 am »
Is your DHO914 with 3 DDR3 RAM chips?
yes, 3* K4B4G1646E-BYMA
Is there any difference? The system detects 12GB of ram?


Jest jakaś różnica? System wykrywa 12GB ramu?

 

Offline gabiz_ro

  • Regular Contributor
  • *
  • Posts: 143
  • Country: ro
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2926 on: October 30, 2024, 10:52:54 am »
That is RAM for FPGA not for RK3399 that is Android OS CPU
 

Offline Jato

  • Contributor
  • Posts: 13
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2927 on: October 30, 2024, 11:27:07 am »
That is RAM for FPGA not for RK3399 that is Android OS CPU
Does it somehow positively affect the oscilloscope?
 

Offline norbert.kiszka

  • Super Contributor
  • ***
  • Posts: 1049
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2928 on: October 30, 2024, 11:46:39 am »
That is RAM for FPGA not for RK3399 that is Android OS CPU
Does it somehow positively affect the oscilloscope?

FPGA works much faster than cheap RK3399 and it stores samples from ADC. With that, CPU (RK3399) can retrieve those samples anything slower. When CPU work is done, FPGA can do another acquisition. That is how cheap digital oscilloscopes are designed.

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7513
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2929 on: October 30, 2024, 12:02:39 pm »
That is RAM for FPGA not for RK3399 that is Android OS CPU
Does it somehow positively affect the oscilloscope?

FPGA works much faster than cheap RK3399 and it stores samples from ADC. With that, CPU (RK3399) can retrieve those samples anything slower. When CPU work is done, FPGA can do another acquisition. That is how cheap digital oscilloscopes are designed.

I think the question was whether the extra RAM in the DHO900 provides a functional advantage, not the FPGA.

To my knowledge it has never been clarified what that extra RAM chip does -- hacking a DHO800 to add logic analyser functionality seems to work without adding the RAM. I like the hypothesis that Rigol had originally planned some other signal acquisition mode for the digital channels (maybe one which would have avoided the reduction in analog sampling rate), but could not get that to work reliably and had to adopt a fallback solution late in the game.  Do current DHO900 models still have the RAM populated?
 

Offline norbert.kiszka

  • Super Contributor
  • ***
  • Posts: 1049
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2930 on: October 30, 2024, 12:14:31 pm »
That is RAM for FPGA not for RK3399 that is Android OS CPU
Does it somehow positively affect the oscilloscope?

FPGA works much faster than cheap RK3399 and it stores samples from ADC. With that, CPU (RK3399) can retrieve those samples anything slower. When CPU work is done, FPGA can do another acquisition. That is how cheap digital oscilloscopes are designed.

I think the question was whether the extra RAM in the DHO900 provides a functional advantage, not the FPGA.

To my knowledge it has never been clarified what that extra RAM chip does -- hacking a DHO800 to add logic analyser functionality seems to work without adding the RAM. I like the hypothesis that Rigol had originally planned some other signal acquisition mode for the digital channels (maybe one which would have avoided the reduction in analog sampling rate), but could not get that to work reliably and had to adopt a fallback solution late in the game.  Do current DHO900 models still have the RAM populated?

I have DHO924S and all RAM are populated.

Maybe it's used somehow, but it's not easy task to do reverse engineering to answer to this question. RAM chips are quite expensive, so it has to be some reason for adding more.
 
The following users thanked this post: ebastler

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7513
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2931 on: October 30, 2024, 01:17:31 pm »
I have DHO924S and all RAM are populated.

Maybe it's used somehow, but it's not easy task to do reverse engineering to answer to this question. RAM chips are quite expensive, so it has to be some reason for adding more.

Yes, reverse-engineering would be a challenge, especially with the RAM connected to the FPGA. But one would expect to see a functional difference in DHO900s which have the RAM populated vs. hacked a DHO800, right? I understand that @mechatrommer has added the logic analyser port and a preliminary function generator to his DHO800 -- and while there are some glitches, both seem to work in principle, with specs equivalent to the DHO900?

Obviously Rigol must have had a reason to design in and populate the extra RAM. But maybe the reason did not pan out and they ended up not using the chip? The tradeoff between analog and digital sampling rates in the DHO900 is unexpected and rather awkward, so maybe it was not planned that way? That's why I am curious whether Rigol might have dropped the extra RAM from the BOM in recent units.
 

Offline norbert.kiszka

  • Super Contributor
  • ***
  • Posts: 1049
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2932 on: October 30, 2024, 01:23:01 pm »
Speaking of RAM. 4 GB for CPU looks like too much, since less than half of it is used, as far as remember.

Also 12 GB for 50 MS times 4 channels also looks like too much. Maybe it was due to the RAM chips latency?

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7513
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2933 on: October 30, 2024, 02:09:18 pm »
Also 12 GB for 50 MS times 4 channels also looks like too much. Maybe it was due to the RAM chips latency?

Aren't the 50 MSamples available in single-channel mode only, and get reduced to 10 MSamples for 4 channels? The RAM must be used quite differently than one expects...
 

Offline Jato

  • Contributor
  • Posts: 13
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2934 on: October 30, 2024, 02:37:00 pm »
Anybody have any idea when the DHO804 will be available with EU (Poland) delivery at a maximum price of $399? On BangGood it is not available, and it was at a good price, the same amazon.

Sorry for offtop post.
 

Offline norbert.kiszka

  • Super Contributor
  • ***
  • Posts: 1049
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2935 on: October 30, 2024, 03:38:34 pm »
Also 12 GB for 50 MS times 4 channels also looks like too much. Maybe it was due to the RAM chips latency?

Aren't the 50 MSamples available in single-channel mode only, and get reduced to 10 MSamples for 4 channels? The RAM must be used quite differently than one expects...

Yeah, I forgot that...

Offline norbert.kiszka

  • Super Contributor
  • ***
  • Posts: 1049
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2936 on: October 30, 2024, 03:43:03 pm »
Anybody have any idea when the DHO804 will be available with EU (Poland) delivery at a maximum price of $399? On BangGood it is not available, and it was at a good price, the same amazon.

Sorry for offtop post.

I bought mine DHO924S from "authorized distributor" called NDN and located in Warsaw. https://rigol.com.pl/ https://ndn.com.pl/en/

Offline Jato

  • Contributor
  • Posts: 13
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2937 on: November 03, 2024, 08:12:06 am »
I decided to write here about how much money it cost me to upgrade the DHO814 model to DHO924...(full hardware compliance)... All components were purchased on aliexpress.... The amount is indicated along with the cost of delivery to the Czech Republic...The memory chips installed were all three identical K4B4G1646E

3× K4B4G1646E-BMA - 10€
2× TP1282 - 6€
1× MPM3630 - 2€
1× DC3 IDC JTAG-50Pin - 0.29€


Total Cost.          18.29€😉😉😉😉
Could you provide links to the auctions?
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7513
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2938 on: November 03, 2024, 09:08:13 am »
Could you provide links to the auctions?

That post you refer to is more than half a year old. Most of the AliExpress offers (not auctions) will have changed by now.

If you order stuff, don't forget the Dremel for hacking up your scope's front panel to add the logic analyser port and the channel selection button. And whatever bits you want to use to make the button itself.  ::)

(That's another way of saying "Don't do it!"... You would end up with a visibily hacked-up scope. You would still be missing the actual logic analyser pod which costs real money due to its expensive fast comparators. And the DHO900's performance with the digital channels is seriously compromised anyway, since they take sampling rate away from the analog channels. You are better off buying a stand-alone logic analyser, DSLogic or something in that class.)
 
 

Offline Jato

  • Contributor
  • Posts: 13
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2939 on: November 03, 2024, 10:16:21 am »
2423775-0
MPM3630 https://aliexpress.com/item/1005006266647449.html
2423779-1
TP1282 https://aliexpress.com/item/1005006103987848.html
2423771-2
K4B4G1646E-BYMA https://aliexpress.com/item/1005006898164186.html
2423783-3
DC3 IDC JTAG-50Pin https://aliexpress.com/item/1005006802998883.html

Are the chip links ok?
Ps I have a dremel, 3d printer and hot air station. I would love to play with an oscilloscope.
« Last Edit: November 03, 2024, 10:22:06 am by Jato »
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7513
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2940 on: November 03, 2024, 10:29:07 am »
I would love to play with an oscilloscope.

Well, it's a hobby, and everybody has their own idea of fun...

All good as long as you realize that the logic connector can't take logic signals directly. The Rigol logic pod costs 300$ plus VAT; homebrew solutions with the full functionality still close to $200. (I assume you have found the respective threads here?) And, as mentioned, the DHO900 is not a great mixed-signal scope anyway.
 

Offline Jato

  • Contributor
  • Posts: 13
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2941 on: November 12, 2024, 09:35:31 am »
Anybody have any idea when the DHO804 will be available with EU (Poland) delivery at a maximum price of $399? On BangGood it is not available, and it was at a good price, the same amazon.

Sorry for offtop post.

I bought mine DHO924S from "authorized distributor" called NDN and located in Warsaw. https://rigol.com.pl/ https://ndn.com.pl/en/
I purchased DHO804 and it cost me $386.11 with zen.com cashback. That is, some 1540pln. It's good at this price.
 

Offline Spectra

  • Newbie
  • Posts: 2
  • Country: lt
Re: Bluetooth
« Reply #2942 on: November 14, 2024, 12:00:41 pm »
I just got Bluetooth working with the Edimax EW-7611ULB and V2 Bluetooth/Wifi combo adapters :D Just extract
https://sven.killig.de/android/DHO/ew7611ulb.tgz
to the root of the filesystem and start
Code: [Select]
rk3399_rigol:/ # ew7611ulb.sh
or
Code: [Select]
rk3399_rigol:/ # ew7611ulb-v2.sh
Both the Bluetooth and Wi-Fi pages in the Settings app should work then:



To undo, replace *.so with a backup or the initially shipped ones.
Build instructions on https://sven.killig.de/android/DHO


I get WiFi/Bluetooth combo adapter COMFAST CF-723B V2 with RTL8723DU chip, which should be same as Edimax EW-7611ULB V2

Copied https://sven.killig.de/android/DHO/ew7611ulb.tgz to /data/local/tmp/ and executed
Code: [Select]
rk3399_rigol:/ # cd /
rk3399_rigol:/ # cp -rp lib/firmware data/local/tmp
rk3399_rigol:/ # tar xzvf data/local/tmp/ew7611ulb.tgz
rk3399_rigol:/ # ew7611ulb-v2.sh

And WiFi is working perfectly, but I can't make Bluetooth working. At Bluetooth setting page in Android Settings app, when I turn On Bluetooth nothing is happening.
Code: [Select]
hciconfig -a also don't shows any Bluetooth devices.

Code: [Select]
rk3399_rigol:/ # lsusb
Bus 003 Device 004: ID 0bda:d723
Bus 003 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0003

rk3399_rigol:/ # dmesg
[ 3097.215904] usb 3-1: new high-speed USB device number 5 using xhci-hcd
[ 3097.336485] usb 3-1: New USB device found, idVendor=0bda, idProduct=d723
[ 3097.336559] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3097.336577] usb 3-1: Product: 802.11n WLAN Adapter
[ 3097.336608] usb 3-1: Manufacturer: Realtek
[ 3097.336620] usb 3-1: SerialNumber: 00e04c000001
[ 3097.339978] rtk_btusb: btusb_probe: usb_interface ffffffc0a4647800, bInterfaceNumber 0, idVendor 0x0bda, idProduct 0x0000
[ 3097.340015] rtk_btusb: get_fw_table_entry: Product id = 0xd723, fw table entry size 47
[ 3097.340026] rtk_btusb: firmware_info_init: Auto suspend is disabled
[ 3097.340034] rtk_btusb: btusb_probe: download begining...
[ 3097.340042] rtk_btusb: btusb_probe: download ending...
[ 3097.340063] rtk_btusb: btusb_probe: Check bt reset flag 0
[ 3097.341209] RTW:
....
[ 3097.341533] RTW: USB_SPEED_HIGH
[ 3097.341540] RTW: CHIP TYPE: RTL8723DU
[ 3097.341584] RTW: loadparam, Select P2P interface: iface_id:1
[ 3097.341754] RTW: Chip Version Info: CHIP_8723D_T4_1T1R_RomVer(0)
[ 3097.341765] RTW: USB NumInPipe(2), NumOutPipe(4/4)
[ 3097.341833] RTW: EEPROM type is E-FUSE
[ 3097.341995] RTW: Boot from EFUSE, Autoload OK !
[ 3097.342128] RTW: hal_EfuseSwitchToBank: Efuse switch bank to 0
[ 3097.384176] RTW: hal_ReadEFuse_WiFi: data end at address=0x86
[ 3097.384274] RTW: HW EFUSE
[ 3097.384289] RTW: 0x000: 29 81 00 7C  01 88 07 00  A0 04 EC 35  12 C0 A2 D8
......
[ 3097.386551] RTW: VID = 0x0BDA, PID = 0xD723
[ 3097.386558] RTW: Customer ID: 0x00, SubCustomer ID: 0xCD
[ 3097.386568] RTW: hal_EfuseParsePowerSavingSetting...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemoteWakeup(1)
[ 3097.386576] RTW: ### PS params=>  power_mgnt(2),usbss_enable(0) ###
[ 3097.386620] RTW: Hal_EfuseParseBTCoexistInfo_8723D: Enable BT-coex, ant_num=1
[ 3097.386636] RTW: hal_com_config_channel_plan chplan:0x20
[ 3097.390093] RTW: SetHwReg: bMacPwrCtrlOn=1
[ 3097.390153] RTW: _InitPowerOn_8723du: Normal Mode
[ 3097.390208] RTW: _InitPowerOn_8723du: SPS Mode
[ 3097.390796] RTW: rtl8723d_FirmwareDownload((null)) tmp_ps=0
[ 3097.390810] RTW: rtl8723d_FirmwareDownload fw: FW_NIC, size: 29262
[ 3097.390830] RTW: rtl8723d_FirmwareDownload: fw_ver=31 fw_subver=0000 sig=0x23d1, Month=11, Date=18, Hour=20, Minute=41
[ 3097.390838] RTW: rtl8723d_FirmwareDownload(): Shift for fw header!
[ 3097.390877] RTW: rtl8723d_FirmwareDownload by IO write!
[ 3097.404860] RTW: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00070305
[ 3097.404892] RTW: rtl8723d_FirmwareDownload: download FW count:1
[ 3097.405395] RTW: _8051Reset8723: Finish
[ 3097.423605] RTW: _FWFreeToGo: Polling FW ready OK! (412, 20ms), REG_MCUFWDL:0x000703c6
[ 3097.423632] RTW: rtl8723d_FirmwareDownload success. write_fw:1, 33ms
[ 3097.423673] RTW:  <=== rtl8723d_FirmwareDownload()
[ 3097.435068] RTW: CardDisableRTL8723du((null)): bMacPwrCtrlOn=1
...
[ 3097.441650] RTW: country_ie_env:ANY
[ 3097.441933] RTW: rtw_ndev_init(wlan0) if1 mac_addr=e0:e1:a9:3c:fd:a0
[ 3097.442310] RTW: rtw_ndev_notifier_call(wlan0) state:16
[ 3097.443406] RTW: rtw_ndev_notifier_call(wlan0) state:5
[ 3097.443520] RTW: rtw_ndev_init(p2p0) if2 mac_addr=e2:e1:a9:3c:fd:a0
..
[ 3097.743118] RTW: cfg80211_rtw_flush_pmksa(wlan0)
[ 3097.746444] RTW: rtw_android_priv_cmd: Android private cmd "BTCOEXSCAN-STOP" on wlan0
[ 3097.747062] RTW: rtw_android_priv_cmd: Android private cmd "RXFILTER-STOP" on wlan0
[ 3097.747727] RTW: rtw_android_priv_cmd: Android private cmd "RXFILTER-ADD 2" on wlan0
[ 3097.748510] RTW: rtw_android_priv_cmd: Android private cmd "RXFILTER-START" on wlan0
[ 3097.749367] RTW: rtw_android_priv_cmd: Android private cmd "RXFILTER-STOP" on wlan0
[ 3097.750637] RTW: rtw_android_priv_cmd: Android private cmd "RXFILTER-ADD 3" on wlan0
[ 3097.751178] RTW: rtw_android_priv_cmd: Android private cmd "RXFILTER-START" on wlan0
[ 3097.752455] RTW: rtw_android_priv_cmd: Android private cmd "SETSUSPENDMODE 0" on wlan0

Also I edited /rigol/shell/start_rigol_app.sh and added
Code: [Select]
### insmod ethernet PHY driver for Motorcomm - YT8512
ifconfig eth0 down
insmod /rigol/driver/motorcomm.ko
ifconfig eth0 up

> #Wifi/Bluetooth
> mount --bind /data/local/tmp/firmware /lib/firmware
> insmod /system/lib/modules/rtk_btusbew7611ulbv2.ko
> insmod /system/lib/modules/8723du.ko

# Get the Hardware version
insmod /rigol/driver/hdcode_gpio.ko
chmod 777 /dev/hdcode_gpio

So Now WiFi is starting automatically after reboot.

Any ideas what could be wrong and how to fix Bluetooth?
« Last Edit: November 14, 2024, 12:17:22 pm by Spectra »
 

Offline sonic

  • Regular Contributor
  • *
  • Posts: 67
  • Country: de
    • Homepage
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2943 on: November 14, 2024, 03:02:52 pm »
For my EW-7611ULB V2, rtk_btusbew7611ulbv2.ko is quite a bit more verbose:
Code: [Select]
rk3399_rigol:/ # mount --bind /data/local/tmp/firmware /lib/firmware
rk3399_rigol:/ # dmesg -c
...
rk3399_rigol:/ # insmod /system/lib/modules/rtk_btusbew7611ulbv2.ko
rk3399_rigol:/ # dmesg -c
[  199.989419] rtk_btusbew7611ulbv2: loading out-of-tree module taints kernel.
[  199.995549] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.523c92e.20210706-141239
[  199.995598] rtk_btcoex: rtk_btcoex_init: version: 1.2
[  199.995608] rtk_btcoex: create workqueue
[  199.995979] rtk_btcoex: alloc buffers 1792, 2432 for ev and l2
[  199.996160] rtk_btusb: btusb_probe intf->cur_altsetting->desc.bInterfaceNumber 0
[  199.996177] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[  199.996186] rtk_btusb: patch_add
[  199.996193] rtk_btusb: auto suspend is disabled
[  199.996202] rtk_btusb: pid = 0xd611
[  199.996212] rtk_btusb: patch_add: Reset gEVersion to 0xff
[  199.996254] rtk_btusb: set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
[  199.997806] rtk_btusb: btusb_probe: done
[  199.997812] rtk_btusb: btusb_open start
[  199.997826] rtk_btusb: btusb_open hdev->promisc ==0
[  199.997832] rtk_btusb: download_patch start
[  199.997837] rtk_btusb: chip type value: 0x71
[  199.997848] rtk_btusb: HCI reset.
[  200.000073] usbcore: registered new interface driver rtk_btusbew7611ulbv2
[  200.007159] rtk_btusb: read_ver_rsp->lmp_subver = 0x8723
[  200.007239] rtk_btusb: read_ver_rsp->hci_rev = 0xd
[  200.007257] rtk_btusb: patch_entry->lmp_sub = 0x8723
[  200.007271] rtk_btusb: load_firmware start
[  200.007282] rtk_btusb: lmp_version = 0x8723
[  200.007301] rtk_btusb: config filename rtl8723du_config
[  200.009440] rtk_btusb: no bdaddr file /opt/bdaddr
[  200.009484] rtk_btusb: Origin cfg len 22
[  200.009496] rtk_btusb: 55 ab 23 87 10 00 d9 00 01 0f e4 00 01 08 8d 00
[  200.009504] rtk_btusb: 01 fa 8f 00 01 bf
[  200.009518] rtk_btusb: New cfg len 22
[  200.009525] rtk_btusb: 55 ab 23 87 10 00 d9 00 01 0f e4 00 01 08 8d 00
[  200.009543] rtk_btusb: 01 fa 8f 00 01 bf
[  200.009584] rtk_btusb: fw name is  rtl8723du_fw
[  200.013139] rtk_btusb: This is not 8723a, use new patch style!
[  200.013191] rtk_btusb: rtk_get_eversion: gEVersion 255
[  200.014170] rtk_btusb: eversion->status = 0x0, eversion->version = 0x2
[  200.014345] rtk_btusb: load_firmware: New gEVersion 2
[  200.014385] rtk_btusb: rtk_get_fw_project_id: opcode 0, len 1, data 9
[  200.014402] rtk_btusb: lmp_version is 8723, project_id is 8723, match!
[  200.014416] rtk_btusb: fw_version = 0x82a8a133
[  200.014428] rtk_btusb: number_of_total_patch = 3
[  200.014442] rtk_btusb: chipID 3
[  200.014451] rtk_btusb: patch_length 0x889c
[  200.014463] rtk_btusb: start_offset 0x00004940
[  200.014476] rtk_btusb: Svn version: -1433992835
[  200.014487] rtk_btusb: Coexistence: BTCOEX_20210106-3b3b
[  200.014496] rtk_btusb: buf_len = 0x88b2
[  200.014778] rtk_btusb: fw: exists, config file: exists
[  200.014804] rtk_btusb: load_firmware done
[  200.015075] rtk_btusb: download_data start
[  200.283142] rtk_btusb: download_data done
[  200.283210] rtk_btusb: HCI reset.
[  200.293049] rtk_btusb: read_ver_rsp->lmp_subver = 0xa133
[  200.293078] rtk_btusb: read_ver_rsp->hci_rev = 0x82a8
[  200.293085] rtk_btusb: patch_entry->lmp_sub = 0x8723
[  200.293101] rtk_btusb: Rtk patch end 0
[  200.293110] rtk_btusb: btusb_open set HCI_RUNNING
[  200.293141] rtk_btcoex: Open BTCOEX
[  200.293148] rtk_btusb: btusb_open end
[  200.295109] rtk_btcoex: BTCOEX hci_rev 0x82a8
[  200.295129] rtk_btcoex: BTCOEX lmp_subver 0xa133
[  200.315138] rtk_btusb: btusb_notify: hci0 evt 3
[  200.367065] rtk_btcoex: BTCOEX hci_rev 0x82a8
[  200.367098] rtk_btcoex: BTCOEX lmp_subver 0xa133
[  200.629467] rtk_btcoex: LE connected, handle 0000, status 0x02, interval 0

hciconfig also shows it then:
Code: [Select]
rk3399_rigol:/ # hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 08:BE:AC:41:AA:2F  ACL MTU: 1021:8  SCO MTU: 255:12
        UP RUNNING
        RX bytes:1294 acl:0 sco:0 events:30 errors:0
        TX bytes:3546 acl:0 sco:0 commands:81 errors:0
        Features: 0xff 0xff 0xff 0xfa 0xdb 0xbd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'rk3399_rigol'
Can't read class of device on hci0: Connection timed out (110)

The driver might be very model specific. I got the EW-7611ULB V1 from Amazon and the V2 from B&H.
« Last Edit: November 14, 2024, 05:24:47 pm by sonic »
 

Offline Spectra

  • Newbie
  • Posts: 2
  • Country: lt
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2944 on: November 14, 2024, 08:57:37 pm »
I solved my Bluetooth issue.

For some reason my scope already had rtk_btusb driver build-in in kernel and it was staring before rtk_btusbew7611ulbv2 module was loading and taking over USB device.
Couldn't figure out what is wrong or missing in build-in rtk_btusb driver for RTL8723DU chip so I just unbind USB device from rtk_btusb and bind it to rtk_btusbew7611ulbv2 and Bluetooth started to work.
Code: [Select]
#Wifi/Bluetooth
mount --bind /data/local/tmp/firmware /lib/firmware
insmod /system/lib/modules/rtk_btusbew7611ulbv2.ko
echo '3-1:1.0' > /sys/bus/usb/drivers/rtk_btusb/unbind
echo '3-1:1.0' > /sys/bus/usb/drivers/rtk_btusbew7611ulbv2/bind
insmod /system/lib/modules/8723du.ko


This is how it looks like in dmesg:
First rtk_btusb driver is loading
Code: [Select]
[    1.231416] rtk_btusb: RTKBT_RELEASE_NAME: 20170109_TV_ANDROID_6.x
[    1.231427] rtk_btusb: Realtek Bluetooth USB driver module init, version 4.1.2
[    1.231437] rtk_btusb: Register usb char device interface for BT driver
[    1.231714] usbcore: registered new interface driver rtk_btusb
Then it binding USB device
Code: [Select]
[    1.960028] rtk_btusb: btusb_probe: usb_interface ffffffc0e1017800, bInterfaceNumber 0, idVendor 0x0bda, idProduct 0x0000
[    1.960150] rtk_btusb: get_fw_table_entry: Product id = 0xd723, fw table entry size 47
[    1.960226] rtk_btusb: firmware_info_init: Auto suspend is disabled
[    1.960249] rtk_btusb: btusb_probe: download begining...
[    1.960269] rtk_btusb: btusb_probe: download ending...
[    1.960305] rtk_btusb: btusb_probe: Check bt reset flag 0
Later I'm loading rtk_btusbew7611ulbv2 module
Code: [Select]
[    7.727053] rtk_btusbew7611ulbv2: loading out-of-tree module taints kernel.
[    7.727863] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.523c92e.20210706-141239
[    7.727874] rtk_btcoex: rtk_btcoex_init: version: 1.2
[    7.727879] rtk_btcoex: create workqueue
[    7.728194] rtk_btcoex: alloc buffers 1792, 2432 for ev and l2
[    7.728296] usbcore: registered new interface driver rtk_btusbew7611ulbv2
I unbind USB device from rtk_btusb driver
Code: [Select]
[    7.729067] rtk_btusb: btusb_disconnect: usb_interface ffffffc0e1017800, bInterfaceNumber 0
[    7.743779] rtk_btusb: btusb_close: hci running 0
[    7.743855] rtk_btusb: btusb_disconnect: usb_interface ffffffc0e1017c00, bInterfaceNumber 1
And bind it to rtk_btusbew7611ulbv2 driver
Code: [Select]
[    7.744125] rtk_btusb: btusb_probe intf->cur_altsetting->desc.bInterfaceNumber 0
[    7.744143] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[    7.744148] rtk_btusb: patch_add
[    7.744152] rtk_btusb: auto suspend is disabled
[    7.744157] rtk_btusb: pid = 0xd723
[    7.744163] rtk_btusb: patch_add: Reset gEVersion to 0xff
[    7.744174] rtk_btusb: set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
[    7.751634] rtk_btusb: btusb_open start
[    7.751648] rtk_btusb: btusb_open hdev->promisc ==0
[    7.751653] rtk_btusb: download_patch start
[    7.751658] rtk_btusb: chip type value: 0x71
[    7.751663] rtk_btusb: HCI reset.

And Bluetooth is working :)

Thanks for your help.
 
The following users thanked this post: sonic

Offline sonic

  • Regular Contributor
  • *
  • Posts: 67
  • Country: de
    • Homepage
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2945 on: November 14, 2024, 09:28:52 pm »
For some reason my scope already had rtk_btusb driver build-in in kernel
Mine too:
Code: [Select]
[    1.218477] rtk_btusb: RTKBT_RELEASE_NAME: 20170109_TV_ANDROID_6.x
[    1.218486] rtk_btusb: Realtek Bluetooth USB driver module init, version 4.1.2
[    1.218494] rtk_btusb: Register usb char device interface for BT driver
[    1.218724] usbcore: registered new interface driver rtk_btusb

Then it binding USB device
Mine doesn't.

Couldn't figure out what is wrong or missing in build-in rtk_btusb driver for RTL8723DU chip so I just unbind USB device from rtk_btusb and bind it to rtk_btusbew7611ulbv2 and Bluetooth started to work.
Strange that I don't have to unbind, but glad it works!  :)
« Last Edit: November 14, 2024, 09:31:00 pm by sonic »
 

Offline LEER333

  • Contributor
  • Posts: 21
  • Country: hk
    • www.qq.com
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2946 on: November 15, 2024, 12:57:54 am »
Can the WIFI adapter solve the problem of clock confusion?
 

Offline mrisco

  • Regular Contributor
  • *
  • Posts: 225
  • Country: pe
    • Github Profile
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2947 on: November 15, 2024, 02:45:20 am »
Can the WIFI adapter solve the problem of clock confusion?

The scope connects to the time servers via Ethernet cable or Wifi, but the Chinese region is fixed in the startup script, so you need first change to your region in that script.

Offline norbert.kiszka

  • Super Contributor
  • ***
  • Posts: 1049
  • Country: pl
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2948 on: November 15, 2024, 01:15:28 pm »

Offline metawops

  • Newbie
  • Posts: 5
  • Country: de
Re: Hacking the Rigol DHO800/900 Scope
« Reply #2949 on: November 17, 2024, 01:48:50 pm »
Folks ... please don't throw stones on me ... it's impossible to read this whole thread or to search in it for the missing needle ...
I upgraded my DHO804 to the latest firmware 1.02 and now WiFi doesn't work anymore and I can't switch the switch back on in Android settings. It always switches back to off immediately. :-(
What can I do? My little WiFi dongle worked fine with the firmware before.
Any pointers to solutions (for entry- to mid-level nerds) much appreciated!
Thanks so much and have a great Sunday everyone!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf