- Mar 06, 2023
-
-
Jason Kridner authored
Fixup avahi and svc wait See merge request !4
-
Alexandre Bailon authored
Sometime, svc_wait never return. This happens when SVC is ready too early (pthread signal sent before we wait for it). This updates svc_wait to also work in such conditions. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
tcpip controller has been updated to work with IPv6 but avahi expects IPv4. This updates avahi to use IPv6. Note: The beagleconnect used to test it has two addresses: - 2001:db8::1 - fe80::7666:b429:4b:1200 Avahi use the second one which is not routed by default on the beagleplay. We should use `ip -6 addr add` to add the second address otherwhise gbridge won't be able to connect. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
- Feb 28, 2023
-
-
Jason Kridner authored
This fixes many issues See merge request !3
-
- Feb 24, 2023
-
-
Alexandre Bailon authored
Sometime, the application segfault during a connection destroy operation. This operations happens often because greybus close the connection for power saving. The connection thread was not stopped and sometime, it could try accessing a pointer previously freed. This cancels the thread and wait until it exits before to release the resources. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
This uses poll to wait for incomming data. This also used to detect errors and avoid using an invalid file descriptor. This should improve the error handling when a connection is close by the server or the client. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
This initializes intf_alloc_lock global variable. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
Some variables might be accessed concurently. This adds some mutex to protect them. Note: This tries to fix a segmentation fault that seems to caused by a concurent access. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
- Feb 23, 2023
-
-
Alexandre Bailon authored
We open a sysfs file to disable the svc watchdog but we never close the file. This fixes it. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
Some buffers allocated using nlmsg_alloc are not released. This fixes two memory leaks. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
Using avahi, gbridge is supposed to find a greybus module on network and to automatically connect it. But if avahi doesn't work, we can't connect to a module. This adds two options to set the IP and the port and bypass avahi. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
- Feb 14, 2023
-
-
Alexandre Bailon authored
Currently, we can try to create an interface using SVC before the SVC is ready to handle operations. This adds a way to wait until SVC is ready and update interface_create to wait. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
When close(fd) is used on the a TCP/IP socket in Linux, it puts the socket into a FIN_WAIT1 state and the TCP/IP connection is not completely severed until the application terminates. On the server side, this has the effect of keeping sockets open for an unnecessarily long period of time. If the server is a memory-contstrained device such as a microcontroller, that can have very negative effects. For that reason, it is preferred to use shutdown(fd, SHUT_RDWR) instead. Signed-off-by:
Christopher Friedt <chrisfriedt@gmail.com>
-
- Oct 19, 2020
-
-
Jason Kridner authored
-
Jason Kridner authored
-
Baozhu Zuo authored
-
- Oct 18, 2020
-
-
Jason Kridner authored
-
- Oct 17, 2020
-
-
Jason Kridner authored
-
Jason Kridner authored
-
- Oct 16, 2020
-
-
Jason Kridner authored
-
- Sep 10, 2020
-
-
Jason Kridner authored
-
Christopher Friedt authored
-
- Sep 06, 2020
-
-
Christopher Friedt authored
Previously, the actual number of bytes written did not match what was expected in some cases, in practice. This change adds a "write all" wrapper around write. Similarly, read did not always return the full greybus message due to buffering. In particular, this was the case for devices connected via 6LowPAN which has a very small MTU on IEEE 802.15.4 . Similarly, a "read one message" wrapper was added around read that first checks the length of the incoming greybus message via its header and only reads precisely the correct number of bytes. Signed-off-by:
Christopher Friedt <chrisfriedt@gmail.com>
-
Christopher Friedt authored
This change ensures that numeric baud rates are properly matched to their symbolic values (115200 -> B115200, it is not a guarantee that they are equal). Also, previously uart_read() would peg the CPU with the O_NDELAY flag. Here, we also add some common defaults for blocking UART I/O. Signed-off-by:
Christopher Friedt <chrisfriedt@gmail.com>
-
Christopher Friedt authored
NLA_BINARY was removed from libnl in 2016, iirc, and the preferred replacement is NLA_UNSPEC. I believe the reasoning was that NLA_BINARY was getting misused. Signed-off-by:
Christopher Friedt <chrisfriedt@gmail.com>
-
- Sep 09, 2019
-
-
Alexandre Bailon authored
There are a typo. We check that the kernel is higher than 4.9 but the error tells that a kernel 4.19 is required. Change it to 4.9. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
The curren way to test the kernel is not correct, and could fail even if the kernel is higher than expected. This fixes the kernel comparison. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
- Aug 06, 2019
-
-
Alexandre Bailon authored
A function from gbsim is used in main, even if gbsim has not been enabled. This fixes it. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
There is a build issue in tcpip controller. This fix it. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
This updates the README with more accurated instructions to build gbridge. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
GBDIR must be set in order to include the Greybus headers. Since Greybus has been merged to mainline kernel, we could just check if the current kernel >= 4.9, and use it's sources to build gbridge. If the kernel sources are not available, then GBDIR could be set manually. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
There were some error because gbridge was not handling this command correctly. This fixes the issue. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
- Aug 05, 2019
-
-
Alexandre Bailon authored
gbridge could simulate a real module. This is called GBSIM. This update README to talk about it. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
This uses mardown to format the README. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
- Mar 15, 2017
-
-
Alexandre Bailon authored
Add a .gitignore file to ignore some temporary files. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
Add a gbsim controller and some greybus protocols. The current protocols supported are control and loopback. The control protocol is mandatory to enumerate the module. The loopback protocol is useful for testing. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
Some controllers such as netlink must be registered before the others. Call register_controllers() before to register other controllers. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
Add a variable to know if the thread is running or if must be cancelled on exit. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
In order to ease the debugging, add some debug logs. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-
Alexandre Bailon authored
The function svc_interface_set_pwrm_request() send back the wrong status value. Update the status to GB_SVC_SETPWRM_PWR_OK. Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
-