Hi Andras,
I dig in the setup code. I was surprised, I expected to find initialisation for port 0 as link to GUI. What I find is the following code (line582):
Code: Select all
void setup() {
#if !defined(GPS_PROMINI)
SerialOpen(0,SERIAL0_COM_SPEED);
#if defined(PROMICRO)
SerialOpen(1,SERIAL1_COM_SPEED);
#endif
#if defined(MEGA)
SerialOpen(1,SERIAL1_COM_SPEED);
SerialOpen(2,SERIAL2_COM_SPEED);
SerialOpen(3,SERIAL3_COM_SPEED);
#endif
#endif
Fo a Mega board which is my case, all ports except 0 are open.
A little bit further, I find that piece of code (line 682):
Code: Select all
#if defined(GPS_SERIAL)
GPS_SerialInit();
for(uint8_t j=0;j<=5;j++){
GPS_NewData();
LEDPIN_ON
delay(20);
LEDPIN_OFF
delay(80);
}
if(!GPS_Present){
SerialEnd(GPS_SERIAL);
SerialOpen(0,SERIAL0_COM_SPEED);
}
It seems that port 0 is allocated to serial GPS. It could be a reason of trouble connecting board to GUI as far as I expect to exchange data through port 0 (USB). What do you think?
[Edit 19:45]
Apparently I have read code too quickly. Port 0 is open especially when GPS not present. Anyhow, I dont know why port 0 is associated with GSP. For me its devoted to serial communication through USB!
Would you know, by chance, where communication is checked inside main loop? I have not found any function looking like byteAvailable..
[Edit 25/01]
I have wired again the FC to USB port. The activity of port is showing on rx LED. When I press 'connect', the LED is bright 7 times with interval of 8 or 10 seconds, then it flashes 7 times and immediately after that, the GUI tells that I have to check the port number.
The first point is that it is the right port number (activity is obvious on LED)
The second point is the firmware does not answer the GUI. Why?
Some idea to progress into diagnostic?
[Edit 20:26]
Some news : I have used a port sniffer and I can say the GUI sends packets on port 4 which FC is supposed to listen. I see commands like $M>dd sent through the port. No answer from FC.
[Edit 26/01]
I tried to use navi GUI with 2.3 Alex firmware. Everything is OK. The communication established a first and I can read parameters and sensors.
I think the problem is inside navi firmware. I shall dig deeper to find the reason my FC does not links to GUI.