7697 raw send

Hello,

I try to send raw wifi data using wifi_connection_send_raw_packet but it does not work… (raw rx work)

Is there anything special to do ?



There is my code:
[code]
uint8_t packet[] =
{
0x08, 0x01, //Frame control
0x00, 0x00, //Duration (overided by driver)
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, //Dest MAC
0x00, 0x42, 0xB0, 0x01, 0x00, 0x01, //Src MAC
0x00, 0x42, 0xB0, 0x01, 0x00, 0x01, //BSS ID (.aka Src MAC)
0x10, 0x86, //Seq id
0x52, 0x65, 0x6E, 0x73, 0x65, 0x69, 0x67, 0x6E, //Payload
0x65, 0x2D, 0x74, 0x6F, 0x69, 0x20, 0x73, 0x75,
0x72, 0x20, 0x6C, 0x65, 0x73, 0x20, 0x70, 0x61,
0x6E, 0x73, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x73,
0x2C, 0x20, 0x6C, 0x65, 0x73, 0x20, 0x70, 0x6F
};

//Setup
init_global_connsys();

wifi_config_set_opmode(WIFI_MODE_MONITOR);
wifi_config_set_radio(1);

wifi_config_set_wireless_mode(WIFI_PORT_STA, WIFI_PHY_11N_2_4G );
wifi_config_set_channel(WIFI_PORT_STA, 9);

wifi_config_set_bandwidth(WIFI_PORT_STA, WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ);

//Loop
if (wifi_connection_send_raw_packet(packet, sizeof(packet)) < 0)
Serial.println(“Fail send !”);
[/code]

Thanks :slight_smile: