zephyriot / zep-jira14

0 stars 0 forks source link

Driver for the ENC28J60 ethernet device #253

Closed nashif closed 8 years ago

nashif commented 8 years ago

Reported by Anas Nashif:

For network stack development and networking features in general on boards without any connectivity or when setup of wireless connectivity is a lot of overhead, an ethernet driver would help.

This board is very popular and can be attached using SPI.

Details: Small breakout board for the PIC Microchip ENC28J60. Contains all the necessary hardware to implement an Ethernet interface including the isolation transformer and LINK/STATUS LEDs. SPI interface makes this one of the easiest 10Base-T ICs yet! 3.3V with 8KB buffer.

Link: https://www.sparkfun.com/products/765 (Can also be purchased from other locations)

Datasheet: https://www.olimex.com/Products/Modules/Ethernet/ENC28J60-H/resources/ENC28J60-H.pdf

(Imported from Jira ZEP-291)

nashif commented 8 years ago

by Juan Manuel Cruz Alcaraz:

http://www.scidyne.com/ftp/manf_info/39662a.pdf

nashif commented 8 years ago

by Mark Linkmeyer:

In code review. Merge by RC2.

nashif commented 8 years ago

by Lei Liu:

Juan Manuel Cruz Alcaraz I'm trying to verify this story by using matt publish sample code on MA. But never successfully connect. Steps:

  1. cd samples/net/paho_mqtt_clients/publisher
  2. set config as below {code:title=config|borderStyle=solid} CONFIG_STDOUT_CONSOLE=y CONFIG_NETWORKING=y CONFIG_ETHERNET=y CONFIG_ETH_DW=y CONFIG_ARC_INIT=n CONFIG_SPI=y CONFIG_ETH_ENC28J60=y CONFIG_ETH_DW=n CONFIG_ETH_ENC28J60_0=y

    CONFIG_ETH_ENC28J60_0_GPIO_PIN=25

    CONFIG_ETH_ENC28J60_0_SLAVE=2

    CONFIG_ETH_ENC28J60_0_MAC3=0x2D CONFIG_ETH_ENC28J60_0_MAC4=0x30 CONFIG_ETH_ENC28J60_0_MAC5=0x31

CONFIG_NANO_TIMEOUTS=y CONFIG_NETWORKING_WITH_TCP=y CONFIG_NETWORKING_WITH_IPV4=y CONFIG_NETWORKING_IPV6_NO_ND=y

CONFIG_IP_BUF_RX_SIZE=4 CONFIG_IP_BUF_TX_SIZE=4

Uncomment the following variables for debugging

CONFIG_NETWORKING_WITH_LOGGING=y

CONFIG_NETWORK_IP_STACK_DEBUG_NET_BUF=y

CONFIG_NET_BUF_DEBUG=y

Shell APP config.

CONFIG_CONSOLE_HANDLER=y CONFIG_CONSOLE_HANDLER_SHELL=y CONFIG_PRINTK=y

CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_LINE_CTRL=y CONFIG_MINIMAL_LIBC_EXTENDED=y CONFIG_CONSOLE_HANDLER=y CONFIG_CONSOLE_HANDLER_SHELL=y

CONFIG_MINIMAL_LIBC_EXTENDED is required for atoi()

CONFIG_MINIMAL_LIBC_EXTENDED=y


5. make pristine; make BOARD=quark_se_devboard
6. Connect ENC28J60 with MA.
7. From a terminal, run the gateway:  mosquitto -v
8. make flash.

Did I miss anything?
nashif commented 8 years ago

by Mark Linkmeyer:

Sorry Lei Liu , I didn't see your comment 4 days ago. It looks like Jira didn't accept my name in the comment so I didn't get an email. I'm not the right person to provide the patch link anyway. :-) Juan Manuel Cruz Alcaraz would be the right person since he's the one who resolved it. I see you sent him a follow-up comment for his help. Let me know if you need my help.

nashif commented 8 years ago

by Lei Liu:

Successfully capture data by using wireshark. Zephyr version 1.5.0-rc2. So close it.