Go to advanced search

by Sergiov
Tue May 24, 2016 10:37 am
Forum: Beginners
Topic: How to Stop Cloning the Raspberry pi Micro SD card?
Replies: 16
Views: 6638

Re: How to Stop Cloning the Raspberry pi Micro SD card?

The way I'd do it is by buying a VC1 codec from the foundation for £1.20. That's an crypto signed token tied to the serial (the foundation owns the private key) and you have to use the VC mailbox interface to verify it. The public key is embedded in the firmware. Hi Dougie Lawson, Seems like your e...
by Sergiov
Tue May 24, 2016 10:35 am
Forum: Beginners
Topic: How to Stop Cloning the Raspberry pi Micro SD card?
Replies: 16
Views: 6638

Re: How to Stop Cloning the Raspberry pi Micro SD card?

B.Goode wrote:
Sergiov wrote:Hi guys, I would like to know how can I protect from cloning as well. Can you send me the steps to follow.
There is some good advice in this forum thread: viewtopic.php?f=91&t=105725#p729396

Did you just link me to the same page where I posted.
by Sergiov
Tue May 24, 2016 10:25 am
Forum: Beginners
Topic: How to Stop Cloning the Raspberry pi Micro SD card?
Replies: 16
Views: 6638

Re: How to Stop Cloning the Raspberry pi Micro SD card?

aTao wrote:Or a USB security dongle.

How to use the dongle for a c program and protect it from cloning.
by Sergiov
Tue May 24, 2016 10:18 am
Forum: Beginners
Topic: How to Stop Cloning the Raspberry pi Micro SD card?
Replies: 16
Views: 6638

Re: How to Stop Cloning the Raspberry pi Micro SD card?

Hi guys, I would like to know how can I protect from cloning as well. Can you send me the steps to follow.
by Sergiov
Tue Jan 26, 2016 11:12 am
Forum: Networking and servers
Topic: USB over IP for Raspberry Pi
Replies: 75
Views: 72817

Re: USB over IP for Raspberry Pi

Hi developers,

I have a question do you have experience using Hasp for raspberry pi 2.

Thanks for your time.
Sergiov
by Sergiov
Mon Aug 10, 2015 8:30 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

The returned data is what the device sent to the Pi. SPI works by transferring bits in parallel. The Pi sends a bit to the device, in return the device sends a bit to the Pi. In the case of most devices an 8-bit byte is the unit of transfer. The script I wrote was writing 1, 2, 3 to the devices. Th...
by Sergiov
Mon Aug 10, 2015 8:22 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

Thanks again the spidev_test.c does not work. spidev_test.c: In function ‘transfer’: spidev_test.c:116:13: error: ‘SPI_TX_QUAD’ undeclared (first use in this function) spidev_test.c:116:13: note: each undeclared identifier is reported only once for each function it appears in spidev_test.c:117:5: e...
by Sergiov
Mon Aug 10, 2015 7:59 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

My mistake. I didn't realise I wasn't returning a value from the functions. Update the functions as follows. def xfer_adc(handle, device, data): # Set slave select line pi.write(ADC_SS[device], 0) # Select device result = pi.spi_xfer(handle, data) pi.write(ADC_SS[device], 1) # Deselect device retur...
by Sergiov
Wed Aug 05, 2015 9:59 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

My mistake. I didn't realise I wasn't returning a value from the functions. Update the functions as follows. def xfer_adc(handle, device, data): # Set slave select line pi.write(ADC_SS[device], 0) # Select device result = pi.spi_xfer(handle, data) pi.write(ADC_SS[device], 1) # Deselect device retur...
by Sergiov
Wed Aug 05, 2015 9:16 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

That looks much better. I presume the CLOCK line is irrelevant, it has nothing to do with the SPI communication. The only concern is the very short edges you can see which appear as spikes in the trace. They shouldn't be there. The AD1 has responded to the (nonsense) series of bytes 1, 2, 3. Perhap...
by Sergiov
Tue Aug 04, 2015 3:42 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

