Commit Graph

48 Commits

Author SHA1 Message Date
Wojtek Rzepecki
1a66e73b78 [BH-1167] USB async receive
Polling routine replaced with event driven
implementation for USB receive
2021-11-10 16:57:02 +01:00
Artur Śleszyński
fb6d036617 [CP-564] Reorganize desktop endpoints
Move desktop endpoint factory to a separate lib to be able to provide
different factories for different products.
2021-09-24 12:11:53 +02:00
Marcin Smoczyński
57874cab33 [BH-912] Improve sys module structure
Improve structure of the module sys. Problems within this module
prevents from linking others.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-24 10:01:19 +02:00
Marcin Smoczyński
bd90e57516 [BH-907] Split utils module into components
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-23 15:14:40 +02:00
Artur Śleszyński
b15006a94c [CP-564] Make desktop endpoints a separate lib
In order to have different sets of endpoints for different products,
we need to separate endpoints from the desktop service.
2021-09-21 10:41:37 +02:00
Marek Niepieklo
bd1d1967b2 [EGD-7465] Fix double de-initialization of USB
Added flag for Worker-Desktop initialization state
2021-09-06 17:14:16 +02:00
Marek Niepieklo
bd06eacbda [CP-403] Replace old update code
Removed update related code
Removed update test scripts
2021-08-05 17:11:24 +02:00
Adam Dobrowolski
2a709ced4b [CP-325] Request reboot code adjusted to work with harness
We have no controll on UART over the device flushing, minimum code
added to assure that data could be flushed
We do not close services when these are closed with reason
2021-07-12 12:59:19 +02:00
tomaszkrosnowski
e05ddbfdd9 [EGD-7010] Remove sensitive data from logs
Sensivite data like first/second name, messages and notes content,
dialed gsm numbers etc are removed from logs to guarantee security for
Pure users.
2021-07-08 11:43:35 +02:00
Marek Niepieklo
6f21138e85 [CP-253] Add checksum to package transfer
Added CRC32 to FS download command
2021-06-29 16:28:24 +02:00
Artur Śleszyński
3c2ca020a9 [CP-183] Do not log sensitive data in service-desktop
Remove potential printing of user-sensitive data.
2021-06-29 11:07:25 +02:00
Marek Niepieklo
bf06b5bad8 [CP-206] Report Pure serial number in USB descriptors
Added serial number to USB device descriptor
2021-06-23 12:03:52 +02:00
Marek Niepieklo
d857c5538f [CP-200] Delete file with old OS version
Removed update file after a successful update or
in case of an interrupted download.
2021-06-17 16:25:06 +02:00
Lukasz Skrzypczak
7fee0d9cfb [BH-378] Utils move log to library
Moved log to separate library
2021-06-08 12:24:29 +02:00
Wojtek Rzepecki
14d4ce8220 [EGD-6615] Fix tethering repeated notification
Repair of repeated tethering notification
after disconnection.
2021-04-29 16:45:12 +02:00
Maciej Gibowicz
6a80654b52 [EGD-6457] Add power management for USB
When the USB is disconnected, we turn off the peripherals
by going into the suspend bus mode.
2021-04-22 17:46:07 +02:00
Marek Niepieklo
75f225ce0d [EGD-6309] Fix 2-sec delay in VCom deinit when USB cable disconnected
When USB wasn't attached, MTP task waits for configured event,
hence it cannot be joined before semaphore take times out (2 sec).
2021-03-26 10:51:57 +01:00
Maciej Gibowicz
9ab4fb1518 [EGD-6308] Add block CPU frequency decreasing for connected USB
While the USB cable is connected, the battery charging works,
so in this case energy saving is not critical
and for a more stable transmission, we block decreasing
the CPU frequency below 132 MHz.
2021-03-24 18:57:23 +01:00
Marek Niepieklo
5ab1ef65dd [EGD-5868] Add access to backup over MTP
This change adds access to backups via MTP
after backup file has been successfuly created.
2021-03-22 18:59:11 +01:00
Roman Kubiak
6bc6eccc34 [EGD-5565] Fix update process on new lf filesystem
These changes are needed for update to work with new
LFS fileystem, also minor bugfixes are included.
2021-03-11 07:35:31 -08:00
SP2FET
66db7b0841 [EGD-5512] Usb security refactor and devices pairing
Move all security related functionality to single security endpoint
Paired devices can be added to avoid further passcode requests
2021-03-11 08:46:18 +01:00
Pawel.Paprocki
82fe792e2a [EGD-6030] Fix Analise and optimize stack for service-desktop-worker
Reduce stack size to 1k
2021-03-09 11:34:24 +01:00
Tomasz Sobkowiak
0022da5e37 [EGD-5204] Show passcode screen only when PC is connected
USBConfigured event is not fired when powerbank, charger is connected.

