Compile 'examples' in the ambd_sdk

Hello All,

Very new to the ambd_sdk enviornment
Was able to get the lp / KM0 firmware files to compile no problem.
Question: How do i compile some the ‘examples’ files such as wlan_repeater?
I dont see where the makefile is in the root folder for options to compile these?
I did read through the “Getting started” PDF and it does explain the setup for compiling the actual firmware files,but could not find any info on compiling example files.

Thank You

@brcisna
You need to change #define CONFIG_EXAMPLE_WLAN_REPEATER 0 to
#define CONFIG_EXAMPLE_WLAN_REPEATER 1, please check the definition of each example source in ambd_sdk-master\project\realtek_amebaD_va0_example\inc\inc_hp\platform_opts.h

1 Like

Hi
ruanjanc

Thank You for this information! I done as you suggested. Also looking at the readme in the wlan_repeater directory it also said to do ‘bridge 1’ ,so i changed that as well.
I went to the /ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp
and done a ‘make all’
It compiled successfully!
BUT,i do not see where the actual wlan-repeater bin file is? I was assuming this would be generated ,and i could download this file to the BW/rtlduino via the image tool?
I did try and read the ‘Getting Started’ pdf for ambd_sdk but am very green on seeing the big picture on this ,it goes without saying.
Thanks

1 Like

Hi brcisna,

If compilation and image generation is successful, you should be able to find the image binaries in

\project\realtek_amebaD_va0_example\GCC-RELEASE\project_lp\asdk\image
\project\realtek_amebaD_va0_example\GCC-RELEASE\project_hp\asdk\image

you should use the image tool and upload these binaries:

  • km0_boot_all.bin
  • km4_boot_all.bin
  • km0_km4_image2.bin

you can refer to AN0400 Ameba-D Application Note Chapter 8 on how to use the ImageTool to upload binaries

Hi wyy

Thank You for this great information,especially for someone that doesn’t have a clue.
OK, I do see the three binaries you mentioned.
Previously i built these without the wlan_repeater changed from 0 to 1. and was able to upload to rtlduino
What I dont understand is,if the wlan_repeater binary is burned into these images how do i modify the rtlduino,after images uploaded to configure as repeater to an existing wifi?
FYI I have read through the 'Getting started with ambd_sdk PDF but it really only mentions procedure to build the binary firmware,you are mentioning,& am sure I am not seeing the other details in the PDF instructions.

Thank You

for repeater configuration, it is probably clearer if you look at the code in example_wlan_repeater.c.

The SSID and password for the broadcasted AP is configured in the code, while the SSID and password of the AP that the repeater connects to should be configured using AT commands.

Hi wyy,
Thank you for this information. Am getting very close on my project ,with your help!
I need to mention i am wanting this rtlduino to connection to an drone wifi5.8ghz to hopefully increase FPV, Just mentioning this to make a picture of my setup.

Ideally,what I would like to do is when the rtlduino powers up,it automatically connects to the drone’s SSID then I connect to the rtlduino ( with external antenna’s with smartphone with the drone’s app running on the phone).
I misunderstood,and for the SSIP put in the drone’s SSID in wlan_repeater c file.
I did get the Linux version of the amebad_image_tool to work very seamlessly and got away from Windows,with the help of looking at the BW16 "Troublesooting matrix!. In other words i wound up using ‘Mothod 3’ in the tutorial.
When I configed the wlan_repater c file with blank password the repater started and then stopped due to blank password.
Question. Is there any way i can add code to that C file to automatically connect to the drone’s SSID which is passwordless?
And also,possibly get the led light to blink when the rtlduino is successfully conncted to the dro

Will attach a couple of console outputs screenshots
rtlduino_wlan_repeater_error
rtlduino_wlan_repeater_tryingtoconnect
of the rtlduino running.
Thank You

Hi again wyy
After spending much time with AT commands I was able to get this rtlduino to connect to drone.
I didnt have a clue what AT commands worked with this config,finally realized all I has to do was type ‘help’,duh
Am showing my stupidity,Did not realize the AT commands stay stored after a power off,of the rtlduino,
Now to get the duino mounted on drone with external dipole antennas see if i gain any more distnace,
Thanks again

1 Like

Great work! Hope your project goes well~ Let us know how it works for you :slight_smile:

xidameng

How would I go about modifying the C file of the wlan_repeater so that my AP would be open/ no password? Also I can connect fine to my home network AP that is passworded with the AT commands, with the rtlduino, but cannot actually connect to the drone which has no password due to the fact in the AT commands for wlan_repeater is specified in the wlan_repeater "connnect to AEP access point’.
In other words if I leave the ATW1=‘password’ blank it will not continue,to allow to connect
Hope I am being clear enough with explanation.

Thank You

There are WiFi APIs for this job, just read this example code from line 294 and you will find all the API you need:

Hi xidameng

Once again,thank you for supplying exact location what to look for. Looking at this I have no idea how to implement this into a resulting bin file to upload to the BW16.
The wlan_repeater bin is exactly what i want ,other than.

  1. I have to be able to connect to an open AP,my drone’s AP SSID…— the current wlan_repeater is always looking for keys AEP to come to it ,hence connection fails
  2. I would as soon have the ‘repeater’ itself be open,so can easy,quickly connect to this with the smartphone, with the drone’s APP on it… — the current wlan_repeater does not allow this either as it stops after starting ‘not have a 64 bit/character password’.

Would be willing to pay someone to put this together,as i am not smart enough to tie it all together I guess.

Thanks again xidameng

Hi brcisna,

refer to the following code from the example_wlan_repeater.c

	/*********************************************************************************
	*	1-3. Start AP
	*********************************************************************************/
	printf("\n\r[WLAN_REPEATER_EXAMPLE] Start AP\n");
	char *ssid = "AmebaRPT";
	char *password = "12345678";	// NULL for RTW_SECURITY_OPEN
	int channel = 6;

	if(wifi_start_ap(ssid, (password)?RTW_SECURITY_WPA2_AES_PSK:RTW_SECURITY_OPEN, password, strlen(ssid), (password)?strlen(password):0, channel) < 0) {
		printf("\n\r[WLAN_REPEATER_EXAMPLE] ERROR: wifi_start_ap failed\n");
		return;
	}

to have a open AP, use NULL for the password field

to connect to an open wireless network, you can use ATW0 to set the SSID, and ATWC to connect to the network, without using ATW1 to set the WiFi password

1 Like

HI WYY,

Thank You for pointing this reference and explaining the AT commands. Am not at all familiar with AT commands for this,I only knew AT commands when i entered ‘help’ in the terminal,which in most cases would work,and all you need,if you have a ‘passworded’ wifi AP. I learned a little more about the BW16 here ! :slight_smile:
I thought I tried using a blank password,one time, in other words between the " " , i left it blank,yes?
Thanks again

Avaliable AT commands can be seen at ambd_sdk/AN0025 Realtek at command.pdf at master · ambiot/ambd_sdk · GitHub

to use a open network for the AP, the code should be char *password = NULL;

thank You for explanation wyy.

Hi guys! I can’t open this PDF file :frowning: Can you recommend something another?

1 Like

@OliverMitchell
Which PDF file?

If you can’t view them on Github, you can download and view them offline