Perhaps post a photo of your set up. which command I use for this. lsmod? Thanks for your fast replies. A camera. I mean a photograph of your SPI devices and the connections you have made to the Raspberry Pi. I made a mistake on the pin of SCLK. It looks different what do you think. joan.png
by Sergiov
Mon Aug 03, 2015 2:57 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

joan wrote:Perhaps post a photo of your set up.
which command I use for this. lsmod? Thanks for your fast replies.
by Sergiov
Mon Aug 03, 2015 2:18 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

joan wrote:If that's the clock signal there is something seriously wrong with your set up. Look at SCLK on the image I posted.

The SCLK, slave select, and MOSI should look similar to the following.
sergiov_2.png
Yes I saw that, what should I do.
by Sergiov
Mon Aug 03, 2015 1:44 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

joan wrote:That's better but you still don't have the SPI clock. The SPI clock is gpio11 (pin 23). That is the clock which should be connected to all your SPI devices.
Is the one with the name CLK is connected.
by Sergiov
Mon Aug 03, 2015 12:04 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

joan wrote:You need to add the clock line to your logic analyser. The clock is needed to make sense of the signals. I do not understand why cs_da2 is toggling.

Sure I did a mistake on the names I recheck, it is as follows.
joan.png
Analizer.
joan.png (49.74 KiB) Viewed 11878 times
by Sergiov
Mon Aug 03, 2015 9:22 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

I'd start off trying with Python to see if you can actually talk to the devices. The main SPI only has two slave selects so you'll need to bit bang the four slave selects you are using. #!/usr/bin/env python import time import pigpio NO_SS=(7<<5) # Tell the SPI hardware not to set slave selects. ""...
by Sergiov
Sun Aug 02, 2015 10:45 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

You mention a DAC and an ADC. Are they both connected to the Pi via SPI? How have you connected MISO, MOSI, SCLK, CE0, and CE1? What commands and data are you reading and writing from the DAC? What commands and data are you reading and writing from the ADC? 2 x ADS8320 clk 7 miso 6 cs_ad 5 2 x AD56...
by Sergiov
Fri Jul 31, 2015 3:21 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

https://www.kernel.org/doc/Documentation/spi/spidev_fdx.c https://www.kernel.org/doc/Documentation/spi/spidev_test.c Thanks for the fast reply and for the examples I will work with it during the weekend. Thanks again the spidev_test.c does not work. spidev_test.c: In function ‘transfer’: spidev_tes...
by Sergiov
Fri Jul 31, 2015 2:40 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming


Thanks for the fast reply and for the examples I will work with it during the weekend.
by Sergiov
Fri Jul 31, 2015 1:36 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

Thanks again for your fast replies, I was using the library #include <wiringPi.h> with the PIN's 11 10 12 13 14 1 3 4, my pins for the cs_da 11, cs_ad 10, dout 12, din 13, clock 14, timelag 1 and another more 1. In addition I used an interrupt as wiringPiISR (4, INT_EDGE_RISING, &interrupt); where 4...
by Sergiov
Mon Jul 20, 2015 3:33 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

Thanks joan for your soon reply. Can you add an example or tutorial with the information of how to use the libraries bcm2835 or how to use the standard SPI driver for C programming. Google raspberry pi spi and you will find plenty of examples. Indeed I did that so far I found plenty for phyton, C++...
by Sergiov
Mon Jul 20, 2015 12:16 pm
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

Re: SPI with C programming

Thanks joan for your soon reply.
Can you add an example or tutorial with the information of how to use the libraries bcm2835 or how to use the standard SPI driver for C programming.
by Sergiov
Mon Jul 20, 2015 10:51 am
Forum: C/C++
Topic: SPI with C programming
Replies: 32
Views: 14105

SPI with C programming

I avoided to use SPI by creating another *.h file who allowed me to initialize, write and read using a interrupt.h that I made; without the use of the SPI. The problem is that the voltage that I write with it sometimes it does not synchronize with my interrupt (wiringPiISR (4, INT_EDGE_RISING, &inte...

Go to advanced search