Skip to content

Commit

Permalink
adding object files unpacked from the archives in esp_iot_sdk_v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieran Simkin committed May 22, 2016
1 parent f5ec0bc commit 051868d
Show file tree
Hide file tree
Showing 7 changed files with 502 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
@@ -1,2 +1,14 @@
# esp8266-freedom
I put back the Wifi packet freedom that was taken away after "esp_iot_sdk_v1.3.0"
I put back the Wifi packet freedom that was taken away after "esp_iot_sdk_v1.3.0"
__You can't take the sky from me..__

I've been reading the [Espressif Non-OS IoT SDK Guide](http://bbs.espressif.com/download/file.php?id=1366) and realised there's quite a lot of functionality in there that's not exposed to the world.

Furthermore, after a bit of digging around in the 802.11 stack I realised they've literally reduced the functionality offered by wifi_send_pkt_freedom()!

The reason I was looking to do this is because I'm building an ESP8266 mesh networking framework, and I was hoping to be able to implement 802.11s MAC frames (which requires a slightly different packet structure to the normal 802.11a/b/g standards). Ultimately the conclusion of that endeavour was that it's probably possible to send 802.11s MAC frames with wifi_send_pkt_freedom(), but the underlying hardware doesn't understand the differing packet format, which would probably cause it to ignore them all. I thought I might be able to circumvent this using the (vaguely hidden) promiscuous mode, but it turns out that only returns the paacket header information and is limited to 1

I don't like it when people take away freedoms, so I've put them back. I used the binary tools in [esp-open-sdk](https://github.com/pfalcon/esp-open-sdk) to pick out the original version of the wifi_send_pkt_freedom(), plus I've exposed some of the features that aren't normally available in the ESP8266Wifi driver for Arduino.

In fact, I'm going to expose most of the Non-OS SDK, Espressif have released it, these files are straight out of version 1.3.0 of their IoT SDK.

Binary file added eagle_lwip_if_FREEDOM.o
Binary file not shown.
Binary file added ets_timer_FREEDOM.o
Binary file not shown.
39 changes: 39 additions & 0 deletions spi_flash_FREEDOM.h
@@ -0,0 +1,39 @@
/*
* copyright (c) Espressif System 2010
*
*/

#ifndef SPI_FLASH_H
#define SPI_FLASH_H

typedef enum {
SPI_FLASH_RESULT_OK,
SPI_FLASH_RESULT_ERR,
SPI_FLASH_RESULT_TIMEOUT
} SpiFlashOpResult;

typedef struct{
uint32 deviceId;
uint32 chip_size; // chip size in byte
uint32 block_size;
uint32 sector_size;
uint32 page_size;
uint32 status_mask;
} SpiFlashChip;

#define SPI_FLASH_SEC_SIZE 4096

uint32 spi_flash_get_id(void);
SpiFlashOpResult spi_flash_erase_sector(uint16 sec);
SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size);
SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size);

typedef SpiFlashOpResult (* user_spi_flash_read)(
SpiFlashChip *spi,
uint32 src_addr,
uint32 *des_addr,
uint32 size);

void spi_flash_set_read_func(user_spi_flash_read read);

#endif
Binary file added spi_flash_FREEDOM.o
Binary file not shown.

0 comments on commit 051868d

Please sign in to comment.