Hi,
I’m currently using a Raptor with some serial modules (according to the layout attached)
WiFi RS21 Module
Music Module
SerCam Module
It seems that there’s a conflict between those devices because SerCam keeps throwing me an error which is coming from here :
data, int offset, int count)
{
do
{
int num = _serialPort.Read(data, offset, count);
offset += num;
count -= num;
if (num == 0)
{
_serialPort.DiscardInBuffer();
break;
}
Thread.Sleep(1);
}
while (count > 0);
if (count != 0) // <-- here
throw new Exception(); // <-- here
}
Even, if I try to comment these two lines, the problem is in ReadFrameBuffer which tries to analyze the image (0xFFD8 at the begining and 0xFFD9 at the end) and fails.
This can’t be “serial” being swamped. The SPI connection is what is used for the WiFi and the Music module, not a “serial” connection (U or K socket) like the camera
Have you tried to just create a Sercam module project and capture images that you don’t get the same error?
Hi,
I’m back with the same problem, this time on a Spider kit
The setup is quite simple :
-Wifi on 6 or 9
-Sercam on 4,8 or 11
-Multicolor LED on 14
(I’ve tried every combination for Wifi and Sercam)
[quote]A first chance exception of type ‘System.Exception’ occurred in GTM.GHIElectronics.SerialCameraL1.dll
#### Exception System.Exception - 0x00000000 (7) ####
#### Message:
#### Gadgeteer.Modules.GHIElectronics.SerialCameraL1::ReadBytes [IP: 002f] ####
#### Gadgeteer.Modules.GHIElectronics.SerialCameraL1::ReadFrameBuffer [IP: 006b] ####
#### Gadgeteer.Modules.GHIElectronics.SerialCameraL1::UpdateStreaming [IP: 003a] ####
A first chance exception of type ‘System.Exception’ occurred in GTM.GHIElectronics.SerialCameraL1.dll[/quote]
Sounds good that you fixed it! Could you explain the fix for this in more detail? And in what situations it actually occurs. We are having a problem where it seems that the serial communications with wifi are interrupted by a second serial communication device. I thought that it might be related to this issue.
“mabye later” I’m assuming that a fix for G120 is coming as well?
We added a fifo buffer so data from serial won’t be lost on G400.
I just checked on G120, there is a fifo already, but it may not big enough while accessing network.
@ Dat - That sounds interesting. We are returning a jquery page. The application also has a RFID serial reader (not the ghi module) that is a serial device. When polling the webpage over WIFI, and RFID happends at the same time, messages can get cut.
@ Gus - We have tested 115200 and 9600, no difference. The size of the jquery string can vary alot. It does not seem to happend only when large pages are sent, but when the wifi communication and RFID communication happend at the same time.
I was asking how many bytes are sent from the reader on the serial port. Anyway, this thread includes the music module and things are completely different if this is the case. This is what I suggest, use the latest SDK (to be announced today) and then start a new thread with details about your own project and components are you using.