[EGD-5204] Show passcode screen only when PC is connected

USBConfigured event is not fired when powerbank, charger is connected.
2021-02-25 10:28:08 +01:00
Piotr Tański
d5c3d41ca4 [EGD-5204] Secure USB communication
Secure all endpoints by returning 403(Forbidden) when USB is connected.
Request screen passcode to enable secured endpoints.
2021-02-24 19:49:07 +01:00
Marek Niepieklo
042e5b6984 [EGD-4625] Fix update timeout timer
Moved timer handling to Service Desktop
Use message comm. to update timer state
2021-02-18 13:45:15 +01:00
Marek Niepieklo
ab28f1021e [EGD-5664] Fix excessive logging in USB-CDC
Remove excessive logging in USB-CDC, which slows down transfer
2021-02-08 17:44:30 +01:00
mkamonMdt
2dc0bc3676 [EGD-4850] Fix of statics between USB CDC and ServiceDesktop
Handling queues with static std::string implementation caused
problem of double-free memory on turning off simulator. Applied
solution to the problem is to pass ownership of queued string to
a receiver side.
2021-01-22 09:21:59 +01:00
Piotr Tanski
4e0f72e70a [EGD-4696] Several stabilization patches. (#1192) 2020-12-15 15:30:13 +01:00
Hubert Chrzaniuk
8a3eb64662 [EGD-4899] Worker class design improvements and fixes (#1190)
* allow workers to run independently from service
* change worker to use FreeRTOS wrapper Queue class instead of
  freeRTOS native queues
* fix bug disallowing to destruct worker that have never ran
* fixed worker bad state transition to Running state
2020-12-14 11:56:29 +01:00
jimmorrisson
6ce0dc4df3 [EGD-4751] Change: new filesystem handling implementation in module services. (#1151)
Due to vfs deprecation there is need to remove all vfs calls from code. This PR covers module services. It also contains minor fixes in module-services.
2020-12-10 21:04:51 +01:00
Roman Kubiak
9fdb298463 [EGD-4557] implement usb-deinit (#1101)
Added usb deinit calls for rt1051 and linux
2020-11-30 10:41:11 +01:00
Roman Kubiak
b4814861b0 [EGD-4318] enable service desktop (#973)
* [EGD-3688] Relax retries count for send
enable ServiceDesktop

* [EGD-3688] Relax retries count for send
enable ServiceDesktop

* [EGD-4318] enable service desktop and USB communication
CDC for serial port (communication with Mudita Center)
MTP for file transfer

* [EGD-4318] include path fix

* [egd-4318] constexpr brought back

* [EGD-4318]: review changes
- all BSP specific code moved to bsp files
- added a device listener class for USB
- simplified WorkerDesktop

* [EGD-4318] more reivew fixes mostly include paths and enums

* [EGD-4319] review fixes for SP2FET

* [EGD-4318] updates for large messages sent from phone

* [EGD-4318] more review fixes
- error checks on linux (ptms open and ptsname)
- removed all vfs
- service-desktop won't start if worker init fails

* [EGD-4318] updated return values for usbInit

* Update module-services/service-desktop/WorkerDesktop.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* Update module-services/service-desktop/endpoints/update/UpdateMuditaOS.hpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4318] review fixes
- removed #define
- return values for usbInit

* Update module-bsp/board/linux/usb_cdc/usb_cdc.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4318] updated taglib

* [EGD-4318] style fixes

* Update module-bsp/board/linux/usb_cdc/usb_cdc.cpp

Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>

* [EGD-4318] switches from freertos Timer class to sys::Timer

* Update module-services/service-desktop/WorkerDesktop.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* Update module-services/service-desktop/WorkerDesktop.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4318] added mutex/lock during raw data transfers

* [EGD-4318] if the TAR file is zero size or invalid
mtar_close causes HF. This is a workaround

* [EGD-4318] timer should not start on constructor

* [EGD-4318] getRawMode is const noecept

Co-authored-by: unknown <atom@prostate.local>
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
2020-11-19 17:44:23 +01:00
Radoslaw Wicik
47c817cf15 [EGD-4218] Convert service-desktop to library 2020-11-16 16:04:15 +01:00
Bartosz Cichocki
d2589ec5ee [EGD-4359] fixed linux USB sending (#989)
Fixed USB linux sending to be able to use test harness on the simulator


Co-authored-by: SP2FET <bartosz.cichocki@mudita.com>
2020-11-09 18:23:47 +01:00
Roman Kubiak
eb1f8206b4 [EGD-3688] usb stack as an external module (#906)
* [EGD-3688] usb stack as an external module
removed old usb code

* [EGD-3688] linux fix

* [EGD-3688] fixes for new USB code

* [EGD-3688] updated submodule
2020-11-04 18:10:34 +01:00
Radosław Wicik
d5de12f7ce [EGD-3852] clean include in service (#928) 2020-10-28 15:19:24 +01:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Bartek Cichocki
9095333b2c [EGD-3502] PR fixes 2020-09-02 17:26:01 +02:00
Bartek Cichocki
9ce0ece6a8 [EGD-3502] reworked endpoints 2020-09-02 17:26:01 +02:00
Bartek Cichocki
9eeeb6ae92 [EGD-3502] reworked endpoints and handlers
added endpoint listener to query
2020-09-02 17:26:01 +02:00
Bartek Cichocki
f07b337e2d [EGD-3463] Added service-desktop <-> DB interface
added changelog entry

added simple tests

added simple negative tests

fixed empty number contact case, added appropiate test
2020-08-07 09:30:51 +02:00
Bartek Cichocki
794a2bd35f [EGD-3436] Reimplemented parser, removed TinyFSM
added unit tests, cleaned up code

added changelog entry
2020-07-28 10:51:37 +02:00
Roman Kubiak
0a14be0ebd review fixes 2020-06-26 12:04:30 +02:00
Roman Kubiak
06c4662a04 ServiceDesktop: initial working commit 2020-06-26 12:04:30 +02:00
Radoslaw Wicik
a8573a404c Apply new style 2020-03-17 10:03:16 +01:00
rkubiak01
2ac0fb756d desktop app changes #211 fix bundle #1 2020-03-13 11:34:32 +01:00
rkubiak01
39c93f6b09 Desktop app changes:
- endpoints split to files
- implemneted device info
- battery made obsolete should be deleted
- storage endpoint might not be neededm, for
  debug purposes only
- update not implemented
- sys::Service * is passed to endpoints
- added uuid as part of the core protocol
- body of the message is made available to endpoints
2020-03-13 11:34:32 +01:00
pawel-mudita
d1665ed3ba [EGD-2855][EGD-2856] Parser for desktop app (#188)
* [EGD-2306] DESKTOP application initial commit

most of this code is foreign and unverified
it's low level magic numbers for the platform

on Linux i used PTY to simulate a serial line

* [EGD-2306] Add contact-list and contact-count commands

* [EGD-2306] Add command for geting contact by id and minor fixes

* [EGD-2856][WIP] Add basic serial parser

* [EGD-2855] Set usb device config buffer property cacheable

* [EGD-2856] Separate handlers from fsms, add status codes

* [EGD-2855] fd passed to state machine for linux renderer support

* [EGD-2856] Fix warnings

* [EGD-2855] New send task added and buffer queque

* [EGD-2856] Add simple ServiceDesktop documentation

* [EGD-2855] rt1051 worker refactor

* [EGD-2855] Added service workers for desktop app.
Changed linux USB driver mock up.
Added queue name mapping for service workers.
Added queue registry support (maybe redundant with mapping)

* [EGD-2855] Added proper message pointer to queue send and memory free
Added bsp driver namespace for linux and rt1051

* [EGD-2856] Major cleanup

* [EGD-2856] Fix typo

* [EGD-2856] Fix warnings

* [EGD-2856] Delete recursive fsm calling to prevent stack overflow

* [EGD-2856] Reduce http codes

* [EGD-2856] Rename serial parser to parser

* [EGD-2855] USB_CDC drives renames and cleanups
Service Worker queue cleanups

* [EGD-2855] Service Worker queue cleanups

* [EGD2855] Fixed external driver import

* [EGD-2856] Remove redundant message type

* [EGD-2856] Switch on enums instead of ints, and other minor changes requested after code review

* [EGD-2855] usb driver moved to bsp directory structure, pull request fixes

* [EGD-2855] clang #include fix

* [EGD-2856] Add tinyfsm as git submodule, update readme and minor fix

Co-authored-by: rkubiak01 <56821808+rkubiak01@users.noreply.github.com>
Co-authored-by: PrzeBrudny <60609703+PrzeBrudny@users.noreply.github.com>
2020-02-27 15:34:42 +01:00