ENTTECProUSB, Linux serial read needs improvement
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp, linux
- Ambito
- embedded-iot, operating-systems
Direzione di ricerca
Start in common/io/Descriptor.cpp at the Linux-specific Receiver function and inspect how nonblocking serial reads and partial data are handled. Reproduce the ENTTEC Pro USB behavior on Linux if possible, then verify that read readiness and EAGAIN handling prevent checksum errors during discovery and RDM SET/GET operations.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
I have a project making a ENTTECproUSB compatible device running on a Linux Box to play with LEDDimmer controls via RDM.
With my workstation an Intel XEON I had little trouble getting the Discovery work reliable but with my Lenovo have the device connected to USB it failed very badly. All kind of Checksum errors happens. I dug deep and found the problem in the common/io/Descriptor.cpp exactly in the Receiver function.
There are two improvements I have done.
- Populate a EAGAIN error to inform the upper stack about a "do it again kernel wasn't ready"
- Add an ipctl() to read if they're the amount of data available we want to read and if not wait and check again (exhaust wait time 110ms)
Below the snippet with some other improvements not show here fix the checksum errors and problems with discovery and all RDM SET/GET entirely.
I have sometime in the coming days and will file a pull request.
Regards
Chris
uint32_t available;
uint8_t loop=10;
int fd = ReadDescriptor();
wait_loop:
ret = ioctl(fd, FIONREAD, &available);
if (available < size) {
usleep(100);
loop--;
if (loop>0)
goto wait_loop;
}
ret = read(ReadDescriptor(), data, size - data_read);
if (ret<0) {
if (errno == EAGAIN || errno == EWOULDBLOCK)
return -EAGAIN;
if (errno != EINTR) {
OLA_WARN << "read failed, " << strerror(errno);
return -1;
}
return ret;
}
else if (ret == 0) {
return 0;
}
data_read += ret;
data += data_read;
}
#endif // _WIN32
return 0;
- Lingua principale
- C++
- Stelle
- 771
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenLightingProject/ola
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenLightingProject/ola#2075 ·
-
Digital Enlightenment / FX5 not recognizedForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaquestion Type-DeviceSupport
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
OpenLightingProject/ola#2056 · 2 commenti ·
-
Difficulty-Medium Language-C++ Maintainability OpSys-All
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
OpenLightingProject/ola#2053 · 1 commento ·
-
v0.11.0Forse di nuovo libera @peternewman l’ha presa 227 giorni fa e non c’è nessuna pull request aperta. Aperta
OpenLightingProject/ola#2038 · 18 commenti · 2 assegnatari ·
-
Ensure we only list an interface once in LIST_INTERFACESForse già presa @iibaranov-IG l’ha presa 69 giorni fa. Apertabug Component-RDM Difficulty-Medium Language-C++ Priority-Low
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
OpenLightingProject/ola#2037 ·
Tutte le issue di OpenLightingProject/ola
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
deepseek-ai/DeepEP#830 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
google-ai-edge/LiteRT-LM#4701 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
HarperFast/rocksdb-js#1131 ·
I maintainer di solito rispondono entro 1 giorno
-
Swapped cache lookups in ScanModelAndDecideAllDiffExpansionForse già presa @Lian292213 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area/daemon bug good first issue platform/linux priority/p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ToshiNamura/Deimos#5 ·