logo elektroda
logo elektroda
X
logo elektroda

Adding BLE Functionalities to OpenBK7231T Code for WBL3 Module & PWM Smart Light Control

manivalaguru 1446 11
ADVERTISEMENT
  • #1 19969749
    manivalaguru
    Level 3  
    hello,
    im using wbl3 module with pwm driver for smart light i have used your openbk7231T code and controlled light brightness through my mqtt broker now i want to add ble functionalities to the code so that i can configure the ssid password for wifi and username password for mqtt can you please help me with this??
    note: i have referred your my_mqtt_demo code for ble but ble stack seems to be initiated somewhere other than main i want to init the ble in main and change the advertise packet to the ibeacon format

    thanks and regards
    manikandan v
  • ADVERTISEMENT
  • #2 19970953
    p.kaczmarek2
    Moderator Smart Home
    Hello, it's nice to see another person using OpenBK7231T

    Regarding your question... Right now all credentials (WiFi SSID, password, MQTT server information, etc) are configured by the Web panel. Open web browser (while being in the same network as device) and enter device IP address. First configuration is done by temporary open access point created by Bekken device (device has 192.168.4.1 IP, you might have to set manually your computer IP to 192.168.4.15 or something if DHCP doesn't work).

    I know there are BLE (Bluetooth) functionalities in Bekken SDKs, but they are not used by me right now.
    Here is the BLE driver header:
    https://github.com/openshwprojects/OpenBK7231.../bk7231t/bk7231t_os/beken378/driver/ble/ble.h

    What are you exactly trying to achieve? If you're a developer and know C, then you're welcome to help us with integrating BLE into OpenBK7231T, but in current state, we are not using BLE at all. WiFi only.

    Tell me why do you need BLE for and I will try to help get this running.
    Helpful post? Buy me a coffee.
  • #3 19973956
    manivalaguru
    Level 3  
    hello,
    thanks for your reply

    we are having 100's of ble watches which will advertise in certain intervals. I want this light to scan our watches. We are differentiating our watches with serial numbers which will be included in the watch raw advertising packet, so the light should scan our devices and then advertise which device it scanned by sending a serial number in its raw advertising packet.

    my overall application
    ble->scanning and advertising(scan our devices and advertise with our serial number)
    mqtt->to change the light color and brightness
    flash memory->to store the ssid, pswrd, certs etc
    ota->to flash over the air

    if i implement the ble, i can also change the ssid and pwrd of mqtt and wifi in ble connected mode

    can you help me with this?

    note: i have attached our advertising format in photo
  • #4 19982820
    manivalaguru
    Level 3  
    @p.kaczmarek2 can you help me with this?

    thanks and regards
    manikandan v
  • ADVERTISEMENT
  • #5 19982821
    p.kaczmarek2
    Moderator Smart Home
    Can you provide any more of documentation of what are you trying to do? Also what kind of watches, etc? Do they have a known protocol?

    I don't have any such watches so it would be hard for me to test the code during development.

    I might try preparing a simple BLE demo soon but that's far from what you require.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #6 19982832
    manivalaguru
    Level 3  
    @p.kaczmarek2 we are using nrf ble controllers in watches..for now only adding ble advertising to your code is enough for me can you tell me how I can start that?
    thanks and regards
    manikandan v
  • #7 19982842
    p.kaczmarek2
    Moderator Smart Home
    Well, here is the BLE driver interface:
    https://github.com/tuya/tuya-iotos-embeded-sd.../bk7231t/bk7231t_os/beken378/driver/ble/ble.h
    I am not sure if it's possible to use both WiFi and BLE at once.
    Here is something you might find interesting:
    https://github.com/tuya/tuya-iotos-embeded-sd...78/driver/ble/ble_pub/modules/rwip/src/rwip.c
    How much C experience do you have?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #9 19993735
    manivalaguru
    Level 3  
    @p.kaczmarek2 have you checked?
  • #10 19996448
    p.kaczmarek2
    Moderator Smart Home
    I've seen this, but at this moment I am busy with the features requested by project supporters and donators and everyone is focusing on WiFi features. I will look into Bluetooth a little later. Maybe you could at least try to get a basic BT running? You have access to whole SDK.
    Helpful post? Buy me a coffee.
  • #11 19998251
    manivalaguru
    Level 3  
    @p.kaczmarek2 I have done both advertising and sending data but right now I can only send a maximum of 20 characters been trying to increase the MTU size and then send notify messages from device to mobile if I can achieve these both my requirement is over
  • #12 19998591
    p.kaczmarek2
    Moderator Smart Home
    Where is your codebase, I would need to see it in order to try helping.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around integrating Bluetooth Low Energy (BLE) functionalities into the OpenBK7231T code for the WBL3 module, which is currently used for controlling smart light brightness via MQTT. The user seeks assistance in modifying the code to enable BLE scanning and advertising, specifically to detect BLE watches and transmit their serial numbers. The conversation includes references to existing BLE drivers and SDKs, with the user expressing a need to store WiFi and MQTT credentials in flash memory and implement Over-The-Air (OTA) updates. The responses highlight the challenges of using both WiFi and BLE simultaneously and the need for further documentation and code sharing to facilitate development.
Summary generated by the language model.
ADVERTISEMENT