Using the command "dwm_usr_data_write"

Hi, im trying to send a “HELLO” and see it in the MQTT, but i cant, can anyone help me ?
This is what im doing:

This is the example from the API Guide: (Page 65)

Example:
uint8_t len, data[DWM_USR_DATA_LEN_MAX];
len = DWM_USR_DATA_LEN_MAX;
dwm_usr_data_write(data, len, false);

EDIT: DWM_USR_DATA_LEN_MAX = 34

I though that : "if im seeing a lots of A’s and the array has a lots of 0’s, it’s like add 65 in ASCII " but is not the case i think.

Hi,

The data is encoded in base 64 and must be converted in order to decode it.

The following python code is q quick example:

from binascii import hexlify, a2b_base64, unhexlify,
test = 'SEVMTE8=='
str_hex = hexlify(a2b_base64(test))
print(unhexlify(str_hex))

Good to see you managed to get that far anyway. Any issue with the gateway deployment guide ?

Thank you,
Yves

Everything works fine, i didnt have any trouble with the Gateway configuration and the example’s projects for SEGGER, but i saw some little errors in the PDF (text errors), they are:

  1. Figure 15 (page 20) Reference error
  2. Above the Figure 17 (page 22) Reference error
  3. I think that this is not a error (i dont know too much about connections) but i couldn’t conect the RPi by Wi-Fi with the Figure of Section 4.2. I used this config and its working! :

asdasd

Thank you so much for your work !

Hi Franco,

  1. Please check first if the Wifi interface is capable of communication:
    $ sudo ifconfig wlan0 up
    $ sudo iwlist scan —> you should see a list of networks available, among that there should be a network with SSID “led”. The SSID must match the one in the wpa_supplicant.conf

  2. Besides that your /etc/wpa_supplicant/wpa_supplicant.conf looks OK.

  3. Make sure the wlan0 is configured to auto configuration in /etc/network/interfaces. There should be
    auto wlan0
    iface wlan0 inet dhcp
    wireless-essid “led”
    wireless-mode managed

  4. Then restart your network interface (it will restart also your wired network if you are connected e.g. via SSH). Alternatively you can reboot you Raspberry.
    $ sudo /etc/init.d/networking restart

Cheers,
TDK

Hi leapslabs, the internet is working !! i was trying to do a little list of “possible issue” that i saw in the Guide !
Thank you for your time !

Best
FC

1 Like