0

I am working on Contiki's cc2530 port (customizing for my custom radio). I do not unserstand how can i make SLIP work with SPI? I understand that SLIP is similar to UART (it is UART without parity, what does this mean?), but how can i use it with SPI?

user260994
  • 155
  • 7

1 Answers1

2

SLIP is a protocol for conveying IP traffic over a serial line; it sits one layer above UART, SPI, etc, in the OSI network stack.

SLIP over SPI should be largely the same as SLIP over UART, except for the need to specify who is sending and who is receiving, and potentially a way for the slave to signal when data is available. Your part's datasheet should specify how to do this.

Edit: However, it looks like you might be talking about something called 'slip-radio', in which case you're not sending SLIP over SPI: slip-radio talks the cc2530's native protocol over SPI and converts it to SLIP to communicate with your host PC.

Nick Johnson
  • 7,739
  • 3
  • 28
  • 44
  • Thanks a lot, but what do you mean by "slip-radio talks the cc2530's native protocol over SPI"? – user260994 Jun 29 '15 at 16:52
  • 1
    slip-radio has code that interfaces with the cc2530 using the protocol documented in its datasheet, and translates between that and SLIP over the interface with the computer. – Nick Johnson Jun 29 '15 at 18:26
  • Okay, i am confused(totally), are there two slips? I understand what you are saying is slip-radio uses SLIP to interface with computer? What i want the cc2530 board to do is to remove all the protocol headers and transmit the recived data (from rf) to another board via UART/SPI, it seems contiki uses slip to do that, though i did not understand the code in this [link](https://github.com/kabirbansod/Contiki-lpcopen/blob/master/Contiki-open/core/dev/slip.c#L319). Please correct me if i am wrong. – user260994 Jun 29 '15 at 18:53
  • 1
    SLIP is a protocol for sending IP packets over a serial connection. slip-radio is a program that creates a SLIP interface to a device such as the cc2530. That is SLIP handling code, but I'm not sure how it relates to SPI. – Nick Johnson Jun 29 '15 at 19:58