Skip to content

CoCo firmware - network_json_query returns 0xD and sometimes additional characters in addition to query value #1035

@RichStephens

Description

@RichStephens

When using network_json_query to query a parsed json response, the return value has either a carriage return (0xD), or a carriage return plus other random characters appended to the return value.

This was tested using a test program found in the CoCo weather client in the coco/work/testprg folder. Run the wctest application from the wgtest.dsk disk image.

As you can see from this test, the "success" message from the json returned from the ip-api call has a CR (0xD) at the end. Press any key after every new URL test to move to the next one. Because of the extra characters, the URL for the next call is mangled with CRs in the middle, so the calls fail.

Image

If you want to see what everything is SUPPOSED to look like, run wctesttr.bin. It does the same test, but it trims every response string from the network_json_query calls by truncating them at the first CR:

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions