Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [yocto] lost busybox mysteriously (JH)
2. Re: [yocto] lost busybox mysteriously (JH)
3. Re: [yocto] lost busybox mysteriously (JH)
4. Re: Doesn't connect to strongest wifi (Daniel Wagner)
----------------------------------------------------------------------
Date: Tue, 28 Jan 2020 16:55:40 +1100
From: JH <[email protected]>
Subject: Re: [yocto] lost busybox mysteriously
To: Laurent Gauthier <[email protected]>
Cc: Quentin Schulz <[email protected]>, Andy Pont
<[email protected]>, Yocto discussion list
<[email protected]>, linux-mtd <[email protected]>,
connman <[email protected]>
Message-ID:
<CAA=hcwszxjr1ebxpwak-agdccwmjtbw-zf6igub+gf5lipj...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Hi Laurent,
On 1/28/20, Laurent Gauthier <[email protected]> wrote:
> Hi JH,
>
> As you are not providing enough details in your request we have to
> guess the nature of
> the issue you are seeing.
Let me know what kind of details I haven't provided.
> I will just point out a few things that could help in your situation.
>
> If this is a failure that happens almost every time after you flash a
> new image it could be
> due to NAND blocks being bad.
There was one image, booted kernel fine for the first and second
cycle, then it got shell commands error due to lost busybox. I did see
NAND bad blocks list during booting, but that should be managed by
MTD, won't be a problem to case kernel crash or missing busybox,
right?
> As you mentioned that you have been working with this system for a
> year it could be that repeated
> flashing of UBI images has ended up causing some NAND blocks to go bad.
No, I mean I have been using Yocto to build image and to flash to the
NAND for a year, the devices I am currently using actually a new
revision hardware device, it was only used for the first time when the
new image was installed, the first and second booting was good, the
third got bad missing busybox and shell command, crashed kernel
booting.
> When using UBI it is a good idea to use a flashing procedure that will
> preserve UBI wear-levelling
> information. An example of such a procedure can be found in section
> 4.4 of the following page:
>
> http://variwiki.com/index.php?title=U-Boot_features#Flashing_UBIFS_to_NAND
Than you for the link, yes we have already been planing to work on a
new partition scheme to move MTD partitions to UBIFS volume
partitions. But I don't think the current problem is related to NAND
bad blocks.
> These instructions (ubi part/ubi remove/ubi create/ubi write) need to
> be adjusted for your specific
> hardware layout, but this can help. In short you should update
> individual UBIFS volumes in your UBI
> partition rather then reflash the whole UBI partition.
>
> Another option is to use ubiformat from the u-boot command line. For
> this you would need to research
> the subject by yourself.
>
> Updating your UBIFS volumes this way you should be able to extend
> greatly the life of your NAND if
> you are flashing your development board multiple times a day.
>
> I would like to also comment on a remark made by someone else about
> UBIFS being safe across
> power cycles:
>
> While the assertion that "UBIFS is safe across power-cycles" is true
> in theory in practice you probably
> should avoid to rely on it too much.
There is not practical we can avoid it, the device is an IoT device
installed and operated automatically, there is not practical we can
run command to turn it on and off.
> My recommendations to improve resistance to power-cycles would be the
> following:
>
> 1. If possible mount your UBIFS root-filesystem as read-only, and will
> avoid most issues. This means
> you should use tmpfs for temporary/volatile filesystems.
> 2. If your root-filesystem cannot be read-only then remount it as
> read-only just before the final shutdown
> (using for example "mount -o remount,ro /" followed by a "sync") as
> this will limit the possibility of a
> corruption of the UBIFS occurring on the next reboot.
>
> I hope that you will find what your issue is.
> Kind Regards, Laurent.
>
> On Mon, Jan 27, 2020 at 1:53 PM Quentin Schulz
> <[email protected]> wrote:
>>
>> Hi JH,
>>
>> On Mon, Jan 27, 2020 at 10:13:37PM +1100, JH wrote:
>> > Hi Andy,
>> >
>> > Thanks for the response.
>> >
>> > On 1/27/20, Andy Pont <[email protected]> wrote:
>> > > JH wrote...
>> > >
>> > >>That the same problem of missing busybox was not just occurred during
>> > >>the device running in the middle of operation, it was also occurred
>> > >>during booting image from NAND, I saw several times that the first
>> > >> and
>> > >>second cycles of booting image from NAND were working well, then some
>> > >>following booting process would be crashed by missing busybox, then
>> > >>could not run whole shell commands. I have been pondering if it could
>> > >>be caused by NAND issue or network virus / fishy? Appreciate any
>> > >>clues.
>> > > The first step is for us to understand what “missing” means? Have
>> > > you
>> > > got any mechanism (U-Boot, SD card boot, etc.) that will allow you to
>> > > mount and look at the contents of the NAND file system?
>> >
>> > Means that busybox was not there anymore, it mysteriously lost, all
>> > shell commands would no longer available. It cannot to run mount or
>> > any shell commands. There was two scenarios when that happened:
>> >
>> > - In the middle of running, the device all of certain could not run
>> > shell commands and failed mysteriously
>> >
>> > - During the u-boot booting kernel process, there were full errors of
>> > failing shell commands. Let me make it clear, that booting error did
>> > not occur in the first or second kernel booting after the new image
>> > installation, it happened in the following kernel booting, but there
>> > was nothing to delete busybox accidentally, busybox was just
>> > mysteriously disappeared. Because I could not run ls, I did not know
>> > if there are other things missing. If you ask how I could know the
>> > busybox was missing, I ran the zImage-initramfs to boot the linux in
>> > RAM, then mount the ubi0 to find out busybox was gone.
>> >
>> >
>> > > If you look at the /bin directory (ls -la /bin/busy*) what do you
>> > > see?
>> > > Have the files been deleted? Truncated? Zero length?
>> >
>> > Could not run ls or any shell commands when the busybox was missing.
>> >
>>
>> /bin/ls -la /bin/busy* ?
>>
>> Maybe something is messing with the PATH environment variable. Or
>> something is removing the symlinks from some binaries to busybox.
>>
>> > > What file system are you using on the NAND flash? How are the
>> > > devices
>> > > being reset during the various boot cycles? If it is a hardware
>> > > reset
>> > > then some file systems are less resilient to it than others but I
>> > > would
>> > > expect in that case more fundamental boot issues.
>> >
>> > UBIFS, most device reset or boot cycles were calling halt or reboot,
>> > but it sometime it could just use power cycle.
>> >
>>
>> IIRC, UBIFS is safe from power cycles.
>>
>> Quentin
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#48161):
>> https://lists.yoctoproject.org/g/yocto/message/48161
>> Mute This Topic: https://lists.yoctoproject.org/mt/70128245/3618354
>> Group Owner: [email protected]
>> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
>> [[email protected]]
>> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>
> --
> Laurent Gauthier
> Phone: +33 630 483 429
> http://soccasys.com
>
------------------------------
Date: Tue, 28 Jan 2020 16:58:28 +1100
From: JH <[email protected]>
Subject: Re: [yocto] lost busybox mysteriously
To: Jonatan Palsson <[email protected]>
Cc: Andy Pont <[email protected]>, Yocto discussion list
<[email protected]>, linux-mtd <[email protected]>,
connman <[email protected]>
Message-ID:
<CAA=hcwrb6wcv1fpxmjwqvminpp+5ueydkw8saelcrmgyffg...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
On 1/27/20, Jonatan Palsson <[email protected]> wrote:
> Hello JH,
>
> On Mon, Jan 27, 2020 at 12:13 PM JH <[email protected]> wrote:
>>
>> > If you look at the /bin directory (ls -la /bin/busy*) what do you see?
>> > Have the files been deleted? Truncated? Zero length?
>>
>> Could not run ls or any shell commands when the busybox was missing.
>
> Do you have the "ubifsls" command available in your u-boot? This
> should allow you to look around in the file system from u-boot. See
> here: https://gitlab.denx.de/u-boot/u-boot/blob/master/doc/README.ubi#L177
>
Thanks Jonatan for the link.
Kind regards,
- jh
------------------------------
Date: Tue, 28 Jan 2020 17:25:29 +1100
From: JH <[email protected]>
Subject: Re: [yocto] lost busybox mysteriously
To: Quentin Schulz <[email protected]>
Cc: Andy Pont <[email protected]>, Yocto discussion list
<[email protected]>, linux-mtd <[email protected]>,
connman <[email protected]>
Message-ID:
<CAA=hcWSXrBKX=ebf5khkwxmwq+6tcqvv4exxbwuonidr6ed...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
On 1/27/20, Quentin Schulz <[email protected]> wrote:
> Hi JH,
>
> On Mon, Jan 27, 2020 at 10:13:37PM +1100, JH wrote:
>> Hi Andy,
>>
>> Thanks for the response.
>>
>> On 1/27/20, Andy Pont <[email protected]> wrote:
>> > JH wrote...
>> >
>> >>That the same problem of missing busybox was not just occurred during
>> >>the device running in the middle of operation, it was also occurred
>> >>during booting image from NAND, I saw several times that the first and
>> >>second cycles of booting image from NAND were working well, then some
>> >>following booting process would be crashed by missing busybox, then
>> >>could not run whole shell commands. I have been pondering if it could
>> >>be caused by NAND issue or network virus / fishy? Appreciate any
>> >>clues.
>> > The first step is for us to understand what “missing” means? Have you
>> > got any mechanism (U-Boot, SD card boot, etc.) that will allow you to
>> > mount and look at the contents of the NAND file system?
>>
>> Means that busybox was not there anymore, it mysteriously lost, all
>> shell commands would no longer available. It cannot to run mount or
>> any shell commands. There was two scenarios when that happened:
>>
>> - In the middle of running, the device all of certain could not run
>> shell commands and failed mysteriously
>>
>> - During the u-boot booting kernel process, there were full errors of
>> failing shell commands. Let me make it clear, that booting error did
>> not occur in the first or second kernel booting after the new image
>> installation, it happened in the following kernel booting, but there
>> was nothing to delete busybox accidentally, busybox was just
>> mysteriously disappeared. Because I could not run ls, I did not know
>> if there are other things missing. If you ask how I could know the
>> busybox was missing, I ran the zImage-initramfs to boot the linux in
>> RAM, then mount the ubi0 to find out busybox was gone.
>>
>>
>> > If you look at the /bin directory (ls -la /bin/busy*) what do you see?
>> > Have the files been deleted? Truncated? Zero length?
>>
>> Could not run ls or any shell commands when the busybox was missing.
>>
>
> /bin/ls -la /bin/busy* ?
>
> Maybe something is messing with the PATH environment variable. Or
> something is removing the symlinks from some binaries to busybox.
No, could not run /bin/ls as it was linked to /bin/busybox.nosuid,
the /bin/busybox.nosuid was damaged for some reason.
>> > What file system are you using on the NAND flash? How are the devices
>> > being reset during the various boot cycles? If it is a hardware reset
>> > then some file systems are less resilient to it than others but I would
>> > expect in that case more fundamental boot issues.
>>
>> UBIFS, most device reset or boot cycles were calling halt or reboot,
>> but it sometime it could just use power cycle.
>>
>
> IIRC, UBIFS is safe from power cycles.
Good to know. Thank you.
> Quentin
>
------------------------------
Date: Tue, 28 Jan 2020 08:47:11 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: Doesn't connect to strongest wifi
To: Torsten Wörtwein <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1
Hi Torsten,
On Mon, Jan 27, 2020 at 09:35:49PM -0500, Torsten Wörtwein wrote:
> On Mon, Jan 27, 2020 at 12:20 PM Daniel Wagner <[email protected]> wrote:
> > What does connman -n -d plugins/wifi.c say about the SSIDs and the
> > found frequencis? ConnMan has to tell wpa_supplicant which SSID and
> > frequency to connect to. Though even if that is not wrong decision,
> > wpa_supplicant should then automatically roam to the strongest signal.
> >
>
> It seems to list only one frequency - only the lines containing the
> router's/repeater's SSID:
> connmand[895]: plugins/wifi.c:get_latest_connections() ssid
> 726976656e64656c6c freq 5240 modified 1580175624
> connmand[895]: plugins/wifi.c:add_scan_param() SSID 726976656e64656c6c
> added to scanned list of 1 entries
> connmand[895]: plugins/wifi.c:network_added() 726976656e64656c6c_managed_psk
> connmand[895]: plugins/wifi.c:network_added() 726976656e64656c6c_managed_psk
>
> The router uses 2412/5240/5825 (5825 is from 'ASUS Smart Connect') and the
> repeater uses 2417/5500. I was much closer to the repeater than to the
> router when running "connmand -n -d plugins/wifi.c".
One thing you could try for a workaround is to change the frequency
stored in the settings file. First stop ConnMan (because it will
overwrite those files). Go to
/var/lib/connman/wifi_xxxxxxx_726976656e64656c6c_managed_psk and edit
the settings file. There should be a Frequency entry with 5240. What
happens if you change this to 5500?
> I also noticed, that not all SSIDs might have been listed:
> connmand[895]: plugins/wifi.c:wifi_scan() max ssids 16
> connmand[895]: plugins/wifi.c:add_scan_param() SSID
> 5265736964656e6365496e6e5f4755455354 added to scanned list of 15 entries
wpa_supplicant exposes a lot of networking details and the wifi plugin
in ConnMan has to do a lot of work. And I am not surprised this
doesn't work as expected.
Anyway, try the workaround to see if we are going into the right
direction.
Thanks,
Daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 51, Issue 35
***************************************